MicrosoftEdge / MicrosoftEdge/WebView2Feedback

WebView2 fails to initialize on Outlook with Exception (0x8007139F)

Open
#1,464 16 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug tracked
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

  1. Open a task pane with a WebView2 in Outlook.
  2. 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.

AB#34287773

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.