Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Problem/Bug]: Error When Initilize WebView2 (0x8007139F) #4391

Open
byungmeo opened this issue Feb 25, 2024 · 1 comment
Open

[Problem/Bug]: Error When Initilize WebView2 (0x8007139F) #4391

byungmeo opened this issue Feb 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@byungmeo
Copy link

byungmeo commented Feb 25, 2024

What happened?

image

Message ---
The group or resource is not in the correct state to perform the requested operation. (0x8007139F)

StackTrace ---
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateCoreWebView2ControllerAsync(IntPtr ParentWindow)
at Microsoft.Web.WebView2.WinForms.WebView2.InitCoreWebView2Async(CoreWebView2Environment environment, CoreWebView2ControllerOptions controllerOptions)


a particular user have reported that the program worked well in the past,
However, as of February 23rd, an error suddenly occurred and it did not work.

We have tried various measures such as
WebView 2 recovery, Edge Beta installation, and userDataFolder changes,
but they are still not resolved.

The user eventually solved it by window formatting,
but I want to know the source of this problem.

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime), Prerelease (Edge Canary/Dev/Beta)

Runtime Version

121.0.2277.128

SDK Version

1.0.1823.32 and 1.0.2277.86

Framework

Winforms

Operating System

Windows 10

OS Version

19045.4046

Repro steps

Initialize WebView 2 when running the program and loading the form, an exception occurs.
Sadly, this is only happening with some users, and I have never reproduced this error so far.
So, I'll upload the code for the initialization part.

image
image

The same symptoms occurred even if set the userDataFolder differently.
And I recognized that the data existed in that path.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

@byungmeo byungmeo added the bug Something isn't working label Feb 25, 2024
@byungmeo byungmeo changed the title [Problem/Bug]: [Problem/Bug]: 0x8007139F Feb 25, 2024
@byungmeo byungmeo changed the title [Problem/Bug]: 0x8007139F [Problem/Bug]: Error When Initilization WebView2 (0x8007139F) Feb 25, 2024
@byungmeo byungmeo changed the title [Problem/Bug]: Error When Initilization WebView2 (0x8007139F) [Problem/Bug]: Error When Initilize WebView2 (0x8007139F) Feb 25, 2024
@victorhuangwq victorhuangwq added regression Something used to work but doesn't anymore and removed regression Something used to work but doesn't anymore labels Feb 26, 2024
@vbryh-msft vbryh-msft removed the regression Something used to work but doesn't anymore label Feb 26, 2024
@lflores-ms
Copy link
Contributor

Hi @byungmeo -- it's hard to tell exactly what the specific issue is from just the error code, but some of the reasons creation might fail in this way are the following:

  • There is an existing instance of the application running the WebView2 Runtime, with a mismatching configuration, including DPI awareness, GDI scaling and AdditionalBrowserArguments.
  • There's another process running with the same User Data Folder which has set ExclusiveUserDataFolderAccess.
  • There's an app compat setting forcing DPI awareness of the msedgewebview2.exe process to be of certain value, which doesn't match the app configuration.

It is possible that the machine has a User Data Folder override, leading to one of the conditions above. See GitHub #7688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants