React-native-firebase: crashlytics.crash doesn't show error in Firebase Console (Android)

Created on 22 Apr 2020  路  4Comments  路  Source: invertase/react-native-firebase

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'

Most helpful comment

All 4 comments

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)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

romreed picture romreed  路  3Comments

Draccan picture Draccan  路  3Comments

callmejm picture callmejm  路  3Comments

NordlingDev picture NordlingDev  路  3Comments

alizahid picture alizahid  路  3Comments