Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AntView suddenly stopped working report and resolve
#1
Hi,

Last night we received an extensive report of an AntView customer where the control suddenly stopped working for them.
The control just showed up blank.

They already had done extensive troubleshooting and enabled logging, reproduced the same issue with both AntView 1 as well as with AntView 2, verified that the WebView2 control itself still worked using the simple .net demo as suggested in https://doc.antview.dev/hs193.htm

The log shows the following two lines:
Code:
2026-11-21 21:08:02.030 CreateAsync completion failed, error 0x8007139F 2026-11-21 21:08:02.030 Event OnCreateWebviewCompleted HResult = 0x8007139F

Error 0x8007139F itself doesn't tell us much. Microsoft gives us the following explanation for that code:
Code:
  ERROR_INVALID_STATE                                            winerror.h # The group or resource is not in the correct state to # perform the requested operation.
Thanks Microsoft.
At least we know it is some "state" that prevents the control from working.

Our customer then did some more diagnosis this morning on the problem and attached debugview to the process.
DebugView showed the following message "WebView2: Initialization failed due to a mismatch in DPI awareness."

Now why would it show that?
More troubleshooting revealed that something had set the High DPI compatibility flag on the msedgewebview2.exe application.
He didn't set it himself, but something did.

In order to resolve the issue he had to:
Go to the folder where msedgewebview2.exe lives (in this case: C:\Program Files (x86)\Microsoft\EdgeWebView\Application\157.0.4341.60 )
Right click on the msedgewebview2.exe application, select Properties, navigate to the compatibility tab, click the "Change high DPI settings" button and remove the "High DPI scaling override" setting that was in there.

After doing that, the issue is resolved.

FWIW, we did NOT see the same issue here on the same version of WebView2, but consider the issue very serious and have thus immediately posted his report here in abbreviated form. We also confirmed that changing the compatibility setting does indeed break the control from working in our applications.

If you do have this same issue, then please reply to this thread and hopefully we will be able to figure out what happened here as something did change the setting. We will also continue to investigate the issue and see if there's something more we can do.

--
Wil
Reply
#2
Hi,

There have been no other reports for AntView, so it appears this issue is unique to the original developer reporting this.

Which I guess makes sense as this kind of issue was reported to the WebView2 github pages here:
https://github.com/MicrosoftEdge/WebView...ssues/3008
The report was started in 2022, so it has been known for a while.
No details on what was setting the DPI compatibility mode on msedgewebview2.exe

So what has been done in the meantime?
Last week we did send a private AntView 2.0 version to the reporter which acts on this issue.

That version handles this issue completely automatically and restarts creating the webview after it failed due to the HIGHDPIAWARE compatibility setting.
Normally you shouldn’t even notice the issue happened.

A more elaborate explanation is:
- If the creation fails with 0x8007139F the code will check the compatibility registry settings under HKCU and enumerates what it finds under there.
- In case of locating a registry value that ends with “msedgewebview2.exe” it will then continue and read that.
- If the value contains the substring “DPI” then there’s a DPI compatibility setting applied and it will log this.
- Next step is deleting that registry value, it only deletes this one.
- Then verify that it is really removed, if so then
- Recreate starting the webview2 instance
All of the above is only done once during your application life time.
If something recreates that setting then so be it, we’re not going to lock up because of that. In that scenario, the reason can be found in the logs.

If someone else bumps into this issue they can ask for the private version.

This feature is expected to be part of the next public release.

--
Wil
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)