-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Comments
This situation seems easy to encounter on windows10 pc with poor performance. |
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? |
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. |
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. |
I get this with any MAUI app, w/ or w/o blazor. |
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.
I've been trying to figure out where the app is getting hung up, and while debugging, I've noticed that the When debugging using the Windows Machine option, this is where my Output file stops.
When the Windows debugging doesn't hang, I am missing information in the Output. I get everything above and also the following text.
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. |
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. |
Chiming in: We experience this randomly with our MAUI app (no Blazor) |
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.
|
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... |
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. |
I can also repro it sometimes on .NET 8 GA. At least it doesn't seem to happen in release. |
I'm experiencing two separate issues: Occasional hang during debuggingThis 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:
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 buildThis 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. |
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. |
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:
Any logs or similar that I could provide to help this issue along? |
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. |
@mattleibow I can still repro the issue with the following config in launchSettings.json:
|
Not sure if that disables the right one. You may have to use the IDE settings. |
@mattleibow It's the same as the Launch Profiles dialog option: |
Oh yup, there's the global option too, haha. I'll try that |
@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. |
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. |
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. :-) |
+1, also in release mode, any Solutions? |
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. |
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) |
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 |
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. |
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. |
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 😄 |
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. |
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:
I captured a dump of the hung process (accessible only within Microsoft): DMP file
Steps to Reproduce
MainPage.xaml.cs
with the following: (might not even be relevant, but I happened to do it)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
The text was updated successfully, but these errors were encountered: