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.

Splashscreen does not hide and throws an exception on iOS

See original GitHub issue

Bug report

Summary

Textbook implementation according to the docs. The first screen in my app attempts to hide the splashscreen. On Android, this works fine, on iOS, an error is thrown. If I manually comment out that check in the native hide method in the lib, everything works as expected.

Possible Unhandled Promise Rejection (id: 0):
Error: A bootsplash task is already pending

Environment info

react-native info output:

System:
    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
    Memory: 24.37 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.2 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /Users/kim/.rvm/rubies/ruby-2.5.1/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6241897
    Xcode: 12.1/12A7403 - /usr/bin/xcodebuild
  Languages:
    Java: 9.0.4 - /usr/bin/javac
    Python: 2.7.15 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.3 => 0.63.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 3.0.2

Steps to reproduce

  1. Attempt to hide the splashscreen on iOS 14.1 on a physical device, using the RN version and library version above
  2. It will not hide, and throw the promise exception.
  3. It doesn’t matter if you try hiding in componentDidMount, or even later in the process (I tried an onLoadEnd for an image that’s shown on my main app screen).

Describe what you expected to happen:

  1. The splashscreen should hide

Reproducible sample code

I will try to add a minimal repo over the weekend if the iOS/RN/lib version combination alone doesn’t offer enough of a starting point for reproduction.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
AlexeyVlasenkocommented, Nov 22, 2020

@AlexeyVlasenko Did you read my answer ?

Hi! I’m sorry. Looks like issues with XCode cache on Big Sur. Twice build-cache reset + bundler reset fixed issue after upgrading to 3.1.0 Now all works fine!

0reactions
kbrandwijkcommented, Nov 24, 2020

Thanks for the update. I’ve been swamped to get a release out the door. I will most certainly try the proper fix ASAP.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove splash screen for iOS - cordova - Stack Overflow
1- with ngCordova : ; 2- with navigator.splashscreen : According to many solutions I use navigator.splashscreen.hide() but in this way I get this...
Read more >
SplashScreen (Java Platform SE 8 ) - Oracle Help Center
Hides the splash screen, closes the window, and releases all associated resources. Throws: IllegalStateException - if the splash screen has already been closed ......
Read more >
flutter_native_splash 2.0.1+1 | Flutter Package - Pub.dev
Customize Flutter's default white native splash screen with background color and splash image. Supports dark mode, full screen, and more.
Read more >
SplashScreenManager - A Cross-thread exception is thrown ...
I am experiencing some weird problems with SplashScreenManager, Assemblies not references, cross threading actions etc.
Read more >
Common Flutter errors
This is another common layout error you could run into while creating a UI in your Flutter app. What does the error look...
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