Skip to content

Enabled in Sentry.init Doesn't Seem to Work on Android Physical DeviceΒ #3722

Description

@tao-qian

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • [] iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.15.1

react-native version: 0.71.14

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: XXX,
  environment: __DEV__ ? 'development' : 'production',
  tracesSampleRate: 1.0,
  beforeBreadcrumb(breadcrumb, hint) {
    return null;
  },
  enabled: !__DEV__,
});

I have the following issue:

When we run the app on Android physical device, traces would still be sent to server even with enabled set as false in Sentry.init. This doesn't happen on emulator.

Steps to reproduce:

  • run npx react-native run-android to install a development build on Android physical device
  • trigger some exception

Actual result:

Nothing should be reported to Sentry because enabled is false.

Expected result:

Issues are still reported.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions