Sentry-javascript: Couldn't removeEventListener on version 5.19.1 in some cases

Created on 9 Jul 2020  Â·  3Comments  Â·  Source: getsentry/sentry-javascript

Package + Version

  • [x] @sentry/browser
  • [x] @sentry/integrations

Version:

5.19.1

Description

Some "removeEventListener methods" didn't work when i upgrade packages to version 5.19.1.

But things work out all right on previous version, such as version 5.15.1.

And i found that this config below will cause "callback.__sentry__" to be "undefined" which committed at https://github.com/getsentry/sentry-javascript/commit/9a68a35836c739757f3d8e9418e21e53e62bd4d2

Sentry.init({
  // ...
  integrations: [new Sentry.Integrations.Breadcrumbs({ dom: false })]
});

Is this the reason that make event listeners which registered after sentry inited couldn't be remove ?

How to fix it ?

Needs Triage

Most helpful comment

@scorpio13love thanks, I'll look into it. From my first pass, it appears that disabling of dom breadcrumbs is causing it. Very odd though. Will get back to you once I find the issue.

All 3 comments

Are you able to provide some sort of repro-case? If there's indeed an issue, I'd like to get it fixed right away.

@kamilogorek
I created a repo like this :https://github.com/scorpio13love/sentry-dom-false.

  1. Input sentry "dsn".
  2. Click button to change router between "page home" and "page detail" several times.
  3. You can count the "page detail click" msg in DevTools Console Or look at the Document's Binding EventListeners.

@scorpio13love thanks, I'll look into it. From my first pass, it appears that disabling of dom breadcrumbs is causing it. Very odd though. Will get back to you once I find the issue.

Was this page helpful?
0 / 5 - 0 ratings