Skip to content
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

Getting duplicate events/issues for almost every error #4407

Open
melyux opened this issue Jan 1, 2025 · 4 comments
Open

Getting duplicate events/issues for almost every error #4407

melyux opened this issue Jan 1, 2025 · 4 comments

Comments

@melyux
Copy link

melyux commented Jan 1, 2025

For almost every Expo app error, I get the same error reported to Sentry twice.

  1. As the normal issue, e.g. TypeError Cannot read property 'status' of undefined.
  2. As this kind of issue: Error currentScopes.withScope$argument_0(@sentry/core/build... — TypeError: Cannot convert undefined value to object This error is located at: ...

This wasn't happening until recently. I do have captureConsoleIntegration({ levels: ['error'] }), on, but I'm not doing any manual console.error() calls where the errors occur.

Any clue why?

@antonis
Copy link
Collaborator

antonis commented Jan 2, 2025

Thank you for reporting @melyux 🙇

This wasn't happening until recently.

Which versions of Sentry react-native SDK are you using? Are you experiencing this after an upgrade?

Could you also provide the following information to help us track down the issue?

  • Your Sentry.init()
  • Expo SDK version
  • React Native version

@melyux
Copy link
Author

melyux commented Jan 2, 2025

We're on Expo SDK v52.0.20 and RN v0.76.5. Here's our Sentry.init():

    Sentry.init({
        environment: Constants.expoConfig?.extra?.EXPO_PUBLIC_APP_VARIANT,
        dsn: Constants.expoConfig?.extra?.EXPO_PUBLIC_SENTRY_DSN,
        integrations: [
            captureConsoleIntegration({ levels: ['error'] }),
            Sentry.mobileReplayIntegration({
                maskAllText: false,
                maskAllImages: false,
                maskAllVectors: false,
            }),
        ],
        _experiments: {
            replaysSessionSampleRate: 0.1, // 10% of user sessions are recorded
            replaysOnErrorSampleRate: 1.0, // 100% of user errors are recorded
        },
        attachStacktrace: true, // Enable to to attach stack traces with the console messages too
        ignoreErrors: [
            'Firebase: Error (auth/network-request-failed).',
            'RemoteServiceException$CannotDeliverBroadcastException',
            'currentScopes.withScope$argument_0', // Duplicate errors to Sentry for some reason
        ],
    })

Added the last ignoreErrors line in an attempt to get rid of the duplicates as a workaround.

@antonis
Copy link
Collaborator

antonis commented Jan 3, 2025

Thank you for the added information @melyux 🙇
We will investigate this and iterate back.

Which versions of Sentry react-native SDK are you using?

@melyux
Copy link
Author

melyux commented Jan 3, 2025

We're on @sentry/react-native version 6.3.0

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Status: Needs Discussion
Development

No branches or pull requests

2 participants