Splashscreen does not hide and throws an exception on iOS
See original GitHub issueBug 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
- Attempt to hide the splashscreen on iOS 14.1 on a physical device, using the RN version and library version above
- It will not hide, and throw the promise exception.
- It doesn’t matter if you try hiding in
componentDidMount
, or even later in the process (I tried anonLoadEnd
for an image that’s shown on my main app screen).
Describe what you expected to happen:
- 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:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!
Thanks for the update. I’ve been swamped to get a release out the door. I will most certainly try the proper fix ASAP.