datadog-ci icon indicating copy to clipboard operation
datadog-ci copied to clipboard

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

Open santiagomariani-tiendanube opened this issue 2 years ago • 1 comments

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

  • Node version: 18.13.0
  • React Native: 0.70.4
  • @datadog/mobile-react-native: 1.5.1
  • @datadog/mobile-react-navigation: 1.5.1
  • @datadog/datadog-ci: 2.8.1
  • Both bundle and sourcemap files together sum like 10mb, so it's far from the 50mb limit.

Command

None

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.

louiszawadzki avatar May 09 '23 11:05 louiszawadzki