react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

How to use crashlytics??

Open sarathvad1811 opened this issue 8 years ago • 7 comments

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

sarathvad1811 avatar Aug 07 '18 05:08 sarathvad1811

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();

Ehesp avatar Aug 09 '18 10:08 Ehesp

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

sarathvad1811 avatar Aug 10 '18 08:08 sarathvad1811

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 avatar Aug 10 '18 12:08 Ehesp

@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?

dantn93 avatar Oct 25 '18 14:10 dantn93

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

JMV2112 avatar Jan 22 '19 20:01 JMV2112

any news about this?

ammoradi avatar Apr 12 '19 22:04 ammoradi

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.

pguatura avatar Jun 28 '19 13:06 pguatura