Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[iOS][Shell] OnAppearing called twice #14703

Open
jfversluis opened this issue Oct 6, 2021 · 4 comments
Open

[iOS][Shell] OnAppearing called twice #14703

jfversluis opened this issue Oct 6, 2021 · 4 comments

Comments

@jfversluis
Copy link
Member

As reported below, OnAppearing seems to be called twice when using Shell. I think it's unrelated to the other issue described, so opening a new one. I suspect there might be an issue for this already?


@jfversluis
I just have tested it in my test repo (the one I attached above).
The crash seems to be fixed, however the OnAppearing of the LoadingPage.xaml gets called twice if use

// Navigate back in LoginPage.xaml
await ShellNavigationManager.GoBackAsync();

Here is the output

2021-10-05 18:37:44.968532+0200 _Issue13476.iOS[4943:95336] LoadingPage: OnAppearing called  <-- First visit
Thread started:  #5
[0:] WillShowViewController 11639729
[0:] WillShowViewController 1315972608
2021-10-05 18:38:34.405345+0200 _Issue13476.iOS[4943:95336] LoadingPage: OnAppearing called <-- After GoBackAsync();
2021-10-05 18:38:34.473481+0200 _Issue13476.iOS[4943:95336] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=4943
2021-10-05 18:38:34.473737+0200 _Issue13476.iOS[4943:95336] SecTaskCopyDebugDescription: _Issue13476.iOS[4943]/0#-1 LF=0
[0:] WillShowViewController 11639729
2021-10-05 18:38:34.546006+0200 _Issue13476.iOS[4943:95336] LoadingPage: OnAppearing called <-- After GoBackAsync(); (second call)
[0:] WillShowViewController 1384107971
[0:] WillShowViewController 235358035

And here the updated test repo:
https://github.com/AndreasReitberger/XamarinFormsShellTestRepo

Originally posted by @AndreasReitberger in #13510 (comment)

@jfversluis
Copy link
Member Author

Also see: #6919

@AndreasReitberger
Copy link

@jfversluis anything new on this one? Would be awesome if this could be fixed with the next SR 👍
Thank you!

@jfversluis
Copy link
Member Author

Unfortunately not, if you have the possibility feel free to look into it :)

@aspeckt-112
Copy link

Hi.

My apologies if I'm attempting to discuss this in totally the wrong place, but this still appears to be a problem in XF, as well as being a problem in MAUI on .NET 7.0.203.

The problem seems to occur if you push a modal page (for example, an authentication page) from within OnAppearing of the first page in the Shell.

I'm happy to produce a sample and log an issue in the MAUI repo if the team isn't aware of it. But from searching around the web I found this Issue here, but not one in the repo there, hence why I'm commenting here.

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants