-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
App stuck on white screen when launched from deep link while in background (android) #2741
Comments
@ThomasDelteil Every other time my app gets stuck on the white screen as it starts. It's not good because FCM is unable to send notifications to the app when it's in the background. |
Same here, RNN 1.1.397, RN 0.51.0, Android |
@ThomasDelteil Just curious - have you found a solution yet? |
In the end it wasn't happening on my actual device, but only on the emulator. Looks like some race condition. I have since moved to a different project so I haven't investigated further. |
Is this related to this - #2180 - does going to multitasking mode and coming back fix it? |
I've posted a comment with a potential solution that may be related to this here. Try it out and see if it works for you, but note as I said there, don't ship code with this hack!. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The issue has been closed for inactivity. |
Issue Description
When deep linking into the app, while the app is in background, from an external link using a custom scheme a la
myapp://
the app is stuck on a blank screen on Android. It works fine on iOS, both from background and first launch. Android works fine for first launch.I found somewhat similar issues reported several time, I tried a patchwork of the proposed fixes, none of them worked.
If someone knows what is happening in the lifecycle of the android activity when coming back from background that would cause such issue, that would be nice.
Steps to Reproduce / Code Snippets / Screenshots
Code is as follows:
app.android.tsx
relevant part of base Component class inherited by all the screens, including Home:
The android-logs show that, after clicking on a deep-link in the browser:
Environment
The text was updated successfully, but these errors were encountered: