Search code examples
androidcrashlyticscrashlytics-android

didCrashOnPreviousExecution() not clearing


Firebase Crashlytics updated and the CrashlyticsListener crashlyticsDidDetectCrashDuringPreviousExecution() is replaced by didCrashOnPreviousExecution().

The old listener resided in the onCreate() method of a BaseActivity. If there was a crash, the old listener would get called by any activity ONCE and work would be performed (pop up message to end-user, email crash report, etc.)

With this new API, didCrashOnPreviousExecution() is getting called every time an onCreate() is called. It is not clearing itself, and every onCreate() is popping up repeat message to the end-user and emailing multiple duplicate crash reports for the same crash that happened in the last runtime.

I've emailed Firebase about this and requested a work around or bug fix, but if anyone else has some insight on what to do to avoid this new behavior I'd greatly appreciate it!


Solution

  • I brought this up to the Firebase team and this was my response from them.

    tldr; they will fix in a new release of Firebase Crashlytics.

    Discussing with the team, it was mentioned that perhaps the difference in behavior can be attributed to the fact that it used to be a callback and is now a synchronous API call. I will go ahead and file a feature request on your behalf to get that behavior back. Please keep an eye on our release notes for more information on new features and fixes.