I am seeing an ArgumentOutOfRangeException when executing PopAsync after inserting a page into the navigation stack, which seems to be a regression of this issue and may be related to #2576 .
The issue can be reproduced by adding a single empty page to an empty template project and then including the following code in an async OnStart() implementation:
var nav = (NavigationPage) MainPage;
nav.Navigation.InsertPageBefore(new SecondPage(), nav.CurrentPage);
await nav.Navigation.PopAsync(false);
This issue only affects Android projects using Material Design (FormsAppCompatActivity).
I seriously believe that this situation is not acceptable...new and old bugs appear with each new release.
When the fix will be released?
I hope this time unit tests are implemented, so that any further regression gets caught by CI
Hi @opcodewriter that's for your feedback it's hard to unit test platform code, the interation, time on device etc make it super hard. We do write UI Test, and i wrote one in my fix, that's how i found out this seems to be a issue also in iOS :)
This is happening for me as of 3.4.0.1008975
EDIT: Actually, it looks like it's a result of auto-navigating away from the page during an "Appearing" event, even though the stack indicates having pages available during pop.
The entire Navigation management system seems to be quite unstable.
@jefffhaynes
Did you find a workaround to this issue or open another issue? I'm having the same issue - unable to pop after autonavigating in onAppearing
Most helpful comment
This is happening for me as of 3.4.0.1008975
EDIT: Actually, it looks like it's a result of auto-navigating away from the page during an "Appearing" event, even though the stack indicates having pages available during pop.
The entire Navigation management system seems to be quite unstable.