React-native-firebase: [crashlytics] Fatal errors not getting caught / reported.

Created on 21 Feb 2019  路  5Comments  路  Source: invertase/react-native-firebase


Fatal errors not getting caught / reported.

I have crashlytics integrated and connected to firebase console.
I can see firebase.crashlytics().recordError(...) in the console. But firebase.crashlytics().crash() fails to record. Logcat says "No record found." on restarting the app.

The same setup works on iOS




Project Files






iOS

ios/Podfile:

  • [ ] I'm not using Pods
  • [x] I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A

Android

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->

Environment

  • Platform that you're experiencing the issue on:

    • [ ] iOS

    • [x] Android

    • [ ] iOS but have not tested behavior on Android

    • [ ] Android but have not tested behavior on iOS

    • [ ] Both

  • If known, the version of the platform are you experiencing the issue on:

    • ADD_SOMETHING_HERE e.g. iOS 10 or Android API 28

  • Operating System:

    • [ ] MacOS, version: N/A

    • [ ] Windows, version: N/A

    • [ ] Other, please specify: N/A

  • Build Tools:

    • 27.0.3

  • React Native version:

    • 0.55.4

  • React Native Firebase library version:

    • 5.2.2

  • Firebase module(s) you're using that has the issue:

    • [ ] N/A

    • [ ] Authentication

    • [ ] Analytics

    • [ ] Cloud Firestore

    • [ ] Cloud Messaging (FCM)

    • [x] Crashlytics

    • [ ] Dynamic Links

    • [ ] Functions Callable

    • [ ] In App Messaging

    • [ ] Indexing

    • [ ] Invites

    • [ ] Instance ID

    • [ ] ML Kit

    • [ ] Notifications

    • [ ] Performance Monitoring

    • [ ] Realtime Database

    • [ ] Remote Config

    • [ ] Storage

  • Are you using TypeScript?

    • [x] No

    • [ ] Yes, version: N/A

  • Are you using Expo, e.g. ExpoKit?

    • [x] No

    • [ ] Yes, I've _not_ ejected

    • [ ] Yes, but I have ejected to ExpoKit

    • [ ] Yes, but I have ejected to vanilla React Native

    • Expo version: N/A




Android Crashlytics >= 6 馃搶 pin

Most helpful comment

Ok, makes sense. I would suggest adding a note about it in the docs. I spend good amount of time trying to figure out why.

All 5 comments

BTW. the issue is only in dev mode. works in production.

This is because RN catches these in Dev so it can display the RedBox; I'm not sure there's anything that can be done about it afaik but I will look at it as part of v6.0.0, you can track this via: https://github.com/orgs/invertase/projects/2#card-17470855


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

Ok, makes sense. I would suggest adding a note about it in the docs. I spend good amount of time trying to figure out why.

Can I clarify here.. so crashes DO NOT, by default get submitted to the dashboard? Unless you do react-native run-ios --configuration Release?

It took me a long time via trial and error to figure that one out.
This should be more clearly stated on Firebase Crashlytics site.
Coming from Fabric Crashlytics, you can have crash logging be reported even in debug mode.

Was this page helpful?
0 / 5 - 0 ratings