MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
452 stars 55 forks source link

Failure to initialize WebView2 (0x8007139F) #2874

Closed tiagoabreu closed 1 year ago

tiagoabreu commented 2 years ago

I am unsure if it is a bug or not, so initially will have it as a question.

We have a VSTO add-in that uses WebView2 that we deploy to various Office applications. (Word, Excel and PowerPoint). Most of the code case (including WebView2 related code) is shared between them, there are no differences on how it is setup, but we have a different userdata folder per application. We have users reporting that WebView2 fails to initialize, only on some applications, with the exception reported below: System.Runtime.InteropServices.COMException (0x8007139F): The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)

For some of these users, a recommendation that worked was to delete the corresponding UserData folder and retry, then it did work, not for all of them.

Our SDK version is 1.0.1054.31 (Winforms) WebView2 version is 106.0.1370.34 Windows version is Windows 10 21H2

victorthoang commented 2 years ago

Hello @tiagoabreu,

Thanks for your inquiry. I've assigned your question to a dev that might best answer your question.

sln162 commented 1 year ago

My two users encountered the same error 0x8007139F during initialization. The runtime versions of WebView 2 are 106.0.1370.47 and 107.0.1418.35. In this case, if:

Reinitialize Now Wait a few seconds for initialization Initialize after deleting a folder (create a new folder if an exception occurs during deletion) Since it is difficult for my users to get in touch with them, I am curious whether the above has any effect