-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
Since the original issue is locked to collaborators, I'm raising it again (#32425). This is NOT fixed. I'll put the same steps to reproduce as the original bug, since the steps to reproduce are literally the same. I have 2 issues with the PR (#32456) that was supposed to fix the original issue:
- It's saying that the bug was fixed in .NET 10.0 SR2, when it has been released in SR3. This is really confusing for people that cannot update to each new version
- If we take a look at the fix, it's adding a null check in the ShellSectionRenderer.cs, even though the original reporter said that the problem is NOT with the shell navigation.
Keep in mind that the bug is hard to reproduce. Sometimes it happens on the second or third attempt, sometimes it takes me 5+ mins to constantly go back and forth to reproduce it.
P.S. A potential fix can be (in GetAppearedOrDisappearedTask code from src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs ):
Instead of this:
// Current (unfixed) code:
var renderer = (IPlatformViewHandler)page.Handler;
var parentViewController = renderer.ViewController.ParentViewController as ParentingViewController;
if (parentViewController == null)
throw new NotSupportedException("ParentingViewController parent could not be found. Please file a bug.");the code should have these checks:
var renderer = (IPlatformViewHandler)page.Handler;
// renderer or ViewController can be null if a rapid push/pop causes the handler
// to be torn down before this navigation completes (mirrors fix for ShellSectionRenderer #32425)
if (renderer?.ViewController == null)
{
CompletePendingNavigation(false);
return _pendingNavigationRequest.Task;
}
var parentViewController = renderer.ViewController.ParentViewController as ParentingViewController;
if (parentViewController == null)
throw new NotSupportedException("ParentingViewController parent could not be found. Please file a bug.");Steps to Reproduce
I'm copying the steps from the original bug report, since they are the same.
- Create new MAUI .NET 10 project
- Update MAUI to latest (10.0.50 at time of writing)
- Add a simple NewPage1 XAML content page to root.
- Add new Button to top of MainPage.xaml
<Button Text="Go to New Page 1"
Margin="0,20"
Clicked="OnNavigateToNewPage1Clicked"
HorizontalOptions="Fill" />- Add handler to MainPage.xaml.cs
private async void OnNavigateToNewPage1Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new NewPage1());
}- Run project on an iOS 26 simulator
- When app shown rapidly do:
- click 'Go to New Page 1' button
- click 'Back button' in header
- and repeat
Link to public reproduction project repository
https://github.com/mduchev/MauiIosNavigationWhiteScreen
Version with bug
10.0.50
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 26
Did you find any workaround?
According to the original bug this doesn't happen for Shell navigation. I haven't tried it, but I'm included to believe that this is indeed the case.
Relevant log output
N/A