Expo App Stuck on Splash Screen | Fix
While developing a React Native app with Expo, I encountered an issue where my app would get stuck on the splash screen. This can happen in different scenarios:
- During development in Expo Go
- In production builds
- After upgrading Expo SDK
- In iOS simulator or TestFlight builds
Let me share all the solutions that worked for me and others in the community.
Quick Solutions to Try First
- Clear Expo Cache and Restart
- Remove node_modules and Reinstall
Common Causes and Solutions
1. React Native Screens Not Installed
One common cause is missing or improperly installed react-native-screens
. Here's how to fix it:
2. Incorrect Import Statements
Sometimes auto-imports can cause this issue. Check for and fix any incorrect imports:
3. UUID Resolution Issues
If you're using UUID in your project, remove it from resolutions in package.json:
4. Modal or Alert on App Launch
If you're showing a modal or alert immediately when the app launches, it can cause the splash screen to hang:
5. Xcode Related Issues (iOS)
If you're facing this on iOS, try:
6. Debug Statements
Remove any debugger statements in your code as they can cause hanging:
Production Build Specific Solutions
1. Clean Build Directories
2. Check SplashScreen Configuration
Make sure your splash screen is properly configured in app.json:
3. Manual Splash Screen Control
If you're manually controlling the splash screen, ensure proper implementation:
Development Environment Fixes
- Update Expo CLI
- Update Expo Go App Delete and reinstall the Expo Go app on your device/simulator.
Prevention Tips
To prevent this issue in future:
- Always use the latest stable versions of Expo SDK and dependencies
- Test thoroughly after adding new dependencies
- Keep development environment updated
- Use expo-doctor to check for common issues:
When Nothing Works
If none of the above solutions work:
- Create a new Expo project
- Gradually move your code to the new project
- Compare configurations between working and non-working projects
- Check for differences in dependencies and versions
Remember to always test your app thoroughly after applying any of these fixes, especially before deploying to production.