We are building the same app with 2 different ways, (we must roll back to Expo Build because it works), one is with EAS Build, wich is the new way to build apps for Expo, the other way is the classic Expo Build.
With EAS Build, the build is successful (after alot of setup), but after installing the app, on runtime, show a splash screen and then a white screen, this is not happening with Expo Classic Build, in this case it works normally.
Both builds with the exactly same code.
No logs are thrown
EAS Build:
APK size: 59 Mb
Time: much longer.
Runtime: White Screen after Splash Screen.
Expo Build:
APK size: 65 Mb
Time: much faster.
Runtime: OK
We also used some time to get EAS up and running. It was before my summer vacation, so my memory is a bit fussy
We had some issues with the entry point of our app. We ended up having an App.tsx in our root with following code
import 'react-native-gesture-handler';
import AppStart from 'src/AppStart';
import { registerRootComponent } from 'expo';
// We need to registerRootComponent for local development with Expo GO app
registerRootComponent(AppStart);
// We need to export the app for expo EAS build services
export default AppStart;
But best way to see what is going on is to attach a logger to your device and see what is happening:
register root component is not necessary since sdk 18, if you init new expo project no changes are necessary to build for eas, you just need to add eas.json
there is a lot of ways that it might be caused, check logs with adb or android studio, few common issue that it could be:
you are using incompatible packages(it might work in classic builds because versions there affect only js not native code)
you didn’t specify some env values in eas.json that are required in your app.config.js or in your code(if you set those envs locally it won’t be available on worker)
please use expo run:ios or expo run:android to debug your issue locally. classic builds and eas build are entirely different build systems and there could be any number of reasons that this issue could occur, likely it is related to one of the libraries you are using that is not in the expo sdk and therefore would be difficult for us to provide support on.
you will need to investigate this issue on your own unless you can provide a minimal reproducible example that demonstrates it is an issue with our tooling.
this is happening only in eas release builds
this is only happening in release builds of your app - the fact that it happens on EAS is not relevant. you can use expo run as i suggested above to reproduce this locally. you can open the project in xcode or android studio after doing so and set breakpoints and debug further. or you can follow this manual debugging advice for a more brute force approach.
you can use expo run as i suggested above to reproduce this locally.
I’m telling you this happens only in release builds with EAS.
It works with Expo Go.
It works with Expo Dev Client.
It works with Classic Builds
It works with Local Development.
The only way this not works it’s after Building with EAS Build for Release.
We are going to make a minimal reproducible repository to be able to share the code, @notbrent please delegate this ticket to another member of your team with help mentality, i think you are not able to help.
a build on eas build is just a release build. so you can do expo run:ios --configuration Release or expo run:android --variant release to create the same result.
if indeed this works as expected, you now know an important factor: something about running the build on your computer vs on eas build is different. so you may want to then investigate your environment variables set in eas.json or in secrets.