Firebase Crashlytic does not show stack strace with LLD linker Android App

Viewed 354

My project is a simple Android game with native C++ code and Java, which uses cmake to compile C/C++ code.
I upload a my native symbols to Firebase Crashlytic (Fabric ago) to catch my crash if they happens.
I follow the instruction here to setup the crashlytics.

I found one specific problem: the Crashlytic does not show any stacktrace of my App if I use lld linker for C/C++ code.

Here is the config I set to use LLD
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")

Config in build.gradle

    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath 'io.fabric.tools:gradle:1.31.2'
        classpath 'com.google.gms:google-services:4.3.3'
    }

I use crashlyticUploadSymbolsDebug to upload Symbols

The log upload is quiet good.

2020-03-23 15:02:03.664 [DEBUG] (Execution worker for ':') com.crashlytics  - Crashlytics attempting to upload cSYM files.
2020-03-23 15:02:03.669 [DEBUG] (Execution worker for ':') com.crashlytics  - POST file: C:\Users\nhut_\.crashlytics\com.crashlytics.tools\app-f5c61bd8c0ab9f7beacd8e312f884ac1970c43e5\debug\csyms\Breakout-aarch64-2cbd7a2add29f8fbff897f89c43ea0d93088c11f.cSYM.gz to URL: https://cm.crashlytics.com/api/v3/platforms/android/code_mappings
2020-03-23 15:02:03.983 [DEBUG] (Execution worker for ':') com.crashlytics  - POST response: [reqId=c8949d54f956c305a08f1744dabdd9b226b494443224707e] 202
2020-03-23 15:02:03.984 [DEBUG] (Execution worker for ':') com.crashlytics  - POST file: C:\Users\nhut_\.crashlytics\com.crashlytics.tools\app-f5c61bd8c0ab9f7beacd8e312f884ac1970c43e5\debug\csyms\Breakout-aarch64-b0e07c6b9715755bb3b1d881aefe1777a7dcca11.cSYM.gz to URL: https://cm.crashlytics.com/api/v3/platforms/android/code_mappings
2020-03-23 15:02:04.235 [DEBUG] (Execution worker for ':') com.crashlytics  - POST response: [reqId=65ed22d3d2111a7dadc5b61109f7d7664dcd86ba58579c9f] 202
2020-03-23 15:02:04.236 [DEBUG] (Execution worker for ':') com.crashlytics  - cSYM file(s) uploaded.

Do you have any idea how to fix this issue?

My OS is Windows 10 1909 64bit, Android Studio 3.5.1, android-ndk-r21

The devices tested is Pixel 3.

Thanks for your time to read and appreciate with your suggestion.
I found similar question is here but have no answer until now

2 Answers

we're experiencing a similar issue, no symbols in Crahalytics.

  • NDK Version: 21.0.6113669.
  • Crashalytics Gradle Plugin: 2.3.0

Linker:

  1. LLD - no symbols
  2. LLD with linker flag: -Wl,--no-rosegment suggested by Dan Albert within this bug report: https://github.com/android/ndk/issues/1196 - no symbols
  3. Default linker - no symbols.

We're banging our heads, any suggestions are most welcome.

We are still using the r20 NDK, and with it and -fuse-ld=lld there was issue with the native Crashlytics, so we just stopped using it and everything is fine now (native stacktraces are resolved properly in Firebase console)

Related