I recently installed this library and have tried other modules without problems like cloud messaging or analytics, but when implementing crashlytics and trying the method to force a crash (crashlytics.crash), the error does not appear in the firebase console even after almost 24 hours.
I followed all the crashlytics installation steps as is in the documentation
import crashlytics from '@react-native-firebase/crashlytics';
render() {
const { gridStyle, notificationCircleStyle, notificationIconStyle } = styles;
return (
<Grid style={gridStyle}>
<Col style={{ backgroundColor: 'transparent', width: 40 }}>
<TouchableOpacity
onPress={() => crashlytics().crash()}
style={{ backgroundColor: 'transparent', flex: 1, alignItems: 'center', justifyContent: 'center' }}
>
<Icon
type="SimpleLineIcons"
name="settings"
style={{ color: 'white', fontSize: 24, alignSelf: platform === 'ios' ? 'center' : 'auto' }}
/>
</TouchableOpacity>
</Col>
....
I am testing on a physical device in debug mode.
React native configuration:
"react": "16.9.0"
"react-native": "0.61.5"
"@react-native-firebase/app": "^6.4.0"
"@react-native-firebase/crashlytics": "^6.4.0"
android/build.gradle:
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.28.1'
https://rnfirebase.io/crashlytics/usage#enable-debug-crash-logs
By setting the firebase.json file with the crashlytics_debug_enabled property to true I could see the error in the console. Thank you very much @andersonaddo .
Do the logs show right away? Or do we have to wait a few hours?
Sometimes that can take a little while, and from my experience the delay depends on the platform at well (I don't remember which one takes longer, I think it's iOS though)
Most helpful comment
https://rnfirebase.io/crashlytics/usage#enable-debug-crash-logs