I just set up Crashlytics for iOS and Android today, and it's almost successful. On the Firebase console when setting up crashlytics for iOS and Android, each tutorial reaches a spot where it "waits" for your app to start up and connect to the API. That worked perfectly, both Android and iOS detected the install and connected to my Firebase project properly.
I then tried doing the test crash with the code firebase.fabric.crashlytics().crash()
in my index.js file. On iOS, this worked correctly, and the crash shows up in the Firebase console. However, on Android the crash is not reported. One of the interesting differences was that on iOS, the project did not show the red react-native error screen on the crash, but on Android it did show that screen. In iOS, the app just closed right when it crashed, but Android just popped open the red error screen. Is this intentional, and should I be seeing the crash in my console? I have waited a few hours and tried again, but to no avail.
This takes sometime, seems very unpredictable to me, This should be documented.
It's definitely working, because I'm getting crash info now from my builds in the console (you know, with actual crashes)! But the forced crash never showed up.
For me it(forced crash) worked. From my understanding its not realtime and takes sometime.
I'm going to close this based on the comments. Seems like it just takes some time to filter through.
I struggled a lot with this issue, while transitioning to Crashlytics and getting stuck in the forced crash() not being reported. After trying many things, I Finally solved it by running the app in release mode:
react-native run-android --variant=release
IMO, it should be mentioned in the documentation (or at least I couldn't find it when I was trying it).
Hope this helps.
Interesting. I am getting crashes reported on the release version of my app Android that my testers are using, but I never had the forced crash reported. Maybe could use some clarification in the docs if this is the case?
I'm having the same problem.
Maybe what's happening is that the "RedBox" exception handler in dev mode is swallowing the exception so Crashlytics can't get it.
If this is the case I think noting it in the docs is pretty important!
Confirmed. Has to be in Release mode to send crash reports.
I never got the force crash, but I will say that I started getting tons of crash reports from emulators in debug mode and in release mode. Actually had to implement the right logic to turn it off so it would _only_ report in release mode!
I struggled a lot with this issue, while transitioning to Crashlytics and getting stuck in the forced crash() not being reported. After trying many things, I Finally solved it by running the app in release mode:
react-native run-android --variant=release
IMO, it should be mentioned in the documentation (or at least I couldn't find it when I was trying it).
Hope this helps.
GRACIAS!!! THANKS!!! It works!!! :)
Most helpful comment
I struggled a lot with this issue, while transitioning to Crashlytics and getting stuck in the forced crash() not being reported. After trying many things, I Finally solved it by running the app in release mode:
react-native run-android --variant=release
IMO, it should be mentioned in the documentation (or at least I couldn't find it when I was trying it).
Hope this helps.