Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Initialization Error

Post Reply
brche
Posts: 16
Joined: Tue Feb 08, 2022 10:29 pm

Initialization Error

Post by brche »

When I run my application, everything works fine; but when all three of my testers install, then are getting:

Code: Select all

 -2147024726: There was an error creating the controller. on application start.
Does this sound familiar?
Thanks,
Brian

Code: Select all

MyApp.pas                   |TBrowserForm                                             |OnInitializationError             |1035[2]  
uWVBrowserBase.pas          |TWVBrowserBase                                           |doOnInitializationError           |2924[2]  
uWVBrowserBase.pas          |TWVBrowserBase                                           |ControllerCompletedHandler_Invoke |1179[54] 
uWVCoreWebView2Delegates.pas|TCoreWebView2CreateCoreWebView2ControllerCompletedHandler|Invoke                            |794[2]
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Initialization Error

Post by salvadordf »

I just uploaded a new version of WebView4Delphi with improved error messages when initialization fails.

Please, download the latest WebView4Delphi version from GitHub to get more details about that error.

Are the testers sharing the same user data folder?
brche
Posts: 16
Joined: Tue Feb 08, 2022 10:29 pm

Re: Initialization Error

Post by brche »

salvadordf wrote: Thu Apr 07, 2022 10:05 am I just uploaded a new version of WebView4Delphi with improved error messages when initialization fails.

Please, download the latest WebView4Delphi version from GitHub to get more details about that error.

Are the testers sharing the same user data folder?
OK, Thanks. I'll try that.

No, they are installing on their own machines, with their own folders.

Thanks,
Brian
brche
Posts: 16
Joined: Tue Feb 08, 2022 10:29 pm

Re: Initialization Error

Post by brche »

-2147024726:_There was an error creating the controller. (2)
Error code :_0x800700AA
Unexpected error result.

It looks like it is the UserDataFolder. I have two browsers using the same folder.

Thanks
Brian
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Initialization Error

Post by salvadordf »

According to the official WebView2 documentation that error code is not one of the expected values for the controller creation results.

0x800700AA is the value of HRESULT_FROM_WIN32(ERROR_BUSY)

I can only find one reference to that error code in the WebView2 docs and it's not related to the controller :
https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironment3?view=webview2-1.0.1189-prerelease
There could only be one active UpdateRuntime operation in an app process, and calling this API before the completed handler for a previous call is invoked will fail with HRESULT_FROM_WIN32(ERROR_BUSY). Calling this API repeatedly in a short period of time, will also fail with HRESULT_FROM_WIN32(ERROR_BUSY). To protect accidental abuse of the update service, the implementation throttles the calls of this API to 3 times within 5 minutes in a process. The exact throttling limit can change in the future.
Perhaps WebView2 has an undocumented limit and we can't create too many controllers or too frequently.
Post Reply