These are the sort of errors I’m talking about:
In my ExpoKit SDK 32 app, I have sentry-expo configured, and I get all sorts of errors that are typically “yellowbox” in development (e.g., unhandled promise rejection) reported, but I’ve never seen an error that appears in the “blue screen” above reported (which as I understand from the docs should be any redbox errors). So my questions:
Is the expected behavior that sentry-expo reports all of the errors that would generate a restart / result in a blue screen?
Can I subscribe to an event to see these errors in JS? It sounds like componentDidCatch might do it. Then at least I could generate custom Sentry errors.
Is there any way to suppress the blue screen? It’s the one part of my apps where the Expo branding bleeds through (and I don’t really like showing raw error debug messages to my users). I’d rather the app just crashes, then at least I’d get a Play Store console crash report.
sentry-expo is just a wrapper for react-native-sentry, so it shouldn’t have different behavior than it. I believe this is the expected behavior. I’ve seen a couple ways of catching all errors just by searching previously, so I don’t know if there’s an established “best practice”, but I think your method would work fine.
For (3)- This is actually planned right now (although I don’t have an ETA for you, yet) You can keep track of it here
Thanks for the info @charliecruzan!
(this is this somewhat notorious error: https://github.com/facebook/react-native/issues/17530
What’s kind of confusing is that both of these errors generate redboxes in development, but I guess I can see the difference between the two and why one might get picked up and the other not.
Any way you could point me in the direction of what code causes the bluescreen to display (e.g., a link to the source in Github?). I’ve tried and not been able to track it down. Wondering if I could figure out something to intercept the error in native code so I could report on it.
Mmm… wish I could point to one place, but I don’t think it’s that centralized. Afaik, all uncaught native errors result in the (disheartening) blue screen
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.