React-native-firebase: How to use crashlytics??

Created on 7 Aug 2018  路  7Comments  路  Source: invertase/react-native-firebase

There's no proper documentation how to use crashlytics... Please provide a proper documentation on how to use that....
TIA

Most helpful comment

@Ehesp Hi guy, I use react-native-firebase 5.0.0 and test the crashlytics on android emulator but it raises bug: "length=2; index=10". How can I fix it?

All 7 comments

Crashlytics works out of the box once installed, and will automatically show any crashes a user experiences on console.

If you'd like to force your own, you can use the methods here: https://rnfirebase.io/docs/v4.3.x/crashlytics/reference/crashlytics

E.g:

firebase.crashlytics().crash();

Where do I need to initialise user details or set a boolean value or set a string globally ?? like everytime a crash happens I need to initialise some details @Ehesp

Anywhere in your app's lifecycle. For example right in the componentDidMount of your "root" component, or even outside of a component. As long as you set any values as soon as you're able to, they'll get sent with any subsequent crash reports.

@Ehesp Hi guy, I use react-native-firebase 5.0.0 and test the crashlytics on android emulator but it raises bug: "length=2; index=10". How can I fix it?

Per the comment mentioned by @dantn93 is also happening on a physical device.

any news about this?

If you are using the method mentioned above, it throws the reported crash. That method is used to test if the reports are getting to the dashboard. The documentation https://rnfirebase.io/docs/v5.x.x/crashlytics/reference/crashlytics shows some methods to track non-fatal errors.

Was this page helpful?
0 / 5 - 0 ratings