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]: CoInitialize has not been called when creating Edge Webview2 environment #4616

Open
RSN1907 opened this issue Jun 6, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@RSN1907
Copy link

RSN1907 commented Jun 6, 2024

What happened?

Our WPF app uses Edge Webview , however in few machines and intermittently when creating EdgeWebview environment we see below exception
One or more errors occurred. (CoInitialize has not been called. (0x800401F0 (CO_E_NOTINITIALIZED)))
InnerException
CoInitialize has not been called. (0x800401F0 (CO_E_NOTINITIALIZED))

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(String browserExecutableFolder, String userDataFolder, CoreWebView2EnvironmentOptions options)

Importance

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

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

125.0.2535.85

SDK Version

1.0.2151.40

Framework

WPF

Operating System

Windows 10

OS Version

21H2

Repro steps

https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2environment.createasync?view=webview2-dotnet-1.0.2535.41
Use the above function to create WebView2 environment within the app

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

@RSN1907 RSN1907 added the bug Something isn't working label Jun 6, 2024
@RSN1907
Copy link
Author

RSN1907 commented Jun 6, 2024

@victorhuangwq Have created this new issue as requested, can you kindly check and also suggest how to upload etl trace as its more than 50 MB

@RSN1907
Copy link
Author

RSN1907 commented Jun 10, 2024

@lflores-ms Can you kindly suggest how to share traces? Will mail work?

@RSN1907
Copy link
Author

RSN1907 commented Jun 17, 2024

@victorhuangwq @lflores-ms Can you kindly suggest how to share traces?

@lflores-ms
Copy link
Contributor

lflores-ms commented Jun 17, 2024

@RSN1907 please upload them wherever you prefer and share at <>

Also, does your app deal with COM? If there are calls to CoUninitialize, that might interefere with WebView creation. Have you been able to reproduce this issue or do you have a sample project where it's demonstrated?

@RSN1907
Copy link
Author

RSN1907 commented Jun 17, 2024

@lflores-ms I have shared the traces in gmail and drive, there is no direct interaction with COM ,I have not been able to reproduce the issue and its very intermittent

@RSN1907
Copy link
Author

RSN1907 commented Jun 21, 2024

@lflores-ms any other additional logs required? Also when app was using Microsoft.Web.WebView2 SDK "1.0.1661.34" issue was not seen but when it was upgraded to 1.0.2151.40 issue is seen consistently in few machines

@RSN1907
Copy link
Author

RSN1907 commented Jun 27, 2024

@lflores-ms @victorhuangwq We have now more users of our app reporting this issue ,can you kindly help in checking uploaded logs

@RSN1907
Copy link
Author

RSN1907 commented Jul 3, 2024

@lflores-ms @victorhuangwq Were you able to look at the traces sent over mail?

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

2 participants