7

I have the following versions for react native and react native firebase crashlytics.

package.json:

  • react-native: 0.66.4
  • @react-native-firebase/app: 14.2.4
  • @react-native-firebase/crashlytics: ^14.2.4

android project gradle:

  • com.google.firebase:firebase-crashlytics-gradle:2.8.1 android app gradle:
  • implementation platform('com.google.firebase:firebase-bom:29.0.4')
  • implementation 'com.google.firebase:firebase-analytics'
  • implementation 'com.google.firebase:firebase-crashlytics'

According to the document running this line should create a crash.

crashlytics().crash();

This is only working on a release build. However, when I run the app on metro by react-native run-android, this does nothing, it did not create a crash. What can I do to make it crash by running the above line in metro environment?

asked Jan 26, 2022 at 3:16
2
  • I've only done this in ios but what worked for me was to turn the build to release and then turn off debug executable. Maybe that will help Commented Jan 26, 2022 at 6:46
  • I'm having the same issue. My app is not crashing Commented Mar 10, 2023 at 13:17

1 Answer 1

1

i found this solution its working for me

Create a firebase.json file in the root directory of your react-native app, with these Crashlytics-related keys set to these specific values:

{
 "react-native": {
 "crashlytics_debug_enabled": true,
 "crashlytics_disable_auto_disabler": true,
 "crashlytics_auto_collection_enabled": true,
 "crashlytics_is_error_generation_on_js_crash_enabled": true,
 "crashlytics_javascript_exception_handler_chaining_enabled": true
 }
}
answered Jan 19, 2023 at 1:25
Sign up to request clarification or add additional context in comments.

3 Comments

No luck for me . Any other helpful something ?
While connected to metro, after this, i was able to crash the app using crashlytics().crash() from react-native-firebase. However, I am not seeing the crash appear in the firebase console yet, although it does now show "app detected, waiting for crash". I will wait another day and see if it appears.
@JeffPadgett how did it go

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.