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.