DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
129 stars 55 forks source link

Symbolicate crash reports don't work on android (react native) #859

Open santiagomariani-tiendanube opened 1 year ago

santiagomariani-tiendanube commented 1 year ago

Bug description

Me and my team started using RUM for error tracking for our React Native app. Tool is awesome but, errors are reported fine, but I'm not able to get to work symbolicate crash reports for android. I used the wizard suggested in the docs run npx datadog-react-native-wizard. Sourcemaps seem to be uploaded fine from what I see on the terminal, but cannot see symbolicated errors for Android. It did work on iOs though. In addition, I also tried to manually upload the sourcemap file, but it did not work either.

I would appreciate any help. Thank you.

Describe what you expected

I expected to see symbolicated errors (see the code lines where the error was thrown). I was able to see this using ios device.

Steps to reproduce the issue

First I ran the wizard npx datadog-react-native-wizard to set up automatic sourcemaps upload.

Then to build my app I ran npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle && ENVFILE=.env.staging react-native run-android --variant=release.

This will upload sourcemaps as you can see here: image

What I see on Datadog:

image

Additional context

Command

None

louiszawadzki commented 1 year ago

Hi @santiagomariani-tiendanube, thanks for reaching out!

From the error message on the screenshot you attached ("Unminification failed"), it looks like a sourcemap was uploaded but it does not match the error stacktrace.

To find the correct sourcemap file for a given error, we take the one that has a versionName (from android/app/build.gradle) matching the version attribute of the error, and that has the highest versionCode (from android/app/build.gradle). If multiple files match, we will use the first one that was uploaded.

If you've uploaded several sourcemaps for a given version, can you make sure to increase the versionCode every time you upload a new sourcemap?

If that is not the root of your error, please reach out to our support team that will be able to help troubleshoot the cause of your issue.