TypeError: Illegal invocation

Comments

6 comments

  • Hi Thomas,

    As this error message is not familiar to me I would need some more information in order to figure out what could went wrong.
    Could you please share some more details about the above mentioned error, such as when/how this happens etc.

    Also you could provide us the domain in question so we could debug and investigate further more the issue and help you solve it afterwards instead of guessing. If you want you could post you domain here or send it at s.velinov@vconnect.dk

    Regards,
    Spas

    0
    Comment actions Permalink
  • Avatar
    Thomas Ardal

    Hi Spas

    I totally understand why you are asking for more details. I don't have a lot to give you, though, since this is happening when our users are visiting the site. I log all javascript errors happening and it is in the log where I found the errors from Cookiebot. So not expecting you to be able to tell me exactly what goes wrong, but at least you know that the widget throws errors.

    The domain is https://elmah.io. Until now, I've received the error on the following paths:

    /legal/refund-policy/
    /features/clientside-logging/
    /
    /pricing/

    I don't believe that the error is caused by being on a specific path, but can happen in all of my public facing pages at some point.

    0
    Comment actions Permalink
  • Hi Thomas,

    Do you happen to have user agent strings from these error logs, and could you possibly look up whois info for some of the client IP addresses? Similar issues seem to be caused for other vendors by scanning / bot traffic originating from Facebook IP ranges.

    Regards,
    Spas

    0
    Comment actions Permalink
  • Avatar
    Thomas Ardal

    Hi Spas

    I think you are right. Here are some IP addresses:

    31.13.115.10

    173.252.87.9

    173.252.95.19

    All errors seem to be generated on mobile devices where traffic is coming from Facebook ads. Here are some user agents causing the problem:

    Opera/9.80 (Android; Opera Mini/38.0.2254/133.73; U; en) Presto/2.12.423 Version/12.16

    Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1

    Let me know if you need more information. I have a lot of contextual information on these errors.

    Thomas

    0
    Comment actions Permalink
  • Avatar
    Andrew Reedy

    We are receiving this same error. Looks like it is caused by the CookieConsent.setOutOfRegion(); function.

    TypeError Illegal invocation 
        :1:38680:5 HTMLDocument.document.createEvent
        https://consent.cookiebot.com/7d27f57d-0597-41a9-b4e6-f4e60c6eb53e/cc.js:1:3993 CookieControl.Dialog.init
        https://consent.cookiebot.com/7d27f57d-0597-41a9-b4e6-f4e60c6eb53e/cc.js:61:21 
    0
    Comment actions Permalink
  • Avatar
    Kenan

    Hi,

    It seems that the error is related to Facebook bots/scanners and not actual users. Have a look at:

    https://github.com/aFarkas/lazysizes/issues/520

    The guys over at that issue have not found a solution yet. There is however a suggestion on how you can hide the notifications in sentry:

    Hey everyone,
    After blocking the "text: illegal invocation + has fbclid param" combination in Sentry the issue events rate dropped significantly. Yet some of them still manage to slip into the tracker - they happen to not have the fbclid param. What's interesting is that many of them report a legit iOS Facebook browser's UA

     

    0
    Comment actions Permalink

Please sign in to leave a comment.