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

Random black screen in MAUI Blazor. #19588

Closed
KieranDevvs opened this issue Dec 25, 2023 · 8 comments
Closed

Random black screen in MAUI Blazor. #19588

KieranDevvs opened this issue Dec 25, 2023 · 8 comments
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/windows 🪟 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@KieranDevvs
Copy link

KieranDevvs commented Dec 25, 2023

Description

I'm having the exact same issue as filed here: #13291
As the issue is closed due to lack of response from the original poster, and the fact that I'm also experiencing this issue, I'm opening a new issue.

Note: this isn't a new issue, I've experienced this in previous versions of MAUI. I'm only now reporting this due to encountering it so often.

This may be an issue with WebView2 not initializing in MAUI correctly.
This also appears to only be an issue when debugging as I've not yet come across is when running the application without the debugger attached.

Screenshot (note how the debugging session has been active for 3+ minutes):
image

Steps to Reproduce

  1. Create a new MAUI Blazor hybrid application.
  2. Run the application.
  3. Randomly encounter a black screen and the application never responds.

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 10.0.19041.0

Did you find any workaround?

Restart the application several times until the application successfully launches.

Relevant log output

Nothing relevant.
@KieranDevvs KieranDevvs added the t/bug Something isn't working label Dec 25, 2023
@drasticactions
Copy link
Contributor

Going by the original issue you linked to, it seemed like it was a WinUI 3 issue and unrelated to MAUI UI stuff specifically. Specially as they said they also tried it without a web view and it also did the same thing.

Can you try making a WinUI 3 app that doesn't use MAUI and see if you can reproduce this?

@drasticactions drasticactions added the s/needs-info Issue needs more info from the author label Dec 26, 2023
@ghost
Copy link

ghost commented Dec 26, 2023

Hi @KieranDevvs. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@KieranDevvs
Copy link
Author

Going by the original issue you linked to, it seemed like it was a WinUI 3 issue and unrelated to MAUI UI stuff specifically. Specially as they said they also tried it without a web view and it also did the same thing.

Can you try making a WinUI 3 app that doesn't use MAUI and see if you can reproduce this?

No unfortunately I cannot for two reasons:

  1. I have no experience with WinUI 3 apps.
  2. This issue is very sporadic and thus the only way that I have found to encounter it is to constantly work on a MAUI application. This would entail me creating a WinUI 3 application and working on it consistently until I encountered the issue (if at all). I don't have this kind of spare time to diagnose if this problem stems from WinUI 3 or MAUI.

The fact of the matter is, people that are using MAUI are experiencing this issue and if MAUI happens to rely upon a dependency that is having issues, that's still an issue with MAUI because MAUI depends on that library to function properly. If you have suspicions that this is a WinUI 3 problem, then the MAUI team should raise this problem with the WinUI team rather than relying on your consumers to go on a wild goose chase.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Dec 26, 2023
@drasticactions
Copy link
Contributor

@KieranDevvs That's the issue here: is MAUI the dependency at fault. My suspicion is "no", based on the original issue. That user tried using a regular MAUI WebView in WinUI 3 (Which is also something you could try to verify it's not MAUI Blazor related) and it also failed there the same way, making it unlikely it's related to Blazor.

Likewise, the MAUI WebView is wrapping around WebView 2, with minimal changes. That doesn't mean there couldn't be something else within MAUI that could cause it to fail in the way you see, but it's extremely slim.

As you said:

"This may be an issue with WebView2 not initializing in MAUI correctly."

My guess is it's failing to initialize in WinUI 3, and using MAUI is unrelated. That's why I asked you to try it there without the MAUI UI framework.

Beyond that other issue, it seems few others have hit it, meaning it could be specific to hardware or some other combination of things on your system that are causing it, making it extremely difficult if not impossible for any MAUI member to debug if we can't also replicate it. So I'm trying to help you out by helping isolate the issue on your machine, or it would be an issue that would end up in the backlog and not looked at for much later.

@mattleibow do you have thoughts on this?

@drasticactions drasticactions added the s/needs-repro Attach a solution or code which reproduces the issue label Dec 27, 2023
@ghost
Copy link

ghost commented Dec 27, 2023

Hi @KieranDevvs. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@drasticactions drasticactions removed the s/needs-attention Issue has more information and needs another look label Dec 27, 2023
@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Jan 1, 2024
@ghost
Copy link

ghost commented Jan 1, 2024

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@tonicaceres
Copy link

I'm getting the random black screen too when debugging a Maui Blazor app. Stopping the debug session and launching again fixes it, sometimes need to try this 2 or 3 times. I'm launching the debugger for Windows Machine. I deleted all the other platforms from the solution (iOS, Android, etc).

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity labels Jan 2, 2024
@samhouts samhouts added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Jan 25, 2024
@Eilon
Copy link
Member

Eilon commented Jan 25, 2024

Duplicate of #15533

@Eilon Eilon marked this as a duplicate of #15533 Jan 25, 2024
@Eilon Eilon closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/windows 🪟 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants