react-native-navigation
react-native-navigation copied to clipboard
java.lang.NullPointerException: Attempt to invoke virtual method 'h.g.k.g.f h.g.b.d()' on a null object reference
Hey there,
here's the stacktrace of the issue:
StackTrace
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'h.g.k.g.f h.g.b.d()' on a null object reference at com.reactnativenavigation.react.NavigationModule.navigator(NavigationModule.java:4) at com.reactnativenavigation.react.NavigationModule.access$100(NavigationModule.java) at com.reactnativenavigation.react.NavigationModule$1.lambda$onHostPause$0(NavigationModule.java:2) at com.reactnativenavigation.react.-$$Lambda$NavigationModule$1$YAogg-YWvGlqmTQTIc1m0ewJv3s.run(-.java:2) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:8167) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Environment
- React Native Navigation version: "^7.29.0"
- React Native version:"0.66.3"
- Platform(s) (iOS, Android, or both?): Android
- Device info (Simulator/Device? OS version? Debug/Release?): samsung Galaxy S9, Release
Many crashes here too, same RNN and RN versions.
Crash is in NavigationModule.java:213
private Navigator navigator() {
return activity().getNavigator();
}
This is the context:
- app goes to background
- activity gets destroyed
- getCurrentActivity returns null, so "activity()" above is null
- crash
Same problem here.
I got crash like above
FATAL EXCEPTION: main Process, PID: 23622 java.lang.NullPointerException: Attempt to invoke virtual method 'f.i.k.g.f f.i.b.N()' on a null object reference at com.reactnativenavigation.react.NavigationModule.navigator(NavigationModule.java:1) at com.reactnativenavigation.react.NavigationModule.access$100(NavigationModule.java:1) at com.reactnativenavigation.react.NavigationModule$a.a(NavigationModule.java:1) at com.reactnativenavigation.react.NavigationModule$a.b(Unknown Source:0) at com.reactnativenavigation.react.b.run(Unknown Source:2) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6523) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
We patched with the diff below in postinstall and the crash disappeared completely. @guyca @yogevbd it is a quite safe modification, you could consider patching 7.30.x
Will add this fix in the next release, thanks!
Will add this fix in the next release, thanks!
@yogevbd Is there any ETA on when the next version is going to be release?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
Bump
The issue has been closed for inactivity.
@yogevbd Still facing this issue, any
Will add this fix in the next release, thanks!
Any update on including the fix, we are still seeing this crash from our crash reports
@yogevbd any updates on the new release? 🙏
We patched with the diff below in postinstall and the crash disappeared completely. @guyca @yogevbd it is a quite safe modification, you could consider patching 7.30.x
Do you still receive crash reports after applying this patch?
@tarouboy No more crashes since we added the patch in our postinstall process
@tarouboy No more crashes since we added the patch in our postinstall process
Lovely. I will apply that patch too. Thanks man.
@yogevbd @mcapocaccia Hi there, if the patch is working. why wasn't it applied to the latest releases, I'm using 7.36.0
?
#7769
Hi All,
I am facing the same issue. But could not reproduce it even i pushed app to background. However, i have been received some mentioned error message.
Do you guys know exactly the case?