Skip to content

ignoreErrors stopped working #6173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
geryit opened this issue Nov 9, 2022 · 8 comments
Closed
3 tasks done

ignoreErrors stopped working #6173

geryit opened this issue Nov 9, 2022 · 8 comments

Comments

@geryit
Copy link

geryit commented Nov 9, 2022

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which package are you using?

@sentry/nextjs

SDK Version

7.18.0

Framework Version

React 18.2.0

Link to Sentry event

https://sentry.io/organizations/carbon/issues/3727932656/?referrer=slack

Steps to Reproduce

We upgraded Sentry from 7.17.4 to 7.18.0 and our ignored strings are started to be logged again.

our conf looks like this

Sentry.init({
  dsn: SENTRY_DSN,
  environment: process.env.NEXT_PUBLIC_SENTRY_ENV,
  enabled: !process.env.CI,
  ignoreErrors: [
    /Failed to register a ServiceWorker for scope/,
    /Hydration failed because the initial UI does not match what was rendered on the server/,
    /There was an error while hydrating/,
    /Minified React error #418/,
  ],
});

Expected Result

errors not to be logged

Actual Result

errors are logged

@AbhiPrasad
Copy link
Member

Hey @geryit, we could not reproduce this issue. Can you provide a reproduction for this issue?

@geryit
Copy link
Author

geryit commented Nov 21, 2022

@AbhiPrasad this is happening in https://carbonhealth.com

@bobvandevijver
Copy link

Maybe this is related to what I am seeing in #6287? Seems to be also some sort of filtering bug.

@github-actions
Copy link
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@geryit
Copy link
Author

geryit commented Dec 16, 2022

We are still having this issue

@tiagojdf
Copy link

I have recently seen some errors that were ignored show up.

@lforst
Copy link
Member

lforst commented Jan 16, 2023

If you're having this issue please provide a reproduction example we can use to debug. Thanks!

@geryit
Copy link
Author

geryit commented Jan 17, 2023

We fixed our problem using beforeSend.

const ignorableErrors = [
  /Failed to register a ServiceWorker for scope/,
  /Hydration failed because the initial UI does not match what was rendered on the server/,
  /There was an error while hydrating/,
  /Minified React error #418/,
];


beforeSend(event, hint) {
    const errorMsg = hint.originalException?.toString();
    if (errorMsg && ignorableErrors.some(regex => regex.test(errorMsg))) {
      return null;
    }
    return event;
  },

@geryit geryit closed this as completed Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants