sentry-javascript: `ignoreErrors` and `beforeSend` options both cannot stop report error

Package + Version

Version:

0.0.0

Description

My sentry received a lot of meaningless events: TypeError undefined is not an object (evaluating 'window.__pad.performLoop')

I want to stop this kind of events go into my sentry through ignoreErrors option:

Sentry.init({
  ignoreErrors: [
    /window.__pad.performLoop/i
  ],
})

but this ignoreErrors not working at all. So I have tried to use beforeSend option to achieve this:

const ignoreErrors = [
  'window.__pad.performLoop'
];
beforeSend(event) {
    if (event && event.message && ignoreErrors.find(item => event.message.includes(item))) {
      return null;
    }
    return event;
  }

Again, beforeSend option also not working, and my sentry still receive a lot of this events.

Here is my event json file.(I change it to txt format since github cannot upload json) event.txt

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (8 by maintainers)

Most upvoted comments

@kamilogorek You were right about caching. Those errors have no release numbers because we had a regression that the release value wasn’t being passed. The new code has the release number and nothing for that release value is coming through. I decided to keep with using the Error Message filter in Settings. It’s a bit obfuscated since it’s not in the code but we don’t have to depend on the script. Thank you so much!!

@kamilogorek Thanks for your effort. After seeing your test, I begin to think if it is my mistake that make this unexplainable result. So can i close this issue since my problem has been solved, and as for ignoreErrors, I cannot investigate anymore. If I have ignoreErrors problems in future, and will open a new issue.