React-native-sentry, Android sourcemaps uploaded but not matched

Hi,

We just switched from sentry-cli to react-native-sentry. Our source maps get correctly matched on iOS but not on our Android app where it seems that sources are not found although artifacts uploaded.

Version of the packages used:

"react-native": "0.46.4"
"react-native-sentry": "^0.22.0"

Artifacts are uploaded correctly and linked to the correct version:

But generated crashed don’t get linked to the release and sentry output error telling that source code was not found:

There was 1 error encountered while processing this event
Source code was not found for index.android.bundle

Not sure what we are doing wrong since we used react-native-sentry link and it’s working on iOS.

# build.gradle
project.ext.sentry = [
    logLevel: "debug",
    flavorAware: false
]

# app.js
SENTRY_DSN=https://<login>:<password>@sentry.io/<projectid>
Sentry.config(Config.SENTRY_DSN).install();

Any clue ?
Thanks,
Boris -

Hey @boris.gougeon, can you send me the link to the event I want to take a look at it.

Hey @HazAT thanks for the quick reply.

Event can be found at:
https://sentry.io/allocab/driver/issues/345685872/

You can find a release wth ios and android artifacts here: https://sentry.io/allocab/driver/releases/com.allocab.mdm.driver-5.1.0/

Boris -

So the upload of the artifacts in the release section looks fine.
But there seems to be something wrong with the frames url, it should be prefixed with app:// instead there is no prefix at all.
Have you changed something there?

We haven’t changed anything in the react-native-sentry package.

We are using 0.22.0

 yarn list | grep sentry
├─ react-native-sentry@0.22.0
│  ├─ sentry-cli-binary@^1.19.1
├─ sentry-cli-binary@1.19.1

Is this related to the method RNSentryModule::convertToNativeStacktrace ?

StringBuilder finalFileName = new StringBuilder("app:///").append(calculatedFileName);

Why the extra ‘/’ ? What filename do you see server side ?
Thanks -

No, that’s fine with three slashes.
Have you disabled the native integration?
It looks like raven-js is sending the event instead of our java native client.
The SDK information on the bottom of the event should say sentry-react-native instead of raven-js.

Still, I will check that since it should also correctly work with just raven-js.

https://github.com/getsentry/react-native-sentry/pull/236

Excellent, we indeed found out that RNSentry was not initialized due to bad code inclusion on our end (and therefore Raven implementation was used). We managed to generate native crash on Android linked to a Release, and it showed a detailed stack-trace.

One thing we noticed though: environment is not sent when sending native android crashes: https://sentry.io/allocab/driver/issues/352477679/

It shows up correctly on JS crashes though: https://sentry.io/allocab/driver/issues/352480826/

Thanks again for your help,
Boris -