EAS - white screen after splash-screen in production mode on iOS
See original GitHub issueBuild/Submit details page URL
No response
Summary
I have an (two actually) app that is working correctly in a development environment.
- The app launches
- The splash screen appears
- Data are loaded while the splash screen is kept using expo-splash-screen
- The splash screen is hidden when the app is fully loaded
When using expo build:ios -t archive, the app works correctly in production mode as well.
But when I try to use eas to build the app, I am having a white screen after the splash screen, while data are loaded…
Why do I think that this is due tu eas ? The white screen appeared for the first time after I started using eas cli.
I also found out that when I’m using expo publish, then back to the classic expo build, then the white screen is gone.
I tried once again to use eas build, and got the white screen back.
Managed or bare?
Managed
Environment
expo-env-info 1.0.2 environment info: System: OS: macOS 12.2.1 Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 8.5.1 - /opt/homebrew/bin/npm Watchman: 2022.02.28.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.2 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7935034 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild npmPackages: expo: ^44.0.0 => 44.0.6 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 npmGlobalPackages: eas-cli: 0.46.0 expo-cli: 5.3.0 Expo Workflow: managed
Error output
No response
Reproducible demo or steps to reproduce from a blank project
Not really reproducible in a Snack…
But it should be the following :
Create a project, with expo-splash-screen set up as expo documentation.
Publish to production with expo:build
Everything should be fine in production.
Publish to production with eas cli
There should be a white screen after the splashscreen, which might be very quick in a blank project.
It happened to me on two different apps.
Issue Analytics
- State:
- Created 2 years ago
- Comments:30 (4 by maintainers)
Top Related StackOverflow Question
I was running into this same issue and found a solution. As per the instructions I had the
await SplashScreen.preventAutoHideAsync();within auseEffecthook in App.tsx. Even in an otherwise empty file, this did not prevent the SplashScreen from disappearing in production mode. But when I moveSplashScreen.preventAutoHideAsync();directly under the list of imports, or just outside of theuseEffecthook, it works fine!Same approach worked for me. Running
preventAutoHideAsyncoutside of the React hierarchy, as soon as possible in your bundle, should fix the problem.@brentvatne Not sure what’s up here, but it seems like the docs need to be updated.