The pywebview-5.2 shows a blank window with Windows, AMD Radeon(TM) Vega 8 Graphics, AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
creeperyyds opened this issue · 7 comments
Specification
- pywebview version: 5.2
- operating system: Windows 11
- web renderer: Chromium (I think so)
- Python Version: 3.12.5
Description
(English is not my native language; please excuse typing errors.)
When I run this code
import webview
window = webview.create_window('Woah dude!', 'https://pywebview.flowrl.com')
webview.start(debug=True)
It shows nothing but a blank window:(I can open the website on Edge)
And the console only shows:
[pywebview] Using WinForms / Chromium
(I have another software that use pywebview,it will shows a native html file,and before I can use it correctly,but now it throws an exception webview.errors.WebViewException: Main window failed to start)
I tried:
-
use Python 3.9(Failed) -
use Windows 10 in VMware(Failed) -
modify the website(Failed) -
use local html file(Failed, only shows:
[pywebview] Using WinForms / Chromium
Bottle v0.12.25 server starting up (using ThreadedAdapter())...
Listening on http://127.0.0.1:38771/
Hit Ctrl-C to quit.
)
Thanks in advance for your attention.
Practicalities
-
YES I am willing to work on this issue myself.
-
NO I am prepared to support this issue financially.(I don't have any money)
It is difficult to debug without error log, but my bet is that there is something wrong with EdgeChromium runtime. You may try to see if webview runtime ever gets initialized by placing print statements (breakpoints do not work here) inside on_webview_ready
handler
pywebview/webview/platforms/edgechromium.py
Line 205 in a2b8d04
It looks like it didn't run on_webview_ready
. And sorry because I didn't know how to get an error log.
I will keep trying to fix it.
Exact same issue here, strangely, using pyenv-win and prepending with pyenv exec
fixes the issue?
Also using AMD GPU + CPU.
Works fine up to and including 5.1,maybe 5.2 changed something
Make a pull request to fix it:#1489
Not really sure it can work on other device, but I think it can.
I pushed a fix for storage_path to master. It does two things. First it checks whether storage_path is writeable and raises an exception before initialization. Second, changed slightly how Webview2 is initialized, so storage_path should be not be an issue anymore. Please test.
I pushed a fix for storage_path to master. It does two things. First it checks whether storage_path is writeable and raises an exception before initialization. Second, changed slightly how Webview2 is initialized, so storage_path should be not be an issue anymore. Please test.
Works well on my device! Thanks for everyone helping! QWQ