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?
1 Answer 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
}
}
3 Comments
Explore related questions
See similar questions with these tags.
releaseand then turn offdebug executable. Maybe that will help