Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAUI Windows app launches as white screen and hangs #15533

Open
Eilon opened this issue Jun 8, 2023 · 60 comments
Open

MAUI Windows app launches as white screen and hangs #15533

Eilon opened this issue Jun 8, 2023 · 60 comments
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) p/2 Work that is important, but is currently not scheduled for release platform/windows 🪟 s/triaged Issue has been reviewed t/bug Something isn't working t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK)
Milestone

Comments

@Eilon
Copy link
Member

Eilon commented Jun 8, 2023

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

@Eilon Eilon added t/bug Something isn't working platform/windows 🪟 legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) labels Jun 8, 2023
@milklike
Copy link

milklike commented Jun 9, 2023

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

@Eilon
Copy link
Member Author

Eilon commented Jun 9, 2023

Interesting. In my case it's a fairly high end desktop. Intel 10K CPU, SSD, tons of RAM. I don't see this issue often - maybe once a week? But I've definitely seen it before.

I mostly work with Blazor Hybrid apps, so I know I've seen it in .NET MAUI Blazor. I don't recall if I've seen it in non-Blazor apps.

Has anyone seen the "100% white app window" issue in a .NET MAUI app without Blazor?

@aidan-bailey
Copy link

Yes, I've experienced it without Blazor. I use dark mode so for me it's a black, unresponsive screen. Occasionally the screen layout/elements show but it remains unresponsive. It always works on a recompile and happens seldomly enough that I haven't looked into it.

@tsi-kyle
Copy link

I have a very high-end gaming pc, 13th gen i9, 64GB ram, SSD, RTX 4090, and this happens to me pretty frequently, sometimes 2 or 3 times in a row.

@tsi-kyle
Copy link

I get this with any MAUI app, w/ or w/o blazor.

@MikeWhalenIII
Copy link

MikeWhalenIII commented Jul 7, 2023

I am having this issue as well with my MAUI Blazor app. For me, it is happening randomly, and I have not been able to find the exact steps to make the white screen show up every time, but it is happening when I debug with Android and Windows and also on iOS with the app deployed to TestFlight and the app store.

I am starting to notice that if I leave the iOS app running in the background for about a couple of hours and then come back to it and kill the app and reopen the app, that is when I get the white screen immediately after the splash screen.

The iOS crash logs don't have much, they just mention that watchdog killed the app because it was unresponsive.

 "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGKILL"},
 "termination" : {"code":2343432205,"flags":6,"namespace":"FRONTBOARD","reasons":["<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: application<com.BlazorMaui>:49441 exhausted real (wall clock) time allowance of 10.00 seconds","ProcessVisibility: Foreground","ProcessState: Running","WatchdogEvent: scene-update","WatchdogVisibility: Background","WatchdogCPUStatistics: (","\"Elapsed total CPU time (seconds): 6.430 (user 4.080, system 2.350), 10% CPU\",","\"Elapsed application CPU time (seconds): 0.010, 0% CPU\"",") reportType:CrashLog maxTerminationResistance:Interactive>"]}

I've been trying to figure out where the app is getting hung up, and while debugging, I've noticed that the InitializeComponent() call in the MainPage.xaml.cs file is called, but in my MainLayout.razor.cs file, I have a JSInterop call in OnAfterRenderAsync() and the app is never getting to this point.

When debugging using the Windows Machine option, this is where my Output file stops.

