I am using firebase crashlytics. I am causing a crash by doing
firebase.crashlytics().crash()
and I am not seeing the crash report on the fireb
its stupid from Firebase Teams, but the solution is :
1- Force the crash
2- Launching the app with ide or cli
3- stop launching app from ide or cli
4- launch the app from smilator like user normal
And you will see the crashs in firebase console.
TL;DR: run react-native run-android --variant=release
for Crashlytics to begin working properly, assuming you've set everything up correctly (which it certainly appears you have since firebase.crashlytics().crash()
is crashing your application.)
Please note - in order for react-native run-android --variant=release
to function properly, you will have needed to configure your APK for release builds according to the directions here: https://facebook.github.io/react-native/docs/signed-apk-android
PROOF OF CRASHLYTICS PROPERLY REPORTING AS OF THE WRITING OF THIS ANSWER. I've never been happier to see my crash free users rating decrease :)
Let me know if you have any questions! Setting up signing can be a little confusing, so let me know if you have any questions.
This is a very frustrating issue, but fortunately, I've found the solution and I'm in exactly the same boat you are.
See that big red screen? That's React Native's way of telling you, during development, that you've made some kind of mistake. What isn't immediately obvious is that this red screen prevents errors from making it through to our error reporting tools. Running your app in release mode will prevent React Native from showing that red screen, and your error reporting tools will be able to report crashes.
As Gian has pointed out in another answer to this question, it appears that firebase.crashlytics().crash()
is not functioning properly. However, this isn't quite true. Whenever you are operating in debug mode (anytime you can see the red screen, you're in what I'm calling debug mode), Crashlytics and other crash reporting tools cannot catch Native Exceptions, but they can catch Javascript exceptions.
Once you run the application in release mode as I’ve described above, Crashlyitcs will be able to catch Native Exceptions. If you look into Crashlytics.crash(), it’s actually an crash intentionally written in Java. In order for Crashlytics to actually ‘hear’ that the application is crashed due to a Native Exception, you have to be running in release mode, not debug mode.
Sorry for beating the dead horse down here, but I’ve been looking into this issue all morning and felt it pertinent to share this information to others suffering the same fate as I was.
firebase.crashlytics().crash() its not working properly.
I purposely made a bug to simulate a crash when i tap a button and that crash was caught and shown in the Crashlytics Dashboard inmediately.
Ej: I work with React Native so i changed a this.props.etc... to this.state.etc... to create an "undefined is not a function exception".
Hope it helps!
It will definitely help you
Now run the App
And crash your app manually. Now you can check on your crashlytics dashboard
Try this as well
In iOS you need to unlink the app from Xcode so that it doesn't freeze when a crash occurs.
For more details on this, see here in the Firebase documentation.