Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
This is fixed internally and will be available in alpha02
an...@gmail.com <an...@gmail.com> #3
I've modified the build.gradle file (of the attached "MyAppplication" project) to the latest iteration (alpha2) to test the changes. When I pass through the same flow twice (shown in attached screen recording) I get an exception (listed below). Should I initiate a new issue for it?
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapplication, PID: 3799
java.util.NoSuchElementException
at java.util.ArrayDeque.removeLast(ArrayDeque.java:274)
at androidx.navigation.fragment.FragmentNavigator.popBackStack(FragmentNavigator.java:87)
at androidx.navigation.NavController.popBackStack(NavController.java:280)
at androidx.navigation.NavController.navigate(NavController.java:642)
at androidx.navigation.NavController.navigate(NavController.java:592)
at androidx.navigation.Navigation$1.onClick(Navigation.java:118)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
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:6494)
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:807)
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapplication, PID: 3799
java.util.NoSuchElementException
at java.util.ArrayDeque.removeLast(ArrayDeque.java:274)
at androidx.navigation.fragment.FragmentNavigator.popBackStack(FragmentNavigator.java:87)
at androidx.navigation.NavController.popBackStack(NavController.java:280)
at androidx.navigation.NavController.navigate(NavController.java:642)
at androidx.navigation.NavController.navigate(NavController.java:592)
at androidx.navigation.Navigation$1.onClick(Navigation.java:118)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
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:6494)
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:807)
an...@gmail.com <an...@gmail.com> #4
The alternative paths shown in the attached recordings also lead to the aforementioned exception.
Description
If I have an action that links from the subgraph to the download page that pops the subgraph then no crashes, but clicking the back button takes you back to the main screen, not "page 3" as is wanted.
If I don't pop the subgraph then it crashes both when I navigate to main, and when I hit the back button (the one on the device, not the toolbar). The toolbar back button takes you back to page3 (as expected).
Stack trace:
```
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.IllegalArgumentException: Navigator androidx.navigation.fragment.FragmentNavigator@ae77e1d8 reported navigation to unknown destination id com.example.myapplication:id/page3Fragment
at androidx.navigation.NavController$2.onNavigatorNavigated(NavController.java:98)
at androidx.navigation.Navigator.dispatchOnNavigatorNavigated(Navigator.java:176)
at androidx.navigation.fragment.FragmentNavigator$1.onBackStackChanged(FragmentNavigator.java:72)
at android.support.v4.app.FragmentManagerImpl.reportBackStackChanged(FragmentManager.java:2704)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2338)
at android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:854)
at android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:797)
at android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:844)
at android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:797)
at android.support.v4.app.FragmentActivity.onBackPressed(FragmentActivity.java:186)
at android.app.Activity.onKeyUp(Activity.java:2145)
at android.view.KeyEvent.dispatch(KeyEvent.java:2633)
at android.app.Activity.dispatchKeyEvent(Activity.java:2375)
at android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:534)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:58)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:316)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:58)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1847)
at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3701)
at android.view.ViewRootImpl.handleImeFinishedEvent(ViewRootImpl.java:3651)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:2818)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
```
Component used:
android.arch.navigation:navigation-fragment-ktx
Version used:
1.0.0-alpha01
Devices/Android versions reproduced on:
All tested
- Sample project to trigger the issue.
See attached
- A screen record or screenshots showing the issue (if UI related).