1

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
}
Paul
  • 13,042
  • 3
  • 41
  • 59

1 Answers1

1

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

Mike Bonnell
  • 16,181
  • 3
  • 61
  • 77
  • Thanks. Still, Crashlytics correctly detects that there was a crash because it uploads the information about it to the servers. Do you have any suggestion how can the app figure out if there was a crash? – Paul Jun 18 '18 at 19:10
  • Unfortunately I don't know of a good workaround on the NDK side of things. – Mike Bonnell Jun 20 '18 at 20:58