maui icon indicating copy to clipboard operation
maui copied to clipboard

[net9.0] Blazor MAUI App hangs during back navigation because of disconnect code

Open PureWeen opened this issue 1 year ago • 6 comments
trafficstars

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

image

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

PureWeen avatar Aug 23 '24 17:08 PureWeen

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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Aug 23 '24 17:08 github-actions[bot]

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.

malsabi avatar Oct 06 '24 18:10 malsabi

@PureWeen @Eilon @mkArtakMSFT If possible please to add this into the SR9.2 release.

malsabi avatar Oct 07 '24 06:10 malsabi

I also tested on iOS the issue is there as well. My app hangs forever.

malsabi avatar Oct 07 '24 09:10 malsabi

@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.

malsabi avatar Oct 08 '24 10:10 malsabi

Thanks, will investigate this.

Eilon avatar Oct 08 '24 20:10 Eilon