Why Does My WebView2 Keep Showing a White Screen?

0
0
Asked By CuriousTraveler99 On

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.

2 Answers

Answered By TechGuru22 On

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.

Answered By WebCoderX On

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!

CuriousTraveler99 -

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

CodeWiz88 -

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

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.