react-native-firebase crashlytics not showing up on firebase dashboard
Asked Answered
C

6

20

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 firebase dashboard. The crash is working because on android i get this screen enter image description here

and on ios the app freezes and i get brought to this page on xcode

enter image description here

But on the crashlytics dashboard on firebase the crashes are not showing up.

Is there any reason why the crashes are not showing up on crashlytics dashboard? I am using react-native-firebase. I know i installed it correctly because I tried causing the crashes natively on android with java and I am able to see the crash on crashlytics.

Calycle answered 31/1, 2019 at 15:43 Comment(5)
you need to wait a while before it shows in the dashboard, it's not realtime. usually 24~48 hours.Vibrissa
i have been at this for like a week. And when I cause the crash natively via java on android, the crash is showing up immediately. So i dont think thats the problemCalycle
@TenzinChoklang did you find any solution for this?Spiffing
@Spiffing yeah for me firebase.crashlytics().crash() was not working properly, so I crashed it by not reurning anything in the render. Also try not to run it development mode, as from what I understand the development server can intercept the log thus not being received by firebaseCalycle
@TenzinChoklang I believe you are absolutely correct and have gone into a little more detail about how to resolve the issue in my answer below. Please help me ensure it is accurate: https://mcmap.net/q/618955/-react-native-firebase-crashlytics-not-showing-up-on-firebase-dashboardCorotto
C
21

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

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.

Corotto answered 7/5, 2019 at 10:57 Comment(1)
Task 'installRelease' not found in project ':app'. Some candidates are: 'uninstallRelease'.Ceolaceorl
B
8

In iOS you need to unlink the app from Xcode so that it doesn't freeze when a crash occurs.

  1. Build the App.
  2. Stop the project in Xcode without terminating the simulator or device.
  3. Then you can crash without Xcode freezing.
  4. Reopen the app so that Firebase can send the crash report.

For more details on this, see here in the Firebase documentation.

Brachial answered 14/9, 2019 at 2:36 Comment(0)
I
3

It will definitely help you

  1. Go to Edit Scheme
  2. Run -> Info
  3. Change the Build Configuration to release.
  4. Now run the App

    And crash your app manually. Now you can check on your crashlytics dashboard

Try this as well

  1. Launch your simulator/iPhone
  2. Press stop
  3. Launch your app and force a crash
  4. Relaunch the app from simulator/iPhone
  5. See the crash report in the crashlytics dashboard.
Ictus answered 4/3, 2020 at 10:53 Comment(1)
Yes, it definitely helped me. Thanks! Worked better than theinvertase guide.Inductive
A
2

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!

Advocation answered 5/4, 2019 at 16:7 Comment(1)
firebase.crashlytics().crash() is functioning properly for me. Please see my answer and perhaps it will help you as well: https://mcmap.net/q/618955/-react-native-firebase-crashlytics-not-showing-up-on-firebase-dashboard I think this comes down to the fact that Javascript based errors will be caught by Crashlytics, but native errors won't. Since firebase.crashlytics().crash() causes a native exception, that'w why we don't see it in (what I'm assuming you're running) debug mode.Corotto
D
1

which version of @react-native-firebase/crashlytics do you have on your package.json?

you'll need to use one of the versions released after June 2020 because otherwise it doesn't have the Fabric removal change. For example, I have to update to

"@react-native-firebase/app": "11.2.0",
"@react-native-firebase/crashlytics": "11.2.0",

Here you can check versions available: https://www.npmjs.com/package/@react-native-firebase/crashlytics

Draconic answered 5/5, 2021 at 19:16 Comment(0)
H
-3

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.

Haith answered 9/12, 2020 at 15:0 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.