maui
maui copied to clipboard
[net9.0] Blazor MAUI App hangs during back navigation because of disconnect code
Description
With NET9.0 we now call "DisconnectHandler" by default on all components of a page when they are popped from the stack.
It looks like this code is now causing the UI to hang
Reproduction
- Deploy a to Windows our Maui.Samples project from the MAUI repository
- Navigate to the Blazor Sample
- wait for it to load
- click the back button
- app hangs
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Closed similar issues:
- ContentPage does not call DisconnectHandler when navigating back (#15410), similarity score: 0.75
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Is there a workaround for this? I'm having this issue in BlazorWebView I'm targeting 8.0.82 SR8.2. The issue happens In Windows, I tested on Android its working fine.
@PureWeen @Eilon @mkArtakMSFT If possible please to add this into the SR9.2 release.
I also tested on iOS the issue is there as well. My app hangs forever.
@Eilon Maybe this information will help, but the reason why its working on Android is because I have set this:
AppContext.SetSwitch("BlazorWebView.AndroidFireAndForgetAsync", isEnabled: true);
If i removed it and tested again the app will hang just like Windows and iOS.
Thanks, will investigate this.