getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.97k stars 1.57k forks source link

6.13.2 Introduces Illegal invocation error on global navigator #4006

Closed navied closed 3 years ago

navied commented 3 years ago

Package + Version

Version:

6.13.2

Description

It looks like this pr: https://github.com/getsentry/sentry-javascript/pull/3996 might have started couple of issues to show up on sentry see below for screenshot of sentry error:

image

Not sure why it fires, as I haven't been able to reproduce it myself easily.

AbhiPrasad commented 3 years ago

Thanks for raising the issue. This is strange - we guard against this with https://github.com/getsentry/sentry-javascript/blob/master/packages/browser/src/transports/base.ts#L102. We can maybe add an additional check to see if global exists.

Is this a commonly occurring error? How many users are affected by it?

agrobbin commented 3 years ago

We've had this start happening since 6.13.0 (I think). It's definitely not super-common, but so far we've had 4 errors in the last ~36 hours.

TypeError: Illegal invocation
  at _flushOutcomes(./node_modules/@sentry/browser/esm/transports/base.js:122:22)
  at HTMLDocument.<anonymous>(./node_modules/@sentry/browser/esm/transports/base.js:33:17)
navied commented 3 years ago

After looking into it, it seems like the issue exists in 6.13.1, it just seemed new as I believe we haven't deployed the new 6.13 release yet. It could be based on that, here is a snippet on how many users are effected by it:

image

It tends to happen quite often it seems, but I still cannot reproduce it even while using browser versions mentioned in the events and urls that the users have hit.

ShannonLCapper commented 3 years ago

Thanks for fixing this! When can we expect https://github.com/getsentry/sentry-javascript/pull/4008 to be deployed to npm?

kamilogorek commented 3 years ago

We'll do it this week