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

Android release created with no artifacts after local expo build #3776

Closed
5 of 11 tasks
joeporpeglia opened this issue Apr 24, 2024 · 2 comments
Closed
5 of 11 tasks

Android release created with no artifacts after local expo build #3776

joeporpeglia opened this issue Apr 24, 2024 · 2 comments

Comments

@joeporpeglia
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 5.20.0

react-native version: 0.73.6

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: 'https://...@sentry.io/...'
  // other options
});

or

(react-native-sentry)

Sentry.config(
  'https://...@sentry.io/...'
  // other options
 ).install();

I have the following issue:

When I build my app and to run in local dev mode it creates a release in our sentry dashboard. The release matches the version defined in my expo app config, but it uses 1 for the build number. This issue was observed after upgrading from 5.19.1 to 5.20.0.

Steps to reproduce:

  • expo run:android (i started the dev server in a separate terminal and ran on my physical device)

Actual result:

The app builds and runs on device as usual, but a release is created in sentry.

Expected result:

No release is created for local builds. I also tried SENTRY_DISABLE_AUTO_UPLOAD=true expo run:android, but it still creates the release.

@krystofwoldrich
Copy link
Member

krystofwoldrich commented Apr 29, 2024

Hi @joeporpeglia,
thank you for the message,

releases are created dynamically based on the events sent to Sentry.

If you have Sentry enabled in your local builds release is automatically created.

To avoid this you can disable Sentry for local builds:

Sentry.init({
  enabled: !__DEV__,
})

Or you can create a manual release for all of your debug releases:

Sentry.init({
  release: __DEV__ ? 'debug@1.0.0' : undefined,
  dist: __DEV__ ? '1' : undefined,
})

Let us know if this works for your setup?

@joeporpeglia
Copy link
Author

Okay got it - that setup works as expected. Thanks @krystofwoldrich!

Some additional context I missed in the original issue: With 5.19.1 we used the beforeSend hook to log errors in development instead of sending to sentry, so it seems like that behavior might have changed wrt release creation in 5.20.0

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

No branches or pull requests

2 participants