Sentry react native has duplicate releases

We integrated react native into an existing Android app, sentry is integrated in the react native app, when we release a new version of the app, the release number gets listed twice on the releases list.

Check the attached image:

This is some kind of UI “bug” on our site, click on the link and check the URL.
You will notice that they are different, we only strip the bundleID from the UI.

The links for the releases are the following:

However we only set the release from React native, does initializing Sentry from Android beside initializing it from React native create the second release in the list ?

Yes, we update the gradle script to upload it under app-identifer-version which seems to be your second release.
You have to remove apply from: "../../node_modules/react-native-sentry/sentry.gradle" this from your project gradle file.

We upload the source map files manually from the command line, I don’t think the gradle plugin uploads them

I believe there should be some documentation to warn users not to do Sentry.setRelease(version) in their app if they use the default gradle plugin config to upload the source maps. This is what led to these duplicate releases in my case.

The gradle plugin takes care of creating a release by uploading the source maps. This release is called app-identifer-version but web ui will only show version. (This should probably be documented somewhere).

Then, Sentry.setRelease(version) was being in our app. So all the issues were sent to the version release, which is missing the artifacts.