SDK 39 SplashScreen Issues

SDK Version: 39
Platforms: Android and iOS

I am having issues with the SplashScreen on SDK 39, I upgraded from SDK 38

I import the splash screen module as specified:

import * as SplashScreen from "expo-splash-screen";

Issue 1 - My apps are getting rejected from App Store connect after upgrading to SDK 39 because “white screen doesn’t go away on app load.” I never had this issue before. I however cannot reproduce this on iPhones I have the app downloaded on, or on any simulator device.

Issue 2 - I cannot get my application to move past a blank white screen on the android simulator. I am assuming it has to do with whatever iOS issue I have. This started after the SDK 39 upgrade.

The warning in the console:

[Unhandled promise rejection: Error: No native splash screen registered for provided activity. Please configure your application's main Activity to call 'SplashScreen.show' (https://github.com/expo/expo/tree/master/packages/expo-splash-screen#-configure-android).]

Is there anything that I missed when upgrading to SDK 39, but the app clearly is not behaving the same way.

2 Likes

It looks like if I comment out

// await SplashScreen.preventAutoHideAsync();

Then the issue resolves, but I also no longer have my desired app open behavior.

Also it seems android.splash.backgroundColor is ignored in built apk and background is always white.

3 Likes

I noticed the ios issues were on ios 14…which I didn’t have installed. So I will report back with more findings on the blank screen on ios 14 after my system is updated.

I can confirm now that after updating my iPhone to ios 14 - I am stuck at a blank white screen

If I force quit the app it goes away and never happens again.

I can reproduce by fully deleting the app and reinstalling it. I get a blank white screen after the splash screen closes…Doesn’t happen again after a force quit. I have a hunch it’s related to whatever android bug with preventAutoHideAsync

EDIT –

It’s inconsistent, but force quitting the app and quickly reopening can reproduce as well with uninstall. I am removing the SplashScreen settings from my app as a temp fix to see if there is a difference once I deploy to app store connect.

can you provide some steps that we can follow to reproduce this? it works as expected on my end. i took the “tabs (TypeScript)” template, which uses splash-screen preventAutoHideAsync via AppLoading, and did a simulator build (expo build:ios - chose simulator) then installed it and it worked as expected. it’s possible that this is caused by a bug in your app code, so a mcve (How to create a Minimal, Reproducible Example - Help Center - Stack Overflow) would be very helpful for us to understand this

I’ve also migrated from sdk38 to sdk39 and moved from expo to expo-splash-screen as stated in guide

We’ve integrated the new expo-updates and expo-splash-screen unimodules into the Managed workflow. If you still import either the Updates or the SplashScreen module from the expo package, you’ll need to install the individual unimodules packages when you upgrade to SDK 39.

This is not clear, shall we keep SplashScreen from expo or use the one from expo-splash-screen. For the second, I have the same kind of message

[Unhandled promise rejection: Error: No native splash screen registered for provided activity. Please configure your application's main Activity to call 'SplashScreen.show' (https://github.com/expo/expo/tree/master/packages/expo-splash-screen#-configure-android).]
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:103:50 in promiseMethodWrapper
- node_modules/@unimodules/react-native-adapter/build/NativeModulesProxy.native.js:15:23 in moduleName.methodInfo.name
- node_modules/expo-splash-screen/build/SplashScreen.js:29:7 in hideAsync
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:293:29 in invoke
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:154:27 in invoke
- node_modules/regenerator-runtime/runtime.js:189:16 in PromiseImpl$argument_0
- node_modules/promise/setimmediate/core.js:45:6 in tryCallTwo
- node_modules/promise/setimmediate/core.js:200:22 in doResolve
- node_modules/promise/setimmediate/core.js:66:11 in Promise
- node_modules/regenerator-runtime/runtime.js:188:15 in callInvokeWithMethodAndArg
- node_modules/regenerator-runtime/runtime.js:211:38 in enqueue
- node_modules/regenerator-runtime/runtime.js:238:8 in exports.async
- node_modules/expo-splash-screen/build/SplashScreen.js:29:7 in hideAsync
* app/screens/Auth/SignIn.js:105:36 in SplashScreenHideAsync
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:293:29 in invoke
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:154:27 in invoke
- node_modules/regenerator-runtime/runtime.js:189:16 in PromiseImpl$argument_0
- node_modules/promise/setimmediate/core.js:45:6 in tryCallTwo
- node_modules/promise/setimmediate/core.js:200:22 in doResolve
- node_modules/promise/setimmediate/core.js:66:11 in Promise
- node_modules/regenerator-runtime/runtime.js:188:15 in callInvokeWithMethodAndArg
- node_modules/regenerator-runtime/runtime.js:211:38 in enqueue
- node_modules/regenerator-runtime/runtime.js:238:8 in exports.async
* app/screens/Auth/SignIn.js:105:36 in SplashScreenHideAsync
* http://192.168.1.41:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:263472:29 in <unknown>
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:15561:31 in commitHookEffectListMount
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:15618:35 in commitPassiveHookEffects
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:265:4 in invokeGuardedCallbackImpl
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:476:2 in invokeGuardedCallback
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18795:29 in flushPassiveEffectsImpl
- node_modules/scheduler/cjs/scheduler.development.js:653:23 in unstable_runWithPriority
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18647:29 in scheduleCallback$argument_1
- node_modules/scheduler/cjs/scheduler.development.js:597:41 in workLoop
- node_modules/scheduler/cjs/scheduler.development.js:552:23 in flushWork
- node_modules/scheduler/cjs/scheduler.development.js:42:17 in _flushCallback
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:130:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:383:16 in callTimers
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:416:4 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:109:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:364:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:108:4 in callFunctionReturnFlushedQueue
* [native code]:null in callFunctionReturnFlushedQueue

Here is my code in App.js

import * as SplashScreen from 'expo-splash-screen';
/.../
SplashScreen.preventAutoHideAsync()
  .then((result) =>
    console.log(`SplashScreen.preventAutoHideAsync() succeeded: ${result}`)
  )
  .catch(console.warn);

and in the SwitchNavigator

React.useEffect(() => {
    const SplashScreenHideAsync = async () => {
      await SplashScreen.hideAsync();
    };
    SplashScreenHideAsync();
  }, []);

I have a white screen displayed after the loading update (displays the splash), then a white screen flash and my SignIn page. In dev, Logbox displays Possible Unhandled Promise Rejection.

Same problem, would love a solution.

Same problem also

The fix for this issue is already on it’s way.
All you need to do is wait for patch release of ExpoClient.
https://github.com/expo/expo/issues/10263#issuecomment-698213132

1 Like

@bbarthec - Thanks, which version will have the fix?

we will be doing an update for the expo client app on ios and android ideally this week, possibly next week, and it will include this fix and some others.

4 Likes

SDK39 update is available : SDK 39++ bug fix release · Issue #10464 · expo/expo · GitHub
Testing if splash issue is fixed … stay tuned …
@hancho can you try on your side ?

@lc3t35 I can confirm my issues are resolved with the patch. No more getting stuck on a white screen on the android emulator even without the try/catch blocks. iOS working great. Followed the instructions in the github issue for install.

1 Like

Did you test on real android device (my app crashed on android 10 with expo 2.17.4 (ok ios and android 9)

Unhandled promise rejection

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