xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] Shell.Current.GoToAsync doesn´t display the new view sometimes after shell flyout is closed. Only on iOS #14044

Open RobertHedgate opened 3 years ago

RobertHedgate commented 3 years ago

Description

In my app I´m using shell flyout menu. If I open the menu via swipe and close it by clicking outside of the flyout. If I then click a button which navigates my to another view it sometimes (perhaps 1 out of 4) does not appear. The existing view is "locked" and if I swipe back the navigated view slides in from the right. The app also reverts back to correct state if I leave the app and open it again, then the correct view is on screen.

Steps to Reproduce

  1. Have app with shell flyout menu and a button to navigate to a view not in the menu
  2. Open flyout via swipe from left
  3. Close flyout by clicking outside of flyout
  4. Click button to navigate to another view using Shell.Current.GoToAsync
  5. New view is initialized and OnAppear fires but is not shown on screen

Expected Behavior

View after Shell.Current.GoToAsync should appear on screen

Actual Behavior

View not shown. Need to leave app for it to appear.

Basic Information

Environment

Show/Hide Visual Studio info ``` === Visual Studio Community 2019 for Mac === Version 8.9 (build 1651) Installation UUID: 5b888b83-eda7-4fa6-b711-7d872a2b008b GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638) Package version: 612000122 === Mono Framework MDK === Runtime: Mono 6.12.0.122 (2020-02/c621c35ffa0) (64-bit) Package version: 612000122 === Roslyn (Language Service) === 3.9.0-5.21112.8+f3ff04378c972d435826e6181de364b3c0db8d14 === NuGet === Version: 5.8.0.6860 === .NET Core SDK === SDK: /usr/local/share/dotnet/sdk/5.0.103/Sdks SDK Versions: 5.0.103 5.0.100 3.1.406 3.1.404 3.1.402 3.1.401 MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks === .NET Core Runtime === Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 5.0.3 5.0.0 3.1.12 3.1.10 3.1.8 3.1.7 2.1.23 2.1.22 2.1.21 === .NET Core 3.1 SDK === SDK: 3.1.406 === Xamarin.Profiler === Version: 1.6.15.68 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler === Updater === Version: 11 === Apple Developer Tools === Xcode 12.4 (17801) Build 12D4e === Xamarin.Mac === Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version. === Xamarin.iOS === Version: 14.14.2.5 (Visual Studio Community) Hash: 3836759d4 Branch: d16-9 Build date: 2021-02-10 17:56:44-0500 === Xamarin Designer === Version: 16.9.0.316 Hash: bd2705417 Branch: remotes/origin/d16-9 Build date: 2021-02-24 00:16:08 UTC === Xamarin.Android === Version: 11.2.0.0 (Visual Studio Community) Commit: xamarin-android/d16-9/f908d16 Android SDK: /Users/roberthedgate/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: None installed SDK Tools Version: 26.1.1 SDK Platform Tools Version: 30.0.4 SDK Build Tools Version: 29.0.2 Build Information: Mono: 5e9cb6d Java.Interop: xamarin/java.interop/d16-9@1d382be ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.32.2@cfe06e0 Xamarin.Android Tools: xamarin/xamarin-android-tools/main@ad80a42 === Microsoft OpenJDK for Mobile === Java SDK: /Users/roberthedgate/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25 1.8.0-25 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL === Android SDK Manager === Version: 16.9.0.22 Hash: a391de2 Branch: remotes/origin/d16-9 Build date: 2021-02-18 03:14:56 UTC === Android Device Manager === Version: 16.9.0.17 Hash: fc2b3db Branch: remotes/origin/d16-9 Build date: 2021-02-18 03:15:18 UTC === Build Information === Release ID: 809001651 Git revision: c05b1dec4362b5956d47624a437e900ffdc9aa0a Build date: 2021-02-25 11:27:51-05 Build branch: release-8.9 Xamarin extensions: c05b1dec4362b5956d47624a437e900ffdc9aa0a === Operating System === Mac OS X 10.16.0 Darwin 20.3.0 Darwin Kernel Version 20.3.0 Thu Jan 21 00:07:06 PST 2021 root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64 ```

Build Logs

Screenshots

Reproduction Link

Workaround

PureWeen commented 3 years ago

@RobertHedgate can you attach a repro or a video of your issues?

RobertHedgate commented 3 years ago

After 3 attempts the error occurs. I think I might double click on the button for this to happen. I want to either navigate or to do nothing. I am swiping form the left side all the time and clicking on the button (outside the tree) to close the flyout menu.

https://user-images.githubusercontent.com/2970153/114856496-77550980-9de7-11eb-9b7b-ec6a3801fe4e.mp4