MAUI Windows app launches as white screen and hangs

See original GitHub issue

Description

I created a new .NET MAUI Blazor app, added minimal customization (details below) and ran it on Windows. When I launched it, it launched as a white rectangle and was hanging.

Here’s the app (white screen on left), as well as the VS debugger, which I “paused” the app on to get a dump: image

I captured a dump of the hung process (accessible only within Microsoft): DMP file

Steps to Reproduce

  1. Create new .NET MAUI Blazor app
  2. Replace the code in MainPage.xaml.cs with the following: (might not even be relevant, but I happened to do it)
    public MainPage()
    {
    	InitializeComponent();
    
        blazorWebView.BlazorWebViewInitialized += BlazorWebView_BlazorWebViewInitialized;
    }
    
    private void BlazorWebView_BlazorWebViewInitialized(object sender, Microsoft.AspNetCore.Components.WebView.BlazorWebViewInitializedEventArgs e)
    {
    #if WINDOWS
        var webview2 = e.WebView;
        webview2.CoreProcessFailed += Webview2_CoreProcessFailed;
    #endif
    }
    
    #if WINDOWS
    private void Webview2_CoreProcessFailed(Microsoft.UI.Xaml.Controls.WebView2 sender, Microsoft.Web.WebView2.Core.CoreWebView2ProcessFailedEventArgs args)
    {
        // log this event to see if it's the cause of the failure
    }
    #endif
    
  3. Run the app (with debugger, but not sure if it’s relevant)

Note: This repos only rarely. Multiple people have seen it.

Link to public reproduction project repository

N/A

Version with bug

7.0.86

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 11

Did you find any workaround?

If you re-run the app, chances are it will work. It fails very randomly.

Relevant log output

No response

Issue Analytics

  • State:open
  • Created 3 months ago
  • Reactions:6
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
milklikecommented, Jun 9, 2023

This situation seems easy to encounter on windows10 pc with poor performance.

0reactions
borup3commented, Aug 18, 2023

My app launches to a stuck white screen ~40% of the time I launch it with XAML Hot Reload enabled and debugger attached (I haven’t tried other ways). I’ve only been using .net maui for 2 days and this has happened at least 30 times. It’s a new .net maui project created with VS 2022 and the default application template.

Operating System: Windows 11 Home 64-bit (10.0, Build 22621) (22621.ni_release.220506-1250)
Processor: AMD Ryzen 7 3800X 8-Core Processor              (16 CPUs), ~4.2GHz
Memory: 32768MB RAM
DirectX Version: DirectX 12
Card name: NVIDIA GeForce RTX 2070
Current Mode: 3440 x 1440 (32 bit) (165Hz)
Driver Version: 31.0.15.3699
Read more comments on GitHub >

github_iconTop Results From Across the Web

MAUI Windows app launches as white screen and hangs
MAUI Windows app launches as white screen and hangs #18592. Sign in to view logs · Sign in to view logs. Summary. MAUI...
Read more >
White Screen on Launching apps(games) from windows ...
Apart from just showing white screen I have to launch the app multiple times to Load the game.
Read more >
Troubleshoot known issues - .NET MAUI
The solution to this issue on Windows is to uninstall the .NET MAUI workloads through the CLI, uninstall any .NET SDKs in Control...
Read more >
c# - .NET MAUI Application Crashes After Working Fine
ArgumentNullException error and now the app will start with a black screen then crash after a few seconds. There are no errors, it...
Read more >
dotnet MAUI Blazor App crashes only when deployed from ...
When I use <UseInterpreter>false</UseInterpreter> , the app starts, but immediately crashes in the Blazor Web View, not showing any other than ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found