Sentry with Expo is not reporting crashes


#1

Hi Everyone!

I just integrated sentry-expo package into my app and set up all the needed steps to make it work (changes in App.js and app.json files).

Everything was going great, the app was working well and I could report my first crash. Sadly, after that first crash, I wasn’t able to report a new one. No matters what I do, I can’t receive a new crash error on my Sentry board.
If I use the methods Sentry.captureException or Sentry.captureMessage, I do receive a new issue on my Sentry board.

Of course, I need to report the unknown crashes but captureException/captureMessage are not enough.

Do you have any idea why I could receive one crash report and after that, I am not able to receive new ones?

Hope that someone could help me, thanks!


#2

How did you make it crash the first time? Are you sure it’s not just consolidating crash reports?


#3

Hi @jesse , thanks for your answer!

Looks like I was wrong in my description… Sentry is reporting well, but not always.

For example, if I generate an error (undefined is not an object) on methods like componentDidMount() or render(), Sentry does not report them at all. I have to try/catch the code inside them and report the error manually through Sentry.captureException(error)
But, it is a kind of weird because when a generate the same error on an event like an onPress button or onTextChange input, Sentry reports the error perfectly.

I noticed that in the first case (for example, componentDidMount() method) when the error occurs the application dies (red screen and error is displayed on the console). But in the second case (onPress() method) the application does not die, the application is still opened but of course, does not execute the code below the error.

Do you have any idea why could happen this? I don’t want to put all my componentDidMount() or render() methods code inside a try/catch… I wonder if Sentry could report the errors no matter where they are generated.


#4

Hmm sounds like it might be an issue with how Sentry interfaces with react-native. I’m not an expert on how that works - are there any issues in the Sentry repo about this?


closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.