MicrosoftEdge / MicrosoftEdge/WebView2Feedback
WebView2 fails to initialize on Outlook with Exception (0x8007139F)
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
We have a working VSTO Add-in that uses WebView2 and for a specific user, WebView2 fails to initialize every time. I also tried with a minimal add-in with just a WebView2 window on a task pane and I get the same result.
The exception, taken from the InitializationException property on the event InitializationCompleted, is as follow:
System.Runtime.InteropServices.COMException (0x8007139F): The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.<CreateCoreWebView2ControllerAsync>d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Web.WebView2.WinForms.WebView2.<InitCoreWebView2Async>d__13.MoveNext()
How can I get to the root cause of the error? The same add-in on other Office applications work fine for the same user.
Version
SDK: 1.0.864.35
Runtime: Runtime 91.0.864.59
Framework: WinForms
OS: Win10 21H1, Outlook 16.0.14131.20116 64-bit.
Repro Steps
- Open a task pane with a WebView2 in Outlook.
- Check event InitializationCompleted
Expected: Initialization is Successful
Actual: Initialization fails with provided exception
We specify a UserData folder, but it is not shared by applications other than Outlook.
No special properties are set in the initialization.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal WinForms Outlook add-in and the InitializationCompleted event, using the provided CoreWebView2Environment.CreateCoreWebView2ControllerAsync stack trace and version details. Reproduce the failure with the specified UserData folder and determine the root cause of the Outlook-only initialization error; done means the cause and a confirmed resolution are documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100