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)
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 -
firebase/messaging
working as expected for a while, so app indeed connected to cloud projectpod install
install
|| build
partsAny help will be appreciated, really can't figure what I'm missing
edit -
Have also tried crashlytics().recordError
, same result
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