uploaded app bundle but app is stuck on splash screen

issue:
I developed an app that works fine in the development environment. Then I ran expo build:android --type app-bundle, allowed the Keystore to be generated automatically and uploaded the app bundle to Google Play Console and made it available for internal testers.

However, once the app is installed on the tester’s phone and the Open button is tapped it gets stuck on the splash screen and will not go any further. The tester has tried restarting the phone, Force Stop the Google Play app, Clear Data and Clear Cache for Google Play app, uninstall/reinstall the app. None of these have helped. What would cause this behavior? What steps should I take next to debug/resolve this issue?

log from expo diagnostics:
Expo CLI 3.28.0 environment info:
System:
OS: Linux 5.4 Ubuntu 18.04.5 LTS (Bionic Beaver)
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 12.13.1 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/bin/yarn
npm: 6.12.1 - /usr/local/bin/npm
npmPackages:
expo: ^39.0.0 => 39.0.3
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2
react-native-web: ~0.13.7 => 0.13.18
npmGlobalPackages:
expo-cli: 3.28.0
Expo Workflow: managed

Note that the Expo-CLI was updated globally on this machine since the previous post, thus the difference in versions between the posts.

This may be a clue - a peer dependency related to splash screens is missing for the globally installed Expo-CLI package.

I’d like to install the missing peer dependency of expo-splash-screen@* and see if it resolves the issue of the app being frozen on the splash screen.

I went to https://www.npmjs.com/package/@expo/configure-splash-screen#-installation which directs readers to another package, expo-splash-screen. Since my app is an Expo managed app I went here https://github.com/expo/expo/tree/master/packages/expo-splash-screen#-installation-in-managed-expo-projects. This page says “Managed Expo projects use the older SplashScreen module within the expo package ( import { SplashScreen } from 'expo' ).”

So, does this mean there isn’t a way to install this missing peer dependency for a managed Expo app?

the peerDependency warnings are unrelated.

the most likely case is that something unexpected is happening in your app and hideAsync() for splash screen isn’t called. it’s very common for developers to keep splash screen visible with preventAutoHideAsync() or AppLoading and then not handle a condition that would cause hideAsync() to never be reached (eg: maybe you use await loadSomething() and then later hideAsync() but don’t wrap the loading function in try/catch).

try out the tips here: https://docs.expo.io/workflow/debugging/#production-errors

basically, when the splash screen doesn’t hide it’s because there is something in your app preventing it from happening. so i would look towards your app code to try to see what might happening. also, you can build an apk with expo build:android to test it in your local emulator or easily install it on your device without going to the play store, if you’re unable to reproduce it using production mode locally in expo client.

@notbrent - Your reply was instrumental in getting to the bottom of this issue. The “frozen on the splash screen” behavior was reproducible by running the app locally in Production mode using expo start --no-dev --minify, as detailed in the link you provided. I had been unaware of that command previously. By going back to earlier versions of the app and running them locally in Production mode it was possible to isolate where the issue was introduced. The root cause turned out to be animation code. Once that code was removed the app worked normally both in local Production and in Google Play for internal testers. Hooray!

1 Like

great to hear!

Is this after upgrading SDK versions? If it is, let me know what version you’re upgrading from.

Also, do you see this error if you run it locally in production mode via expo start --no-dev --minify ?

@gilberton Yes, the “frozen on the splash screen” behavior was reproducible when run locally in production mode using expo start --no-dev --minify. After the animation code was removed from the project then the app ran normally when that command was issued.

The app was originally developed using Expo SDK 36 but when an app bundle was built it would not upload to the Google Play Store which is what triggered upgrading the project to SDK 39. The upgrades were done one at a time (36 --> 37, 37 --> 38, 38 --> 39) but all on the same day.

The “frozen on the splash screen” behavior first surfaced when an app bundle was built and uploaded to the Google Play Store after the SDK upgrades. That is when I became aware of the issue and when I learned how to run an app locally in Production mode. I don’t know if this behavior occurred in any of the SDKs prior to 39 because I never tried running expo start --no-dev --minify in the earlier versions (being unaware of the command expo start --no-dev -minify at that point).

Here is updated expo diagnostics output:
Expo CLI 3.28.2 environment info:
System:
OS: Linux 5.4 Ubuntu 18.04.5 LTS (Bionic Beaver)
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 12.13.1 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/bin/yarn
npm: 6.12.1 - /usr/local/bin/npm
npmPackages:
expo: ^39.0.0 => 39.0.3
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2
react-native-web: ~0.13.7 => 0.13.18
npmGlobalPackages:
expo-cli: 3.28.2
Expo Workflow: managed

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.