Search code examples
androidcrashlyticsgoogle-fabriccrashlytics-android

CrashlyticsListener not triggered by crashes in JNI


I'm setting a CrashlyticsListener like instructed here to get a callback on the next app start after crash occurred. crashlyticsDidDetectCrashDuringPreviousExecution() is triggered if the app has crashed in with a Java exception on previous run, but if it has crashed in JNI it's not triggered.

I'm initializing Crashlytics with NDK support

Fabric.with(FiosSdkApplication.getAppContext(), new Crashlytics(), new CrashlyticsNdk()); 

and I see the crash report being uploaded:

06-08 15:36:03.177 23571-23619/com.organization.test.crashlyticstest I/CrashlyticsCore: Crashlytics report upload complete: 5B1AE89B032E-0001-5B97-8C8248E28ED2

and I see that crash on the dashboard later, but the callback is not being called. Is it supposed to be called after JNI crashes at all? If yes, what am I missing?

The versions of Crashlytics I'm using are the latest I believe:

implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') {
    transitive = true
}
implementation('com.crashlytics.sdk.android:crashlytics-ndk:2.0.4@aar') {
    transitive = true
}

Solution

  • Mike from Fabric here. At the moment, the CrashlyticsListener doesn't support being called from when an NDK/JNI exception happens.