androidcrashlyticscrashlytics-android

Android app firebase crashlytics debugging info: how to troubleshoot?


I set up Firebase crashlytics following's Google's instructions (https://firebase.google.com/docs/crashlytics/get-started?platform=android&authuser=1#add-sdk), then I purposely crashed the app in order to see something in the firebase console, as per https://firebase.google.com/docs/crashlytics/test-implementation?authuser=1&platform=android.; this page also suggests turning on the crashlytics debug logging, which I did. The logging ends with:

D/FirebaseCrashlytics(23841): Crashlytics is handling uncaught exception "java.lang.RuntimeException: Unable to start activity ComponentInfo{com. ... .TabActivity}: java.lang.NumberFormatException: Invalid int: "abc"" from thread main
D/FirebaseCrashlytics(23841): Persisting fatal event for session 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Finalizing report for session 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Opening a new session with ID 603B9693009B00025D21614184AB1DFB
D/FirebaseCrashlytics(23841): Crashlytics automatic data collection ENABLED by global Firebase setting.
D/FirebaseCrashlytics(23841): Logging Crashlytics event to Firebase
D/FirebaseCrashlytics(23841): Awaiting app exception callback from FA...
D/FirebaseCrashlytics(23841): Received Analytics message: 3 Bundle[{params=Bundle[{_o=clx, _r=1, timestamp=1614517907044, fatal=1}], name=_ae, timestampInMillis=1614517907169}]
D/FirebaseCrashlytics(23841): App exception callback received from FA listener.
D/FirebaseCrashlytics(23841): Crashlytics report successfully enqueued to DataTransport: 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Crashlytics completed exception processing. Invoking default exception handler.

According to this SO post, I should be expecting, after "Crashlytics report successfully enqueued to DataTransport", some lines like

TransportRuntime.CctTransportBackend: Making request to with subsequent 
TransportRuntime.CctTransportBackend: Status Code: 200

But it wasn't there.

People also say it takes 24-48 hours for crash data to show up in the console, rather than "up to 5 minutes" like what Google says. But it is over 48 hours now.


Solution

  • Even though this was for Android, an important clue was found in the iOS instructions on testing with a forced crash, namely, that the app should run long enough the next time, or in a subsequent run, that it has time to send the crash logs to Firebase. If you fake an automatic crash early in the app lifecycle for testing purposes, it may not have time to send the data about earlier crashes when it starts again later, before it crashes again.