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

Fix onHostPause crash on Android #7812

Merged
merged 3 commits into from
Nov 19, 2023
Merged

Fix onHostPause crash on Android #7812

merged 3 commits into from
Nov 19, 2023

Conversation

yogevbd
Copy link
Collaborator

@yogevbd yogevbd commented Nov 13, 2023

This fixes a crash happening in the Wix app, look like there's a race condition where the activity is destroyed and navigator.onHostPause() gets called too late and should always be called at front of queue. Most of times this shouldn't be delayed as it is called on the main thread.

This is the crash:

Location
NavigationModule.java line 213 in com.reactnativenavigation.react.NavigationModule.navigator
Exception
java.lang.NullPointerException
Message
Attempt to invoke virtual method 'com.reactnativenavigation.viewcontrollers.navigator.Navigator com.reactnativenavigation.NavigationActivity.getNavigator()' on a null object reference

@yogevbd yogevbd merged commit 2d3a4fb into master Nov 19, 2023
4 checks passed
@yogevbd yogevbd deleted the fixOnHostPauseCrash2 branch November 19, 2023 11:20
@manuhook
Copy link

manuhook commented Dec 5, 2023

Hi @yogevbd

Can we do the same for onHostResume please ?

Please see this patch : #7593 (comment)

Thank you,

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

Successfully merging this pull request may close these issues.

None yet

2 participants