MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[pywebview] WebView2 initialization failed with exception
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
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
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 Python repro using pywebview 5.3.2 on Windows 10, then trace the WebView2 initialization stack shown in the report. Compare the reported Microsoft Edge WebView2 Runtime 130.0.2849.52 environment with the stated framework and OS details. Done means the example window opens without the initialization exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100