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

[pywebview] WebView2 initialization failed with exception #4891

Open
534146825 opened this issue Oct 27, 2024 · 0 comments
Open

[pywebview] WebView2 initialization failed with exception #4891

534146825 opened this issue Oct 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@534146825
Copy link

What happened?

pycharm 执行代码时。
代码如下:
import webview

try:
webview.create_window('Example', 'http://example.com')
webview.start()
except Exception as e:
print(f"An error occurred: {e}")
就报错:
[pywebview] WebView2 initialization failed with exception:
(0x80080005): 服务器运行失败 (异常来自 HRESULT:0x80080005 (CO_E_SERVER_EXEC_FAILURE))
在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
在 Microsoft.Web.WebView2.Core.CoreWebView2Environment.d__8.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 Microsoft.Web.WebView2.WinForms.WebView2.d__26.MoveNext()
我的webview版本是pywebview-5.3.2,Microsoft Edge WebView2 Runtime
130.0.2849.52

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

Microsoft Edge WebView2 Runtime 130.0.2849.52

SDK Version

pywebview-5.3.2

Framework

Win32

Operating System

Windows 10

OS Version

win10 19045.4894

Repro steps

edition:Windows 10 专业版
python:python3.10.11
Module version:pywebview-5.3.2
edge:Microsoft Edge WebView2 Runtime 130.0.2849.52
code:
import webview

try:
webview.create_window('Example', 'http://example.com')
webview.start()
except Exception as e:
print(f"An error occurred: {e}")

eorr:
[pywebview] WebView2 initialization failed with exception:
(0x80080005): 服务器运行失败 (异常来自 HRESULT:0x80080005 (CO_E_SERVER_EXEC_FAILURE))
在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
在 Microsoft.Web.WebView2.Core.CoreWebView2Environment.d__8.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 Microsoft.Web.WebView2.WinForms.WebView2.d__26.MoveNext()

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

edge:129.0.2792.89

@534146825 534146825 added the bug Something isn't working label Oct 27, 2024
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

1 participant