Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

Shell.Current.Navigation.PopAsync()

Open EvgenyPrikhodko opened this issue 4 years ago • 7 comments

Xamarin Forms, test in Andriod SDK10 Xamarin.Forms 5.0.0.2012 ERROR

 await Shell.Current.Navigation.PopAsync();

System.ArgumentException
  Message=Ambiguous routes matched for: //Flyout/IMPL_ProjectsPage/ProjectsPage/FoldersPage matches found: //Flyout/IMPL_ProjectsPage/ProjectsPage/FoldersPage,//Flyout/IMPL_ProjectsPage/ProjectsPage/FoldersPage
Parameter name: uri
ShellUriHandler.GetNavigationRequest (Xamarin.Forms.Shell shell, System.Uri uri, System.Boolean enableRelativeShellRoutes, System.Boolean throwNavigationErrorAsException, Xamarin.Forms.ShellNavigationParameters shellNavigationParameters) D:\a\1\s\Xamarin.Forms.Core\Shell\ShellUriHandler.cs:207
ShellNavigationManager.GoToAsync (Xamarin.Forms.ShellNavigationParameters shellNavigationParameters) D:\a\1\s\Xamarin.Forms.Core\Shell\ShellNavigationManager.cs:44
ShellSection+NavigationImpl.OnPopAsync (System.Boolean animated) D:\a\1\s\Xamarin.Forms.Core\Shell\ShellSection.cs:1070


Xamarin.Forms 5.0.0.1931 There is no mistake

EvgenyPrikhodko avatar Mar 13 '21 16:03 EvgenyPrikhodko

@EvgenyPrikhodko Could you attach a small sample where reproduce the issue?, could you share the registered routes?, happens on Android and not on iOS?

jsuarezruiz avatar Mar 23 '21 11:03 jsuarezruiz

I have the same issue. in Android and iOS.

mYoda avatar Apr 23 '21 08:04 mYoda

System.ArgumentException Message=Ambiguous routes matched for: //main/IMPL_dashboard/dashboard/tasks matches found: //main/IMPL_dashboard/dashboard/tasks,//main/IMPL_dashboard/dashboard/tasks Parameter name: uri I had the same issue yesterday when I upgraded to XF 5.0.0.2012 and yes downgrading to XF 5.0.0.1931 worked for me as well.

nysand avatar May 11 '21 09:05 nysand

I got the same issue

aleksandrsmyk avatar Jun 15 '21 13:06 aleksandrsmyk

I was getting same issue when navigated to page await Shell.Current.Navigation.PushAsync(popUpPage); then to next one using Shell.Current.GoToAsync and from current one i used to do and then issue occurs.

await Shell.Current.Navigation.PopAsync();

If i use PushAsync all the way issue dissapears.

valentasm1 avatar Jul 06 '21 07:07 valentasm1

Register the root of the shell only once. In my case, I had a similar problem because I had registered the route in both xaml and code-behind. I only registered the route in xaml and it works fine.

babe0911 avatar Oct 03 '21 14:10 babe0911

Register the root of the shell only once. In my case, I had a similar problem because I had registered the route in both xaml and code-behind. I only registered the route in xaml and it works fine.

I only register my bottom tab on code behide but still have this problem

hetcmnten avatar Aug 24 '22 08:08 hetcmnten

having same issue...

I have attached a small sample where I have reproduced this issue. https://github.com/nabilakhlaque/Xamarin-forms-navigation-issue

nabilakhlaque avatar Mar 26 '23 23:03 nabilakhlaque

any update on this

premshahdev avatar Jul 06 '23 04:07 premshahdev