There are couple reasons that the crash is not uploaded: 1) the mapping file is not uploaded to New Relic; 2) the uploaded mapping file is not the right one
What is mapping file?
When Proguard is used to obfuscate the APK files, a mapping file will be generated during each build. When a crash occurs, the stack trace will contain many obfuscated class/method names and the mapping file can be used to de-obfuscate the crashes stack trace.
Why my crash is obfuscated?
The mapping file is not uploaded.
If this is the case, you can manually upload mapping files as below steps:
(1) Get the mapping file. It’s located in
build/outputs/mapping/release/mapping.txtin your application module’s directory, or
build/outputs/proguard/release/mapping.txt if an older version of Proguard or Android Studio is used.
(2) Then confirm if the UUID is appended to the
mapping.txt. If not, you can manually add the below line to the bottom of the mapping file.
# NR_BUILD_ID -> [the UUID for this specific build]
You can find the UUID in the crash details page: the value for
App Image Uuid attribute. Below is an example from my test app:
(3) Manually upload the mapping file by using the below command:
curl -v -F upload=@"mapping.txt" -H "X-APP-LICENSE-KEY:<APPLICATION_TOKEN>" https://mobile-symbol-upload.newrelic.com/symbol
Replace the following in your command:
<mapping.txt>is the path to the ProGuard mapping.txt file.
<APPLICATION_TOKEN>is your New Relic Mobile application token.
(4) Wait for a few minutes and refresh the Crash details page.
The mapping file is not for that specific build.
If you manually uploaded the mapping file but the crash is still obfuscated, then the mapping file is probably not for the build where the crash happened. To confirm this, you can try de-obfuscating the crash locally as below steps.
Download the obfuscated stack trace from the crash details page(ex: my crash trace file is named as stacktrace.txt).
The easiest way to do the next step is to copy your
If you are on Mac book/Linux, run the following command in the same directory as the files (For Windows users, replace “retrace.sh” with "retrace.bat”.):
retrace.sh -verbose mapping.txt stacktrace.txt > out.txt
If the mapping file is correct, out.txt will have the stack trace de-obfuscated and can be uploaded as above mentioned.
If the out.txt is still obfuscated, you probably are using a wrong mapping file or you don’t have the class configured in Proguard file. Make sure to use the correct mapping file or check Android doc for the Progurard configurations https://developer.android.com/studio/build/shrink-code#keep-code