Contents - Index - Top


Troubleshooting

 

When there's a need to troubleshoot, there are a number of ways to diagnose the issue at hand:

 

In case the AntView control isn't even working or has other issues like crashing etc.. it might be very helpful to enable the logging function.

 

See AntView logging functionality

 

Besides logging you can also try if what you're trying to do works in the MS Edge browser.

Also check how MS WebView2 was installed, you can install it as the current user (run installer without elevation) or system wide (run installer elevated)

 

if WebView2 itself was installed system wide, or only for the current user.

Normally a system wide install is found under: 

C:\Program Files (x86)\Microsoft\EdgeWebView\Application

Whereas a local user install is under:

C:\Users\<username>\AppData\Local\Microsoft\EdgeWebView\Application\

 

Sometimes you will have to uninstall the WebView2 runtime from the system for troubleshooting purposes. Only to find out you can't do that from within the Apps section. You can then force an uninstall by opening an elevated command prompt and navigating to the installer folder of WebView2. (Note that the version string in the path will be different in your case)

Then issue the following command:

C:\Program Files (x86)\Microsoft\EdgeWebView\Application\108.0.1462.54\Installer>setup.exe --uninstall --msedgewebview --system-level --verbose-logging --force-uninstall

 

If you want to isolate if it is webview2 misbehaving or the antview control itself, then you could also load one of the standard examples that Microsoft provides.

See: MS WebView .net example

 

If you still see problems, no errors in the logs (navigation is normal), then you might be hitting an issue with buggy GPU drivers.

We've seen customers report this and no errors did show up until they ran their app under Windows 8 compatibility mode.

In Windows 8 compatibility mode suddenly OnProcessFailed triggered and reported a GPU crash.

This can be resolved by setting environment variables "--ignore-gpu-blocklist --disable-gpu-driver-bug-workarounds" via the AdditionalBrowserArguments property.

FWIW this was on hosts with the following GPUs Nvidia GT540M/Intel HD3000.

 

For more info see also: https://github.com/MicrosoftEdge/WebView2Feedback/issues/1118.

 

When you are writing a javascript function, but it isn't returning the expected result or it doesn't seem to do anything, then you should debug it. 

 

See Debug anonymous javascript functions

 

You also should not do anything that blocks the message queue within an event. 

Starting a new UI from within an event is something we all fall for at times.

 

See No UI threads in an event

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024