'MauiApp.exe' (CoreCLR: DefaultDomain): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\MauiApp.dll'. Symbols loaded.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\WinRT.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Collections.Concurrent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.WinUI.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Runtime.CompilerServices.Unsafe.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Private.Uri.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.ObjectModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.ComponentModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Numerics.Vectors.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Windows.SDK.NET.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Security.Cryptography.Algorithms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Security.Cryptography.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Security.Cryptography.Csp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Security.Cryptography.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.InteractiveExperiences.Projection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Maui.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Maui.Controls.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.DependencyInjection.Abstractions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Configuration.Abstractions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Maui.Essentials.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Maui.Controls.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.AspNetCore.Components.WebView.Maui.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Logging.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Logging.Debug.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Configuration.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Maui.Graphics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.AspNetCore.Authorization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.AspNetCore.Components.Authorization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Xml.ReaderWriter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Private.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Net.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Logging.Abstractions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.ComponentModel.TypeConverter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.AspNetCore.Components.WebView.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.JSInterop.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.AspNetCore.Components.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.AspNetCore.Components.Web.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Options.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Text.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Memory.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Text.Encoding.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.DependencyInjection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Diagnostics.Tracing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Threading.ThreadPool.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Linq.Expressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Reflection.Emit.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'Snippets'. 
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Maui.Controls.Compatibility.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Reflection.Emit.Lightweight.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Reflection.Emit.ILGeneration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Reflection.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Runtime.Loader.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.FileProviders.Abstractions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.FileProviders.Composite.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Graphics.Canvas.Interop.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.FileProviders.Embedded.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Xml.XDocument.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Private.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Threading.Thread.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Text.RegularExpressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\xamarin\hotreload\Xamarin.HotReload.VSAgentAdapter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\netstandard.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\xamarin\hotreload\Microsoft.VisualStudio.DesignTools.TapContract.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\xamarin\hotreload\Xamarin.HotReload.Contracts.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\xamarin\hotreload\Microsoft.Maui.Controls.HotReload.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.IO.Pipes.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Runtime.Serialization.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Private.DataContractSerialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Runtime.Serialization.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Runtime.Serialization.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

(When the App freezes, it stops here.)

When the Windows debugging doesn't hang, I am missing information in the Output. I get everything above and also the following text.

