expo: Expo Splash Screen throws error on release and dev client builds

Summary

Appears to be a new issue with Expo SDK 43 beta, tried with and without <AppLoading>, keep getting the same error:

No native splash screen registered for given view controller. Call 'SplashScreen.show' for given view controller first.
at node_modules/react-native/Libraries/Utilities/RCTLog.js:34:8 in logIfNoNativeHook

[Unhandled promise rejection: Error: No native splash screen registered for given view controller. Call 'SplashScreen.show' for given view controller first.]
at node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:104:50 in promiseMethodWrapper
at node_modules/expo-modules-core/build/NativeModulesProxy.native.js:15:23 in moduleName.methodInfo.name
at node_modules/expo-splash-screen/build/SplashScreen.js:11:17 in preventAutoHideAsync
at node_modules/expo-splash-screen/build/SplashScreen.js:7:7 in preventAutoHideAsync
at node_modules/expo-app-loading/build/AppLoadingNativeWrapper.js:9:8 in AppLoading#constructor
at node_modules/@react-navigation/native/src/useThenable.tsx:26:18 in resolve

[Unhandled promise rejection: Error: No native splash screen registered for given view controller. Call 'SplashScreen.show' for given view controller first.]
at node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:104:50 in promiseMethodWrapper
at node_modules/expo-modules-core/build/NativeModulesProxy.native.js:15:23 in moduleName.methodInfo.name
at node_modules/expo-splash-screen/build/SplashScreen.js:23:17 in hideAsync
at node_modules/expo-splash-screen/build/SplashScreen.js:19:7 in hideAsync

App works in the TestFlight Expo Go client but not when running in a development client or in a TestFlight release build.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

43

Environment

  Expo CLI 4.12.1 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.11.0 - /opt/homebrew/bin/node
      npm: 8.0.0 - /opt/homebrew/bin/npm
      Watchman: 2021.10.04.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.0 - /Users/mark/.nix-profile/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
    IDEs:
      Android Studio: 2020.3 AI-203.7717.56.2031.7621141
      Xcode: 13.0/13A233 - /usr/bin/xcodebuild
    npmPackages:
      expo: next => 43.0.0-beta.3 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.2 => 0.64.2 
    npmGlobalPackages:
      expo-cli: 4.12.1
    Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

I have exactly this logic in my app: https://docs.expo.dev/versions/v43.0.0/sdk/splash-screen/#usage. Worked just fine on Expo SDK 42.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 19 (8 by maintainers)

Commits related to this issue

Most upvoted comments

it happened to me only in production expo sdk 43

App in production stucked in a splash screen.

Happening to me as well, in production only with expo SDK 44. Some users are complaining that the app is stuck on the splash screen, not all the times thought.

that’s great! thank you folks for the confirmation.

@raphaelmsr the RCTDevLoadingView is known issue to react-native 0.64 😔 that’s not critical and only happens in debug build.

i’ve confirmed locally using expo run:ios --configuration Release that this is resolved in release builds after installing the latest versions of sdk 43 beta packages to get @Kudo’s fix. i also no longer see the warning in debug builds.

i am leaving this open and check the eas release build.

@brentvatne I am referring to executing both of these commands: eas build --profile development as well as eas build --profile release with the following eas.json:

{
  "build": {
    "release": {
      "releaseChannel": "production",
    },
    "development": {
      "releaseChannel": "development",
      "distribution": "internal",
      "developmentClient": true,
    }
  },
  "submit": {
    "release": {}
  }
}

In both of those clients, the app hangs on a blank screen with nothing loading, likely due to the warnings I shared in the issue description (I got those warnings in the dev-client, but obviously not in the release build).

It happens to me as well on my dev build. SDK 45 and expo-splash-screen": "~0.15.1. SplashScreen.preventAutoHideAsync(); does not work.

Fixed ! Awesome, you were so fast to address this ticket, updating expo-updates installed expo-splash-screen in a wrong version though (I did not have the package installed prior to updating expo-updates) I had to update to 0.13.5 by myself.

On another note this gave me a new warning saying RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks

@Dakuan could you check if update expo-splash-screen@0.13.5 and expo-updates@0.10.12 help with your problem?

SplashScreen.preventAutoHideAsync has stopped working, both in custom dev client and production builds, so i see a blank screen. Im hacking around it by replacing the blank with a component identical to the splash screen

@raphaelmsr - can you please create a new issue and share a reproducible example?

Hey there ! Also getting a crash upon upgrading to SDK 43 (was building fine on 42) when running

expo run:ios -d in debug mode

This is the log of the crash *** Terminating app due to uncaught exception ‘NSRangeException’, reason: ‘Cannot remove an observer <EXSplashScreenService 0x600000efc960> for the key path “rootViewController” from <UIWindow 0x7fd6bb729f60> because it is not registered as an observer.’

Dont know if this is linked to this issue but thanks to @brentvatne , when I run

expo run:ios --configuration Release

I don’t get the crash (and I didn’t have to update to 43 Beta) So I still can continue my development but only on release

Same for me 😦