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.

Splash Screen gets stuck when using multiple bundles

See original GitHub issue

Bug report

Summary

When using another library like react-native-threads, the splash screen will show up (and get stuck) every time a new worker is spawned.

I assume this is happening because the worker is actually a new bundle instance being created in the background, and perhaps the code that checks for development reload is thinking that the worker is actually a reload.

I assume this is a problem with both iOS and Android, however, I’m only able to use the first platform at the moment.

Environment info

react-native info output:

 BUNDLE  ./index.js <--- splash screen hides normally

 LOG  Arguments [49, [49, 54, 49, 54, 57, 57, 51, 54, 57, 56, 48, 56, 49]]
 LOG  Running "myapp" with {"rootTag":1,"initialProps":{}}
 BUNDLE  ./worker.js <-- splash screen comes back as soon as a worker is spawned.
 
 BUNDLE  ./worker.js 

 BUNDLE  ./worker.js 

 BUNDLE  ./worker.js 

Library version: 3.2.0

Steps to reproduce

  1. Use any library that spawns multiple bundles for multiprocessing (like the one I’m using).
  2. The splash screen will hide for a quick second and will immediately come back after the worker has been spawned (and it will be stuck).

Describe what you expected to happen:

  1. The splash screen should come up and hide only in the root bundle (eg. BUNDLE ./index.js).
  2. The splash screen should not interact with different bundle names (that is: BUNDLE ./index.js != BUNDLE ./worker.js).

Reproducible sample code

Just run the usage code after installing react-native-threads and hiding the splash screen for the first time (a setTimeout helps in making sure you see the hiding animation, but not necessary).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
vrazncommented, May 6, 2021

Solved the problem.

For some reason had the [RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView]; line before the [self.window makeKeyAndVisible]; and it somehow worked on the 3.2.0 version and was breaking on 3.2.3. Followed the docs & it worked. image

Sorry for misleading you @zoontek!

2reactions
abelyeupearcommented, May 6, 2021

I can confirm that 3.2.3 fixes this! Also, @vrazn I think that the docs might have changed that recently because we had the same situation with the order of operations as you did.

So, to anybody reading this in the future:

  1. Upgrade to 3.2.3+.
  2. Make sure the order of your AppDelegate.m code is the same as @vrazn 's suggestion.
Read more comments on GitHub >

github_iconTop Results From Across the Web

uploaded app bundle but app is stuck on splash screen
issue: I developed an app that works fine in the development environment. Then I ran expo build:android --type app-bundle , allowed the ...
Read more >
Expo react-native app suddenly stuck on Splash Screen
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle...
Read more >
flutter_native_splash | 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. ... When your...
Read more >
Expo Stuck on Splash Screen - Jorge Colon Consulting
So I thought maybe there was some caching weirdness going on with Expo, so I tried clearing the bundler cache, but that didn't...
Read more >
expo-splash-screen - npm
By using this resize mode your app will will leverage Android's ability to present a static bitmap while the application is starting up....
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