Firebase crashalytics hang loading - RN

Viewed 187

I have RN project which I like to connect it ErrorBoundry into crashalytics

export default class ErrorBoundry extends React.Component<any, IState> {
    state = { hasError: false }

    static getDerivedStateFromError(error) {
        console.log('crash', { error })
        crashlytics().log(JSON.stringify({ error }))
        return { hasError: true }
    }

    render() {
        return this.state.hasError ? (
            <View style={globalStyles.errorFullScreenContainer}>
                <Text style={globalStyles.errorFullScreenText}>{i18n.t('generic-error')}</Text>
            </View>
        ) : (
            this.props.children
        )
    }
}

I did all relevant steps from docs here, but still dashboard loads (for more than a day after manually throwing few errors and getting into ErrorBoundry screen in build env)

this is screenshot

Relevant package.json

"@react-native-firebase/app": "12.0.0",
"@react-native-firebase/crashlytics": "12.0.0",
"@react-native-firebase/messaging": "12.0.0",
"react-native": "0.61.5",

Notes -

  1. firebase/messaging working as expected for a while, so app indeed connected to cloud project
  2. This also the issue with ios, though accords docs here, there is no further step after auto pod install
  3. No errors in the terminal in install || build parts

Any help will be appreciated, really can't figure what I'm missing

edit - Have also tried crashlytics().recordError, same result

2 Answers

hope you are doing well. Here are the steps I have done to pass through the loading page:

  1. Make sure you have correctly installed the firebase packages and added the firebase config file into your project as the document stated: document

  2. Open the firebase console and go into the crashlytics page (the screenshot you have shown in this question)

  3. You need to manually make a crash in your app. Please call the below function somewhere inside your app (better assign to a button and click it to trigger)

    crashlytics().crash()
    

I think you should have done the step 1 & 2,
so what you have missed should be just manually crash the app.
Please try on your side and tell me your result. Cheers!

For future people fustrated by that,

It took 5 days, but suddenly dashboard appeared. Hang tight

Now new logs take about 2-3 hour ish

Related