[Android] Native stack navigator crashes on quick transitions
See original GitHub issueI’ve been recently testing new react-navigation v5 with native navigation stack and it works fine in most cases but when I start moving quickly between the screens eventually app crashes. Here is a sample video and stack trace that I got in Android Studio.
2020-02-07 13:49:14.511 11275-11275/com.reactnavigationrnd E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.reactnavigationrnd, PID: 11275
java.lang.IllegalStateException: Restarter must be created only during owner's initialization stage
at androidx.savedstate.SavedStateRegistryController.performRestore(SavedStateRegistryController.java:58)
at androidx.fragment.app.Fragment.performCreate(Fragment.java:2585)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:838)
at androidx.fragment.app.FragmentManagerImpl.addAddedFragments(FragmentManagerImpl.java:2100)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1874)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1830)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
at androidx.fragment.app.FragmentManagerImpl$2.run(FragmentManagerImpl.java:150)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top Results From Across the Web
android, crash on transition for my fragment - Stack Overflow
It looks like the problem is that before exit from fragment it does tabLayout. · It is clearly a bug on code base...
Read more >Stack Navigator | React Navigation
Stack Navigator provides a way for your app to transition between screens ... are building for Android or iOS, do not skip this...
Read more >Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >Tasks and the back stack | Android Developers
Lifecycle of a task and its back stack. Back press behavior for root launcher activities; Background and foreground tasks; Multiple activity ...
Read more >Navigate to a destination - Android Developers
Navigate using DeepLinkRequest; Navigation and the back stack ... By using an action, you can also animate transitions between the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you all for your reports and comments. This issue has been resolved as of 2.0-beta.6. Please give it a try and if you still experience the issue, comment here or start a new one.
@kmagiera here is the repo: https://github.com/armata007/rn-screens-issue-back-project if you have any issues reproducing let me know