Search code examples
androidiosreact-nativecrashlyticsgoogle-fabric

How to send crash report without relaunching app


Is there any way to send crash report to fabric's dashboard without the need to relaunch the app in both android and iOS ?


Solution

  • Mike from Fabric here. On iOS, the crash is always sent on relaunch of the app and not prior. When an app has crashed, the device is in a bad state and it's risky to try and send the crash report then. In our testing, if we try to send the crash then and something else "bad" happens, there is a risk of needing to restart the entire device. In order to avoid that happening, we store the crash locally in a cache and resend it when the app is relaunched with an active network connection.

    On iOS, this can lead to a follow up question around crashes happening during launch. If your app crashes on launch, on the subsequent launch we will try to send a crash report synchronously blocking the main thread for a short period of time. We provide a delegate if you want to change this behavior.

    On Android, due to OS differences, we try to send the crash report to a background thread to be sent without relaunch. If that fails, we again cache the report locally and try again when the app is launched post-crash.