Why Does My WebView2 Keep Showing a White Screen?

July 24, 2025 2 answers
Asked by !keep the peel
I'm trying to run a PowerShell script I've found online, but every time I launch WebView2, all I see is a white screen. I've tested the script on three different Windows computers and even tried various WebView2 launchers, but nothing seems to work. I'm quite new to coding and have only solved a few simple issues with help from GitHub, so I don't have much experience with WebView2. Can anyone explain why this might be happening and how I can fix it? I've been stuck for a couple of days despite trying to follow advice I found online.

Answers

END.of.discussion
Make sure you're loading a valid site into the WebView2. Sometimes, if you click and drag the window around, it can trigger the page to load correctly. I've had that issue with some Microsoft sites not rendering without moving the window. Give that a shot!

!keep the peel: Thanks for the tip! I actually clicked and moved the window around for a bit, but still no luck. I'll keep trying, though.

election precinct: Have you thought about calling `.Refresh()` on the WebView control when the `NavigationCompleted` event fires? It might help with loading issues.

Reply to this answer
legal shorthand
You might want to check if you're using PowerShell 5 instead of PowerShell 7. I've seen similar white screen issues happen due to that version difference.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions