-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug][Shell] Shell.Current.GoToAsync exception on certain navigation sequence #12958
Comments
any fix found? |
@joehage9 Not from my side. And I don't see any progress in the Xamarin.Forms project at all. Almost no updates here in the repository for weeks or even months and no new package versions. Seems that everybody is just focussing on .NET 6 MAUI. What I can understand a little bit on the one hand - but what is also not fair to the community on the other hand. So many people relied on XF for their projects. So many open bugs. So many open pull requests by the community without any reaction from the team. And when this situation will really last until November when .NET 6 will be released (fingers crossed), it has been almost a year without real updates/fixes. |
@tschramme86 @joehage9 does this version fixes the issue for you? |
@pictos I cannot access that link. Website says "VS402939: Release with ID 2843 does not exist. Specify a valid ID and try again." |
Hmm @pictos it looks like our nightlies aren't running Try grabbing the nuget off of here See if that works |
cc: @tschramme86 @joehage9 /\ |
@tschramme86 thanks for testing this version. I'll se if can take a look at it this week or next week |
@pictos just fyi: Issue is not solved with latest 5.0.0-sr4 available from today. |
In my case for Xamarin.Forms (5.0.2012), Shell.Current.GoToAsync throws Null pointer exception. Error dump below. This is a SHOWSTOPPER. Can someone from Xamarin please clarify on this? [mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
|
I do also experience the very same behavior when calling: Having hierrachy defined in AppShell: Exception: |
@LuisiitoDev Have you resolved this issue? I have the same exact problem. I'm trying to do this from an event handler in |
I'm having the exact same issue detailed above from other users. Anyone from the Xamarin team keen to advise? |
Completely agree. |
Still not fixed. This makes me wonder (after more than 2 years and still not fixed) if its ever gonna be fixed. |
This issue has been around for more than 2 years now.
It is well documented and should not be so hard to fix, given that.
Can you please escalate this, it makes it very hard to make Xamarin useful to 100%.
Best Regards/Med Vänliga Hälsningar
Lennart Hedlund
email: ***@***.******@***.***>
text: +46-72-530 30 19
phone: +46-72-530 30 19
twitter: LeonSweden
about.me http://about.me/lennarthedlund
[A picture containing text, sign, blue Description automatically generated][A picture containing text, sign, blue Description automatically generated][A picture containing text, sign, outdoor, blue Description automatically generated][A picture containing text, sign, blue Description automatically generated][A picture containing text, sign Description automatically generated][A picture containing text, sign Description automatically generated]
From: Samantha Houts ***@***.***>
Sent: den 11 juli 2022 18:36
To: xamarin/Xamarin.Forms ***@***.***>
Cc: Lennart Hedlund ***@***.***>; Comment ***@***.***>
Subject: Re: [xamarin/Xamarin.Forms] [Bug][Shell] Shell.Current.GoToAsync exception on certain navigation sequence (#12958)
Also reported on https://developercommunity.visualstudio.com/t/XAMARIN:-ShellCurrentGoToAsync-excepti/10089980.
—
Reply to this email directly, view it on GitHub<#12958 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE4EO6N6HX6AJSIO7JHNTZDVTREORANCNFSM4UAXPOZA>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
The only workaround I have found is to manually use Shell.Current.GoToAsync to go to the second tab first, then do the original navigation to the tab you actually want to go to. It's clunky and slow, but less clunky and slow than the app crashing! I recommend setting "animate: false" in the first GoToAsync call too to increase speed and avoid the user having to watch the second page loading then going away. Does anyone have a better workaround? |
experiencing same thing on .NET MAUI as well when switching between 2 pages constantyly until it brakes at WinRT.ExceptionHelpers.g__Throw|39_0(Int32 hr) |
Description
The
Shell.Current.GoToAsync
method fails on a particular navigation sequence with ExceptionInner Stack Trace:
Steps to Reproduce
3.1. App is opened -> Page1 is shown initially
3.2. Click in the bottom Tab bar onto the second Tab labeled "Tab 2" -> Page2 is shown
3.3. Now click the second Button that triggers the
BtnGotoPage4
event handlerExpected Behavior
The App navigates to Page 4
Actual Behavior
The above mentioned exception is thrown in the EventHandler at line
await Shell.Current.GoToAsync("//profile/settings");
when the navigation steps are executed exactly in the written order.Please note:
The navigation works + exception is not thrown when
await Shell.Current.GoToAsync("//profile/details");
is executed), go back to Page 2 and then click the second buttonAlso the navigation to Page 3 with the first Button (
await Shell.Current.GoToAsync("//profile/details");
) works in all cases. It never throws an exception.Basic Information
Environment
Screenshots
Reproduction Link
ShellNavigationSample.zip
The text was updated successfully, but these errors were encountered: