Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing a white screen with RNRestart.Restart(). #233

Open
saadi-ninjasCode opened this issue Feb 10, 2023 · 14 comments
Open

Showing a white screen with RNRestart.Restart(). #233

saadi-ninjasCode opened this issue Feb 10, 2023 · 14 comments

Comments

@saadi-ninjasCode
Copy link

First of all sorry to recreate the issue, All previously related issues are closed and their solutions are not acceptable anymore because of the latest version of React-Native.

Problem:

There is a white screen when we call RNRestart.Restart().

In the above Solution, people mention the library react-native-splash-screen, which is no longer maintained. While there is another up-to-date library react-native-bootsplash, Previously library has support to show the splash screen (Once splash screen hides).

New Issue

react-native-bootsplash removed support to show the splash screen (Once splash screen hides) in latest version when giving support for Android 12.
-Reason: Can't be possible with AndroidX core splash screen module and zoontek/react-native-bootsplash#354 (comment)

Solution

Any help would be greatly appreciated.

@avishayil
Copy link
Owner

Thanks @saadi-ninjasCode for the detailed issue. Could you please help me in some detailed step in how to replicate the issue?

@saadi-ninjasCode
Copy link
Author

Thanks @saadi-ninjasCode for the detailed issue. Could you please help me in some detailed step in how to replicate the issue?

Yeah Sure,
First of all, You can create a simple RN project and add a button on the screen. On pressing button call the restart function from react-native-restart. You will see a blank white/black (Dependent on mobile theme).
I will provide the Expo Snack for you. But I'm little bit busy now.

@avishayil
Copy link
Owner

Thanks @saadi-ninjasCode for the detailed issue. Could you please help me in some detailed step in how to replicate the issue?

Yeah Sure, First of all, You can create a simple RN project and add a button on the screen. On pressing button call the restart function from react-native-restart. You will see a blank white/black (Dependent on mobile theme). I will provide the Expo Snack for you. But I'm little bit busy now.

Just to understand, like in the gif that is shown on the README, until the app is restarted, white screen is shown?
What would be the expected behavior in your mind?

@saadi-ninjasCode
Copy link
Author

Thanks @saadi-ninjasCode for the detailed issue. Could you please help me in some detailed step in how to replicate the issue?

Yeah Sure, First of all, You can create a simple RN project and add a button on the screen. On pressing button call the restart function from react-native-restart. You will see a blank white/black (Dependent on mobile theme). I will provide the Expo Snack for you. But I'm little bit busy now.

Just to understand, like in the gif that is shown on the README, until the app is restarted, white screen is shown? What would be the expected behavior in your mind?

In my opinion, there should be a splash screen or the icon of an app in the center of the screen (As Android 12 allows only a icon now). Android 12 Splash Screen

@UmerHayyat54
Copy link

any lucky anyone?

@Kailash-dev
Copy link

any update related to this ??

@Ozaoujal
Copy link

Ozaoujal commented Sep 7, 2023

same issue here!

@asadalihazoori
Copy link

i am also facing this issue

@art9mid
Copy link

art9mid commented Nov 1, 2023

same issue

@fukemy
Copy link

fukemy commented Dec 13, 2023

any solution now?

@asadalihazoori
Copy link

facing the same issue
solution required

@ansmlc
Copy link

ansmlc commented Apr 16, 2024

Try enabling hermes.

Is that supposed to help with removing white screen?

I'm using RN 0.73 which should mean Hermes is enabled by default, but have the same issue.

@ansmlc
Copy link

ansmlc commented Apr 16, 2024

For anyone looking for an alternative solution (no white screen):

import { reloadAsync } from 'expo-updates'; 
reloadAsync();

Source: https://stackoverflow.com/questions/57330046/how-to-restart-app-react-native-and-expo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants