a7ul / react-native-exception-handler

A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.
MIT License
1.59k stars 134 forks source link

Integration with crashalytics (Firebase) #86

Open ButuzGOL opened 6 years ago

ButuzGOL commented 6 years ago

I have found issue that when i am using 'react-native-exception-handler' crash report doesn't sends to server i am using https://github.com/invertase/react-native-firebase

a7ul commented 6 years ago

Is this happening with JS error or Native exceptions ? @ButuzGOL

ButuzGOL commented 6 years ago

Its happening with JS error i did simple case call of this.renderHeader() <= this function doesn't exists

my code

setJSExceptionHandler(async (error) => {
  if (error) {
    logger.log(String(error));
    logger.send();
    Alert.alert(t('logs.someError'), t('logs.needRestart'), [
      {
        text: t('Restart'),
        onPress: () => {
          RNRestart.Restart();
        },
      },
    ]);
    throw new Error(error);
  }
  return true;
}, true);
farahty commented 5 years ago

amazing lib ,,,, any update @ButuzGOL for this issue , is this issue can be solved by this

onlybenyang commented 5 years ago

@ButuzGOL you should add log of react-native-firebase in JSExceptionHandler function yourself so as to see the log on firebase