Skip to content

DEFAULT_IGNORE_ERRORS's Facebook mobile browser fails to match when wrapped in something else #23733

Description

@Jiralite

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react-router

SDK Version

10.70.0

Framework Version

No response

Link to Sentry event

https://thatskyapplication.sentry.io/issues/139365437/?project=4510164823375952

Reproduction Example/SDK Setup

Note

I had to tick I am using the latest SDK release, but that is irrelevant.

#15430 added a way to ignore these events by default, but it is wrapped in ^ and $. The issue is here:

// "Script error." is hard coded into browsers for errors that it can't read.
// this is the result of a script being pulled in from an external domain and CORS.
const DEFAULT_IGNORE_ERRORS = [
/^Script error\.?$/,
/^Javascript error: Script error\.? on line 0$/,
/^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.
/^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker
/^Can't find variable: gmo$/, // Error from Google Search App https://issuetracker.google.com/issues/396043331
/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/, // Random error that happens but not actionable or noticeable to end-users.
/can't redefine non-configurable property "solana"/, // Probably a browser extension or custom browser (Brave) throwing this error
/vv\(\)\.getRestrictions is not a function/, // Error thrown by GTM, seemingly not affecting end-users
/Can't find variable: _AutofillCallbackHandler/, // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/
/Object Not Found Matching Id:\d+, MethodName:simulateEvent/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps
/^Java exception was raised during method invocation$/, // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)
];

From my event, I see two:

  1. Error invoking postMessage: Java exception was raised during method invocation
  2. Error invoking postMessage: Java object is gone

It fails to match.

Steps to Reproduce

Go to packages/core/test/lib/integrations/eventFilters.test.ts and add the two strings above as tests.

Expected Result

Both dropped, as #15430 intended.

Actual Result

Alerts are still arriving for what should be ignored by default.

Additional Context

No response

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions