Google Play crash logs not symbolicated with Android App Bundle
Asked Answered
S

1

10

We have recently updated our apps to use Android App Bundles (aab) and to also include arm64 native libs.

Since doing so, our crash logs in native code in the 'Google Play Console'->'Android Vitals'->'ANRs & Crashes' are not symbolicating correctly (java callstacks symbolicate fine).

A snippet from a typical callstack looks like this:

  #21  pc 000000000015addc  /data/app/com.mycompany.mygame-2/split_config.arm64_v8a.apk
  #22  pc 0000000000293768  /data/app/com.mycompany.mygame-2/split_config.arm64_v8a.apk
  #23  pc 0000000000294cf0  /data/app/com.mycompany.mygame-2/split_config.arm64_v8a.apk

The issue affects crashes from both armv7 and arm64. Occasionally a bug will have a properly symbolicated callstack, approximately 10% are symbolicated properly now. Prior to the use of AAB and arm64, we were seeing almost all callstacks symbolicated correctly.

To work around this, we investigated using Crashlytics, but had trouble getting a properly symbolicated callstack that way also. As we haven't used Crashlytics before it is difficult for us to know whether it suffers from the same issue or whether we simply setup Crashlytics incorrectly. However, this post indicates that other users may be having trouble with AABs and Crashlytics.

Is anyone else experiencing similar difficulties?

Are there any known workarounds?

Has anyone updated to use AABs and is not seeing any problem with crash report symbolication in the Google Play console?

Shutter answered 3/5, 2019 at 9:6 Comment(2)
I believe you can take the stack as above and feed the addresses to addr2line utility in your NDK toolchain. You will need to provide the unstripped so file that corresponds to the version embedded in PlayStore aab.Preinstruct
Does this answer your question? Crashlytics Missing NDK symbols with android app bundleBlockhouse
N
18

Edit: The NDK 21 RC1 should fix this issue.

This seems related to the fact that native libraries are kept uncompressed in the APK.

By adding the following option in your gradle.properties, you can disable it:

android.bundle.enableUncompressedNativeLibs=false

You'll need to release a new App Bundle built with this option.

Norean answered 3/5, 2019 at 12:38 Comment(12)
Sounds promising, thanks. Might be a week or so until I can turn around an update to find out whether it helps, but I'll report back when I do.Shutter
Keep in mind that disabling this feature will make your app bigger on users' devices since the platform then has to extract the native libraries to be able to load them.Norean
Yes, that seems to have fixed it. Thank you! (little bounty on its way)Shutter
I had the exact same problem and this fixed it for me, thank!. @Norean do you know if there's anyway to fix this problem without this flag?Boloney
A team at Google is looking at addressing this issue. Note that in the latest canary of Gradle, this flag won't be marked as unsupported.Norean
Is this still being an issue? Because I'm receiving some identical crashes in the Play Console but if I add the '''enableUncompressedNativeLibs=false''', then a warning appears saying that the option is experimental and unsupported. I guess it's not a problem anyway to set this configuration.Flair
The warning has been removed in a later version of the Android Gradle plugin.Norean
The latest NDK should fix this issue.Norean
@pierre do you mean the latest NDK means we no longer need to use enableUncompressedNativeLibs=false at all, or that the latest NDK means we'll no longer get the warning about the option being experimental and unsupported?Shutter
With the latest NDK you will get full symbolicated stacktraces like before without this gradle property. Re the warning, it shouldn't be there already in the latest Gradle version.Norean
@Norean Which NDK version would fix this?Cullender
NDK 21 RC1: developer.android.com/ndk/downloads#beta-downloadsNorean

© 2022 - 2024 — McMap. All rights reserved.