sentry-javascript: ignoreErrors doesnt seems to work

Package + Version

Version:

5.14.1

Description

Sentry.init({
...
ignoreErrors:[
    'Extension',
    ...
],
blacklistUrls:[
    /extensions\//i,
    /^chrome:\/\//i,
],
...
})

Using the above initialization code, but still caught the Extension error in the window system.

image

What is the reason?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 33 (15 by maintainers)

Most upvoted comments

@pawlarius The ignoreErrors option you provided should work!

I know, based on Sentry docs it “should” work, but somehow it don’t. Hence the confusion 😦(

OMG. Exactly the same issue here. it’s interesting that @pawlarius submitted the same comment 3 hours ago.

Sorry, but I don’t understand what you’re saying.

When using the debuge test, the error will be intercepted and not reported, but after it is posted online, I don’t know if the error is triggered and the error is indeed reported.

Hi @lforst thanks for that! I tried debug: true but I’m having difficulty in triggering the error.

It may be hard for me to provide a reproduction example since the issue is actually a non critical error from ResizeObserver.

Somehow Sentry has reported this almost 1K now, but I still can’t see any of those error from my local with sentry debug mode enabled.

Screen Shot 2022-07-05 at 09 48 08

I checked in the docs, sentry ignoreErrors should be matching partial, but does it work if I put a sentences separated by space?

ignoreErrors: ["ResizeObserver loop limit exceeded"],

ResizeObserver spits out it’s errors on the window object which is not logged by default (except by tools like Sentry). Locally, in order to see them you can add window.addEventListener('error', function (e) { console.error(e); }); they will show up in the console when they occur.

We also at first glance had Sentry log a ResizeObserver after it was added to ignoreErrors but it was for sent from the release tag just previous; so double check the version origin not only the timing.

Having the same issue too with @sentry/nextjs version ^6.19.7. Is there a way to debug why sentry keep reporting ignored errors?

@pawlarius There is debug: true in Sentry.init() that will help in some cases but I recommend that you provide a reproduction example for us to effectively debug your issue.