Expo Production Mode
See original GitHub issueHello! 👋
Issue Description
I have a React Native application with Expo and I’m trying to throw an error that is triggered by a button.
onPress={() => { throw new Error('This is a test error!'); }}
I’m running the application in Production Mode using expo start --ios --no-dev --minify
to see the error screen and try to simulate a real case, but I’m not able to see it. In development mode, I have no problems following the example demo on Expo: https://snack.expo.io/@carloscuesta/react-native-error-boundary.
Would anyone happen to know how I could go about fixing this issue?
Thanks for the help and time!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Development and production modes - Expo Documentation
Development mode includes useful warnings and gives you access to tools that make development and debugging easier. Production mode minifies your code and ......
Read more >Expo App works fine on development mode but crashes on ...
I run the app in prod mode without --minify arg (expo start --no-dev) and I was able to fix this issue. Debugging I...
Read more >App no longer reloads (production mode) with Expo CLI v2 #67
The app does not refresh any more when changes are done in production mode and even after closing it on Android it is...
Read more >5 common errors found in a React Native app (using Expo)
When creating a mobile app with React Native, you can use Expo to streamline some complexities. Meet the most common errors and how...
Read more >How to Build and Distribute Any React Native App With New ...
This makes your custom client app lightweight and closer to your production environment. To use Development Builds, install the expo-dev-client ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @LucasOliveiraS can you try running the same code from the Expo example in production mode to check if you can see the error screen?
I think the problem is that you’re throwing inside of an event handler and as stated in the React docs, error boundaries don’t catch this
https://reactjs.org/docs/error-boundaries.html#how-about-event-handlers
Hey! 👋🏼
I’ve been not using Expo for a while, but I found this on the docs:
Not sure if this will be of any help but my guess is that Expo is handling the error in
Production
mode reloading the application and you’re not able to see the error screen 😊Could be related with https://github.com/carloscuesta/react-native-error-boundary/issues/37