Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

white screen on Expo Updates #2292

Open
JoezerSmaniotto opened this issue Mar 18, 2024 · 4 comments
Open

white screen on Expo Updates #2292

JoezerSmaniotto opened this issue Mar 18, 2024 · 4 comments
Labels
eas update needs review Issue is ready to be reviewed by a maintainer

Comments

@JoezerSmaniotto
Copy link

Build/Submit details page URL

https://expo.dev/accounts/pnt-mobile/projects/pnt-mobile-v2/submissions/8d921270-fa2c-4531-8595-eb1d0c36aa8f

Summary

Using Expo Update, when receiving updates/Checking for updates, a WHITE SCREEN appears? I found a similar error https://stackoverflow.com/questions/70705994/expo-api-for-app-updates-resulting-in-blank-white-screen In my case I have the following error, whenever there are updates the project starts checking for updates, leaving the screen blank for a few seconds, after which it is directed to the project's home screen, without the need to close the project on Android

I am running update check in app.ts with the following code.
codeUpdate

useEffect(() => { async function onFetchUpdateAsync() { try { const update = await Updates.checkForUpdateAsync(); if (update.isAvailable) { await Updates.fetchUpdateAsync(); await Updates.reloadAsync(); } } catch (error) { console.log(Error fetching latest Expo update: ${error}); } } if (!__DEV__) { onFetchUpdateAsync(); } }, []);

codeUpdate

Managed or bare?

managed

Environment

WARNING: We recommend using PowerShell or Bash via WSL 2 for development with Expo CLI on Windows. You may encounter issues using cmd.exe.

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check for issues with metro config
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check that packages match versions required by installed Expo SDK
✔ Check that native modules use compatible support package versions for installed Expo SDK

Didn't find any issues with the project!

Error output

No response

Reproducible demo or steps to reproduce from a blank project

Using Expo Update, when receiving updates/Checking for updates, a WHITE SCREEN appears? I found a similar error https://stackoverflow.com/questions/70705994/expo-api-for-app-updates-resulting-in-blank-white-screen In my case I have the following error, whenever there are updates the project starts checking for updates, leaving the screen blank for a few seconds, after which it is directed to the project's home screen, without the need to close the project on Android

However, when running "npx expo-doctor" to check the project configuration and compatibility of dependencies with the Expo SDK, I got this return.
codeUpdate

I am running update check in app.ts with the following code

useEffect(() => { async function onFetchUpdateAsync() { try { const update = await Updates.checkForUpdateAsync(); if (update.isAvailable) { await Updates.fetchUpdateAsync(); await Updates.reloadAsync(); } } catch (error) { console.log(Error fetching latest Expo update: ${error}); } } if (!__DEV__) { onFetchUpdateAsync(); } }, []);

codeUpdate

@JoezerSmaniotto JoezerSmaniotto added the needs review Issue is ready to be reviewed by a maintainer label Mar 18, 2024
@vargajacint
Copy link

Hey @JoezerSmaniotto,
Did you found any solution?

@JoezerSmaniotto
Copy link
Author

JoezerSmaniotto commented May 8, 2024

yes @vargajacint , inside eas.json I added "EX_UPDATES_ANDROID_DELAY_LOAD_APP": "false"
build->production->env

{
"cli": {
"version": ">= 3.9.1",
"requireCommit": true
},
"build": {
"common": {
"node": "18.16.0",
"ios": {
"resourceClass": "m-medium"
}
},
"production": {
"extends": "common",
"distribution": "store",
"channel": "production",
"env": {
"EX_UPDATES_ANDROID_DELAY_LOAD_APP": "false"
}
},
"development": {
"extends": "common",
"developmentClient": true,
"channel": "development",
"distribution": "internal"
},
"preview": {
"extends": "common",
"distribution": "internal",
"channel": "preview"
}
},
"submit": {
"production": {}
}
}

@vargajacint
Copy link

@JoezerSmaniotto Thank you.

I had the same problem on iOS, for me, the solution was removing the Alert.alert calls in the App.tsx file (lol)

@WellingtonSouzaAbreu
Copy link

I had the same error, the .env environment variables were not configured correctly in eas secrets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eas update needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants