Expo splash screen shows, then stays there upon error in production

During an app that is in standalone mode, I may get an error or two, and the way that Expo/RN seems to handle it is by showing the splash screen indefinitely. This doesn’t seem to be happening at a point when I’m capturing a Sentry error, which makes the entire process frustrating, because it seems that I need to know what the error is so that I can capture it … but if someone knew that, then they’d just go ahead and fix the error.

Steps to reproduce:

  1. Have an app deployed live
  2. Run into some error

By doing steps 1 and 2, at least on an Android device with SDK 39, when an error occurs, the splash screen will come up and it will stay there. What do people typically do to address errors to prevent this from happening? I’d rather the app crash so that at least the user knows something bad happened.

SDK version: 39
Platforms: Android (so far, I’ve yet to test iOS)

I’ve been able to confirm that sometimes the app will successfully and quickly restart upon encountering an error and other times it will just sit there at the splash screen. I am still trying to either send some kind of message in a bottle to Sentry or display some kind of error message on the screen. In a bit, I suppose the only thing left to will be a brute force try/catch everywhere in the application.

Got around to trying out ErrorBoundary found here: https://reactjs.org/docs/error-boundaries.html

Confirmed that ErrorBoundary is supposed to work in React Native here: Error boundary seems to be failing to catch errors. · Issue #15571 · facebook/react-native · GitHub

ErrorBoundary is not working at all for me. It does mount, but componentDidCatch does absolutely nothing.

So I suspect that this is caused by one of the libraries I have installed, as one person in the GH issue link above says that a conflict with React Navigation was his problem.

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