-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
Native mode on Windows 11 results in a blank window #2751
Comments
hi i'm on windows 11 and i have no error running this code what so ever. here are a list of the libraries i have installed and their versions. maybe that would help to compare.
|
Thanks, @Smug246! @alimate2023 Your packages from #2737 (reply in thread) seem quite old compared to what @Smug246 posted. Maybe you can try updating them and check if the problem persists? |
@Smug246 |
did it work? |
I tested it with the same Python, nicegui version, but the same phenomenon occurs. OTL |
Getting similar (failed) results here on Windows 11 with both Python 3.12.3 and 3.11.9. Running native mode on Windows 11 results in a blank screen, with this error printed to the console:
This is in a fresh virtual env with only nicegui and pywebview installed, running the sample code from OP.
UPDATE: Turns out my particular issue was WebView2 runtime not being installed. Windows wouldn't let me install it, stating that it was already installed, but apparently it was lying to me. |
Same problem. I think this may due to some windows settings. I pack my app with pyinstaller and use it on more than 10 pc. some of them have this problem and others not |
For me is not working. Rocky 9.3 BUT, I cannot install what I need into the system, so, I am working out of a fresh conda environment that I put together in the last 48 hours. I get the blank window and the only messages I get at the prompt are the following:
|
@falkoschindler It is a compatibility problem of from nicegui import ui,app
#app.native.start_args['gui'] = 'mshtml'
ui.button('yes',on_click=lambda e:ui.notify(e.sender.text))
ui.run() |
Do you suggest setting And what do we see in the screenshots? What does it all have to do with es-module-shims.js? |
The es-module and the other component which uses module syntax are not compatible with IE. Because of VUE3 dropping the compatibility of IE11. See it in https://vuejs.org/about/faq#what-s-the-difference-between-vue-2-and-vue-3 app.native.start_args['gui'] = 'edgechromium'
# For 'gui' arg,you needn't assign it usually,besides you want to change the render;
# 'edgechromium' is best on Windows ;
# qt based is a litte heavy,but it can be used on Windows/Linux/Mac;
# 'qt' needs ["QtPy", "PyQt5", "pyqtwebengine"];
# 'pyside2' needs ["QtPy", "PySide2"];
# 'pyside6' needs ["QtPy", "PySide6"]; I don't think setting app.native.start_args['gui'] is a good idea, it may causes bugs in nicegui and pywebview has made lots of |
I am facing this same problem and I tried many solutions with no success. |
Discussed in #2737
Originally posted by alimate2023 March 21, 2024
Running in native mode results in a blank window.
The console displays a warning message as follows
I don't know if elements are not displayed in the native window.
console error
NiceGUI ready to go on http://localhost:8000
[pywebview] MSHTML is deprecated. See https://pywebview.flowrl.com/guide/renderer.html#web-engine on details how to
use Edge Chromium
The text was updated successfully, but these errors were encountered: