Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CreateAsync completion failed, error -2147221164

Stumped by this one, most likely something i've done wrong but I can't work it out.

I have a development system and a live system. On the dev system everything is working as it should be.

On the live system I get the following message when enabling "LogMode" as per help.

2022-12-06 13:38:47.025 -------------------------------------------------------------------------
2022-12-06 13:38:47.026 ------ Starting new WebView2 instance                              ------
2022-12-06 13:38:47.026 -------------------------------------------------------------------------
2022-12-06 13:38:47.027 Application: C:\Program Files (x86)\Microsoft Office\OFFICE11\MSACCESS.EXE (6332)
2022-12-06 13:38:47.027 Win32
2022-12-06 13:38:47.028 Current Directory: C:\Users\whiting\Documents
2022-12-06 13:38:47.028 AntView loaded C:\PROGRA~2\AntView\Win32\AntView.ocx
2022-12-06 13:38:47.038 AntView version
2022-12-06 13:38:47.039 User: whiting
2022-12-06 13:38:47.040 Initializing defaults
2022-12-06 13:38:47.044 EventSink changed, creating inplace object $
2022-12-06 13:38:47.046 Reading Version = 1.1.200
2022-12-06 13:38:47.055 Configuring default userDataFolder.
2022-12-06 13:38:47.057 CreateWebViewOnCreate is set to false, not initializing WebView2 until requested.
2022-12-06 13:38:47.058 Creating window $50238
2022-12-06 13:38:47.065 Test if WebView2 control is OK.
2022-12-06 13:38:47.066 Start async creation of the WebView2 control.
2022-12-06 13:38:47.066 BrowserExecutableFolder:
2022-12-06 13:38:47.067 UserDataFolder: C:\Users\xxx\AppData\Local\Temp\2\MSACCESS.EXE.WebView2\
2022-12-06 13:38:47.067 Setting environment options: chrome flags: [] Language [] Min. Browser version [95.0.1020.44] Single Sign On False
2022-12-06 13:38:47.068 Reading InstallPath = C:\Program Files (x86)\AntView
2022-12-06 13:38:47.069 Trying to load the loader DLL as C:\Program Files (x86)\AntView\Win32\WebView2Loader.dll
2022-12-06 13:38:47.071 Loading from InstallPath : success.
2022-12-06 13:38:47.071 Loaded as C:\Program Files (x86)\AntView\Win32\WebView2Loader.dll
2022-12-06 13:38:47.072 Version = 1.0.1108.44
2022-12-06 13:38:47.073 Assigned loader library procedures.
2022-12-06 13:38:47.369 CreateAsync completion failed, error -2147221164

I have checked and the library is installed "as admin" and -2147221164 is "Class not registered", But as you can see above, its loaded the ocx correctly, and has located the dll to load.

Any suggestions? I've double checked the EdgeRuntime is installed as admin as well.

Hi Dave,

Curious problem.

Can you check if the WebView2 example from Microsoft works?
See this link for more details:

Unfortunately I can't use the compiled version as its compiled for Windows 10 using GetDpiForWindow.

I'll try and compile it for previous versions using as a prod.


What Windows version are you using?

The other day I've just updated parts of the documentation that Windows 7/Windows Server 2008 R2 are no longer supported.
The reason for that is that Microsoft removes official support for those operating systems and WebView2 on January 23, 2023 (see which is for MS Edge, but WebView2 follows that list of supported operating systems.

I saw some other people having issues with WebView2 already, so made the decision to take it from the public list of supported operating systems now as to have less people waste time on that.
Now that doesn't mean I won't still help with issues until January 23, but that date is very very close by.

Yes its windows 7. May explain a few things.

Should I rather than use the bootstrapper - use an older version of the WebView2 offline installer?

Well it doesn't _have_ to be because the OS is Windows 7, but it is a suspect.

I'm not sure if an older installer is going to help.
WebView2 is normally really fast with updating itself to the latest version available.

Personally I would first try and see if you can get one of the standard examples from WebView2 to work on Windows 7, so that you can determine if the WebView2 control works via .net or not.
If it doesn't work there either then it is more likely that the WebView2 control itself has issues.


I got the WebView2Browser compiled with some amendments to the DPI calls to get the browser running on Windows 7 / and a Windows Server 2008 R2 and this example runs as expected, I see the bing homepage and can interact with the browser control.

I've triple checked and re registered the control and I still obtain the same errors.

2022-12-07 08:48:21.035 Setting environment options: chrome flags: [] Language [] Min. Browser version [95.0.1020.44] Single Sign On False
2022-12-07 08:48:21.035 Reading InstallPath = C:\Program Files (x86)\AntView
2022-12-07 08:48:21.036 Trying to load the loader DLL as C:\Program Files (x86)\AntView\Win32\WebView2Loader.dll
2022-12-07 08:48:21.038 Loading from InstallPath : success.
2022-12-07 08:48:21.039 Loaded as C:\Program Files (x86)\AntView\Win32\WebView2Loader.dll
2022-12-07 08:48:21.039 Version = 1.0.1108.44
2022-12-07 08:48:21.040 Assigned loader library procedures.
2022-12-07 08:48:21.734 CreateAsync completion failed, error -2147221164
2022-12-07 08:48:21.735 OnCreateWebviewCompleted HResult = $80040154 events: True

Any deeper dive diagnostics I can do, now we can confirm WebView2 appears to be working via .net calls?


Are you saying that you are seeing this on more than one machine?
I read it to be "compiled for", but not 100% sure if it also implied that you have the problem on Windows Server 2008 R2 as well.

I will email you a link to a private version of AntView that has the possibility to add more log details by setting it to LogLevel 2, but I somehow doubt it will tell me more. The error we're getting here is from Windows end of things when it tries to instantiates the WebView2 control asynchronously.

Let me see if I can reproduce your issue on a Windows 7 box here in house (probably not, but it is worth a shot)



The issue on this thread was mainly because of trying to use the control over RDP.
While that certainly works - and is supported - there appear to have been some ActiveX registration issues related to using the control via RDP.


Forum Jump:

Users browsing this thread: 1 Guest(s)