question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android][expo-splash-screen] No longer working without call to SplashScreen.show(...) on react-native@0.68

See original GitHub issue

Summary

After running expo-upgrade, expo-splash-screen no longer works unless I reintroduce the lines that were recently removed >12.0.0.

I have tried this on 2 separate projects, one with and one without Expo installed, and seems like the root cause is react-native@0.68.1 not playing well with this library. Added back the lines below and the splash screen started showing again.

// SplashScreen.show(...) has to be called after super.onCreate(...)
// Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually
SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class, false);

Error:

No native splash screen registered for given view controller. Call 'SplashScreen.show' for given view controller first.

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

bare

What platform(s) does this occur on?

Android

SDK Version (managed workflow only)

SDK 45 beta-8

Environment

expo-env-info 1.0.3 environment info:
    System:
      OS: macOS 12.4
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
      Yarn: 1.22.18 - ~/.yarn/bin/yarn
      npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
      Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
      Android SDK:
        API Levels: 29, 30, 31, 32
        Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0
        System Images: android-31 | Google APIs ARM 64 v8a
        Android NDK: 21.4.7075529
    IDEs:
      Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
    npmPackages:
      expo: ^45.0.0-beta.8 => 45.0.0-beta.8 
      react: 17.0.2 => 17.0.2 
      react-native: 0.68.1 => 0.68.1 
    Expo Workflow: bare

Reproducible demo

On a new bare project (with or without Expo), install expo-splash-screen and run through the splash screen setup.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
Kudocommented, May 2, 2022

hi @thespacemanatee! could you help to create a minimal reproducible example and upload to a github repository? i tested on a new sdk 45 project and it works for me. with the minimal reproducible example, maybe we can find out what i missed in the repro. thanks!

0reactions
github-actions[bot]commented, Aug 11, 2022

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SplashScreen - Expo Documentation
The SplashScreen module from the expo-splash-screen library is used to tell the splash screen to remain visible until it has been explicitly told...
Read more >
No native splash screen registered for given view controller ...
Call 'SplashScreen.show' for given view controller first. I get the following warning only on my ios emulator when I first launch the app....
Read more >
@mattlisiv/reactnative-splashscreen - npm
A splash screen API for react-native which can programatically hide and show the splash screen. Works on iOS and Android. Content. Changes ...
Read more >
Add a splash screen to a React Native app - Medium
Also note that I'm not an iOS nor Android developer, so some steps may surely be improved. I'll be happy to read how...
Read more >
How to Make a React Native Splash Screen | Waldo Blog
However, right now we have no control over how long the splash screen appears. But we can fix that using a custom module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found