(When the app doesn't freeze, I get these extra lines in the Output.)

'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Text.Encodings.Web.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Runtime.Intrinsics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\MauiApp.SharedLib.dll'. Symbols loaded.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Extensions.Configuration.Binder.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Identity.Client.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.IdentityModel.Abstractions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Security.Claims.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.AspNetCore.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Collections.Immutable.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'Microsoft.Identity.Client.MsalUiRequiredException' in System.Private.CoreLib.dll
Exception thrown: 'Microsoft.Identity.Client.MsalUiRequiredException' in System.Private.CoreLib.dll
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Diagnostics.DiagnosticSource.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MauiApp.exe' (CoreCLR: clrhost): Loaded 'C:\source\repos\MauiApp\MauiApp.Maui\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\AppX\System.Net.Security.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

EDIT: I was able to fix the white screen issue on my end. I am using MSAL, and there was an issue with the silent login.

@LSMartijn
Copy link

I also have this issue with my MAUI Blazor app. At random times when I debug, a blank screen appears. Only restart debugging resolves this issue.

@DDHSchmidt
Copy link

Chiming in: We experience this randomly with our MAUI app (no Blazor)

@samhouts samhouts added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Aug 16, 2023
@borup3
Copy link

borup3 commented 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

@mattleibow
Copy link
Member

Very hard to repro, but I will try with hot reload disabled for a bit and see if it happens. I wonder if there is some timing issue and it is clearing out the page...

@samhouts samhouts added this to the .NET 8 + Servicing milestone Sep 13, 2023
@HobDev
Copy link

HobDev commented Sep 22, 2023

I created new dotnet maui 8 app in Visual Studio 17.8.0 Priview 2.0. Then copied all the code from dotnet 7 project. Now the app screen is blank on Windows, Android and iOS.

@daltzctr
Copy link
Contributor

daltzctr commented Nov 14, 2023

I can also repro it sometimes on .NET 8 GA. At least it doesn't seem to happen in release.

@achobanov
Copy link

achobanov commented Nov 19, 2023

I'm experiencing two separate issues:

Occasional hang during debugging

This seems a lot like what was described above - sometimes when debugging the App just hangs with a black screen (Dark theme) and I need to restart it. I have the following observations:

  • It can happen several times in a row
  • it happens more often after I've been working on the project for a good few hours; rarely (if ever) it happens at the start
  • it's not exclusive to MAUI, as I've seen similar behavior with a Prism WPF app
  • Started happening after update to .Net 6 for the Prism app.

This is more of a nuisance. Also I think it's more likely to be related to VS than MAUI specifically.

Consistent hang ONLY in Release build

This is an actual problem for me ATM. My app starts with Debugging (in both Debug and Release configs), but when build as a Windows executable - it starts up the window and hangs on a blanc purple page (It's only PoC project, so I haven't really changed any defaults form the Blazor Hybrid template). Looks similar to issue for Android target. Any help on this will be greatly appreciated.

@joshua-lemli
Copy link

joshua-lemli commented Dec 12, 2023

My team experiences this issue intermittently. It seems to happen most frequently the first time I boot, launch VS, and launch a MAUI app (we use Blazor Hybrid). But it seems like it crops up randomly, too. Dark mode (win11) --> empty black window, normal --> empty white window. Happens with win11 and win10. Has been happening since .NET 6. I just had it happen this morning with .NET 8 MAUI Blazor project and VS v17.8.3.

Sometimes closing the empty app window does not stop the application from running/debugging in VS. It must be stopped manually from VS.

@jurganson
Copy link

I've been running into this issue intermittently, recently playing around with the sample MAUI app from Visual Studio 2022. On the first startup, no changes were made, it showed this blank screen. I am running on Windows 10 and deploying to Windows 10.

Some observations:

  • Sometimes repeats several times and has to be rebuilt
  • When I close the window, the debugger is still running (unlike normally where it stops the debugger when closing the window) so I have to stop the execution from Visual Studio.

Any logs or similar that I could provide to help this issue along?

@mattleibow
Copy link
Member

I wonder if you were to disable the XAML hot reload and maybe C# hot reload... I know that fires up at the top of a launch, and we may have different code to WinUI.

@jeremy-visionaid
Copy link
Contributor

jeremy-visionaid commented Apr 23, 2024

@mattleibow I can still repro the issue with the following config in launchSettings.json:

{
  "profiles": {
    "Windows Machine": {
      "commandName": "MsixPackage",
      "nativeDebugging": false,
      "hotReloadEnabled": false
    }
  }
}

@mattleibow
Copy link
Member

Not sure if that disables the right one. You may have to use the IDE settings.

@jeremy-visionaid
Copy link
Contributor

@mattleibow It's the same as the Launch Profiles dialog option:
image

@jeremy-visionaid
Copy link
Contributor

Oh yup, there's the global option too, haha. I'll try that

@jeremy-visionaid
Copy link
Contributor

@mattleibow OK, great, I am unable to repro if XAML hot reload is disabled in the global options. 👍 I tend not to use it that much since it doesn't work with localized resources anyway, so that's an easy win to just turn it off. Seems to be fine with .NET hot reload left enabled.

@jeremy-visionaid
Copy link
Contributor

What timing. I just received the first automated error report of the app hanging in the field before startup completed from the above watchdog approach. Though it's from 8.0.7 since I can't update past that version due to #21548/#21970. I'm guessing that the core issue here is still the XAML hot reload and that the in the field hang is unrelated since it's only ever happened once.

@jonmdev
Copy link

jonmdev commented Apr 24, 2024

What timing. I just received the first automated error report of the app hanging in the field before startup completed from the above watchdog approach. Though it's from 8.0.7 since I can't update past that version due to #21548/#21970. I'm guessing that the core issue here is still the XAML hot reload and that the in the field hang is unrelated since it's only ever happened once.

I have had this numerous times in release mode and as far as I know I already have hot reload disabled so I am not convinced it is hot reload.

@DennisWelu
Copy link

It "feels" like a timing related issue. Disabling hot reload may affect the timing in a positive way but it may not address the root cause. Plus hot reload is really useful. :-)

