App is stuck on Splash screen

From March 21 2022 onwards the builds pushed to TestFlight and Google Play are not working. The app is stuck on the splash screen. The older version(March 18 2022) of the app is working as expected.

  • Managed workflow
  • expo-cli-version: 5.3.0
  • eas-cli: our pipe-line still uses the expo-cli for building and uploading the app to TestFlight and Google Play
  • I have reset the code base to March 18 2022 and built again but no luck.
    Any help would greatly helpful.
  • The builds built for simulator are also not working.
  • The code is working fine on Expo-Go app.

Thanks,
Awadeyar

I tried debugging the app almost two days by following the above mentioned documentation. But no luck. The app works fine locally on expo go app and bare workflow as well. But it is not working when it built using commands expo build:android and expo build:ios

1 Like

Are you displaying a modal right after the app starts?

same here, expo go and simulator works fine, but when I do expo publish --release-channel staging or on testflight, the splashSreen does not go away. I do not see any error! please help!!

Hi @qqliang1996

Try running locally in production mode to see if you get more info about the problem:

expo start --no-dev --minify

Also check the device logs.

I had the same problem so I did code review on my code on github and found out that I was importing useState wrongly. Seems to have slipped on an auto import event.

import { useState } from 'react/cjs/react.development';
So I corrected to
import { useState } from "react";

In your case it might be different but I propose searching for any import from ....react.development and correct that.

I resolved it this way and now it works great!!!

1 Like

I have the same issue :frowning:

My issue is similar but only when I enable remote JS debug (that opens Chrome’s DevTools). If I disable this option, the Splash Screen does not get stuck anymore. So kinda weird that it’s only an in-debug mode. FWIW, I am still using expo-app-loading while on SDK 45.

actually, i resolve that by problem by using strict mode, tsconfig.ts.
i changed strict to true then the app works fine.

{
  "extends": "expo/tsconfig.base",
  "compilerOptions": {
    "strict": true,
    "module": "esnext",
  }
}
1 Like

Same issue here. Android version is stuck on splash screen when deployed, but works on emulator, even when using expo start --no-dev --minify.

SDK 45 managed workflow.

Tried to change the build in a few ways and re-deploy it three times now but same issue.
IDK what to do.

Try the other things suggested in the Debugging docs (see Adam’s post from March).

In particular, see if you’re getting anything in the native logs.

Switching the JavaScript engine from JSC to Hermes (or vice versa) might give you some sort of error message you can use to help figure out what’s wrong.

See also expo.fyi/manual-debugging

Hey all,

I faced a similar issue. The app was just stuck on loading screen for my latest build on TestFlight. I spent almost 2 days trying to fix the issue and here’s what I did to finally fix it (sort of). Would appreciate if you guys have any feedback

  1. Ran “expo start --no-dev --minify” the app worked locally as well as expo go.
  2. Next I ran depcheck to remove any unused dependancies. Following which i deleted the package.json and yarn.lock files and reinstalled the packages. (No luck. App was still stuck on loading screen)
  3. Finally I checked to see if i forgot to call SplashScreen.hideAsync() after SplashScreen.preventAutoHideAsync(). However I did call the SplashScreen.hideAsync() function. Therefore, I checked the code that ran before the hideAsync function. I noticed that I was checking for OTA updates before the hideAsync call. I did have a mistake in my code where i was not using a try, catch for fetchUpdateAsync() as mentioned here

However this time i decided to push this update using the EAS update feature and boom!! the app went past the loading screen once it downloaded the new update.

I assumed all was good and so i rebuilt the app using the EAS build command to test if it would open on TestFlight. However, App was stuck again on loading screen. I tried sending a new OTA and it went passed the loading screen again. Has anyone faced this before? I feel like something is wrong with my EAS update setup where my app gets stuck on loading screen the first time it loads but if i use EAS Update the app launches.

1 Like

Update: I feel so stupid. I found out the issue by following the native debugging guide. Ran the app on xcode and turns out it was related to a reference of manifest2 object from expo-constants. The object is only available once EAS update is launched for the first time. So my app was stuck in splash screen until i pushed at least one update. However Manifest2 is not null in expo app running on the simulator.

3 Likes

Don’t feel stupid :slight_smile:

But yes, you should rather use expoConfig

1 Like

I uninstall Expo both Splash Screen, Expo Fonts works for me

[Solved] For me, This was happening only post deployment to app store but was working fine during development
I was also seeing the same behavior the app was stuck on splash screen , so removed Splash screen from and Expo Fonts and then was was to see the app crash with actual error which was [Invariant Violation: requireNativeComponent: “RNSScreen” was not found in the UIManager]

solution was to install - react-native-screens package and it worked …!!

2 Likes

I am having same issues
And yes I am displaying a modal after the app starts

I just wanted to share that I was having this same issue, What fixed it for me was the following:

  1. Do not use react-native-dotenv or call process.env in your code.
  2. Thanks to @anasali91 comment above I went over my SplashScreen code and found that I was using an onLayoutRootView callback function that used a React useCallBack async function, this was also creating the issue, explicitly, I changed the following code:
const onLayoutRootView = useCallback( async () => {
    if (fontsLoaded) {
      await SplashScreen.hideAsync();
    }
  }, [fontsLoaded])

With this code:

const onLayoutRootView = async () => {
    if (fontsLoaded) {
      await SplashScreen.hideAsync();
    }
  }

The two abovementioned changes made the expo publish app work like a charm.