@Eilon Eilon added the t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK) label May 10, 2024
@Woid4tler
Copy link

+1, also in release mode, any Solutions?

@PureWeen PureWeen added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label May 31, 2024
@Makstvell
Copy link

Black screen in windows 11 +-40% chance when run app.
photo

@DennisWelu
Copy link

After upgrading to Visual Studio 17.10 a couple weeks ago the problem became even worse for me. About 30% of the time it seemed to happen. But I think I may have now "fixed" this for my machine. I switched my NVIDIA card to use the Game Ready version of the NVIDIA drivers. (Previously it was set for the Studio drivers). This can be done with the GeForce Experience app. After an hour of frustration this morning I made that switch and never had the problem for the rest of the day. 🤞

@DennisWelu
Copy link

After upgrading to Visual Studio 17.10 a couple weeks ago the problem became even worse for me. About 30% of the time it seemed to happen. But I think I may have now "fixed" this for my machine. I switched my NVIDIA card to use the Game Ready version of the NVIDIA drivers. (Previously it was set for the Studio drivers). This can be done with the GeForce Experience app. After an hour of frustration this morning I made that switch and never had the problem for the rest of the day. 🤞

FWIW this did not eliminate the issue, just reduced it significantly. Still occasionally encountering the problem.

@crwsolutions
Copy link

I have this too with an AMD card. But I also have a freeze on my first page sometimes (less frequent) . And the items in my locked Flyout menu sometimes disappear after some clicking back and forward. Maybe these things are related. (All with the debugger attached)

@PureWeen PureWeen added p/2 Work that is important, but is currently not scheduled for release and removed p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint labels Jul 2, 2024
@Kalyxt
Copy link

Kalyxt commented Jul 9, 2024

Black screen in windows 11 +-40% chance when run app. photo

I am not surprised you take this with your phone. When this happens (and it happens quite a lot) it blocks keyboard input and I am unable to take screenshot until I delete WebView2 Manager from running tasks. It also makes whole system choppy and I am unable to open Paint. 👯 This prolly doesn't have anything to do with MAUI and it fails because of WebView2 component ?

@FaithfulDev
Copy link
Contributor

Black screen in windows 11 +-40% chance when run app. photo

I am not surprised you take this with your phone. When this happens (and it happens quite a lot) it blocks keyboard input and I am unable to take screenshot until I delete WebView2 Manager from running tasks. It also makes whole system choppy and I am unable to open Paint. 👯 This prolly doesn't have anything to do with MAUI and it fails because of WebView2 component ?

I can't comment for @Makstvell, but regarding the overall issue: I have this issue with MAUI apps that don't use the WebView2 component.

I always assumed the reason some get white screens and some black had something to do with people having set a dark theme? MAUI app template comes with some basic theme-based styling. But ultimately, I don't think it matters if it's white or black. It's an empty window, with an unresponsive debugger.

@rusfield
Copy link

My oldest MAUI Blazor repo is 2 years old this summer. I have created multiple projects and coded on multiple computers, and this issue has always been around.
Is there any way to get more attention on this issue?

@FaithfulDev
Copy link
Contributor

It's already priority 1, I don't think there is any higher than that. It's one of these issue that are just very difficult to fix. And before it can be fixed, someone needs to find the cause first 😄

@PureWeen PureWeen modified the milestones: .NET 8 + Servicing, Backlog Aug 2, 2024
@mkArtakMSFT mkArtakMSFT modified the milestones: Backlog, .NET 9 Planning Sep 23, 2024
@amirvenus
Copy link

When upgrading our net8.0-android34.0 app to net9.0-android35.0, we get white screen on the initial launch (the app freezes forever). afterwards, the app freezes on random places.

This is happening in release only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) p/2 Work that is important, but is currently not scheduled for release platform/windows 🪟 s/triaged Issue has been reviewed t/bug Something isn't working t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK)
Projects
None yet
Development

No branches or pull requests