wails
wails copied to clipboard
App window is not showing
Description
I created a project with wails init and after running wails dev a few times the application window was not displayed. I think it is because of the "efficiency mode".
To Reproduce
- Create a heavy Vue frontend project.
Expected behaviour
Displaying the application window
Screenshots
Attempted Fixes
I created a project from scratch and in this project the window is displayed without any problem.
System Details
DEB | Using go webview2loader
Wails CLI v2.5.1
SUCCESS Done.
# System
OS | Windows 10 Pro
Version | 2009 (Build: 22621)
ID | 22H2
Go Version | go1.19.5
Platform | windows
Architecture | amd64
# Wails
Version | v2.5.1
# Dependencies
Dependency | Package Name | Status | Version
WebView2 | N/A | Installed | 115.0.1901.203
Nodejs | N/A | Installed | 19.8.1
npm | N/A | Installed | 9.5.1
*upx | N/A | Installed | upx 4.0.1
*nsis | N/A | Available |
* - Optional Dependency
# Diagnosis
Your system is ready for Wails development!
Additional context
No response
https://github.com/MicrosoftEdge/WebView2Feedback/issues/3238
Thanks for reporting this. Is there a way to conclusively prove it's efficiency mode? Is it reproducible? We could add an option for "IsVisible" but I'm curious why this isn't happening all the time.
When I create a new project and run it, the efficiency mode icon does not appear in the task manager and the window looks fine.
I'm trying to work out whether this should be disabled or enabled by default. Thoughts?
@kadirgun
If you right click in explorer, you can turn off efficiency mode for that app, can you try turning it off and see if that helps?
Note: I turned it on manually for my app and I can still see it just fine, so I feel like there's something going on here.
I tried to simulate the problem again but the same problem did not happen again.When this problem occurred before, the option to turn off Effiency mode was disabled.
I think the error is because the webview2 window is slow when the system is slow and edge recognizes it as an inactive window.
If you minimize the application window and look in the task manager, you will see that the effiency mode is activated.
I think i have a related problem, when the app go in efficiency mode, when i come back on the application it can't communicate with the go runtime (bindings brokens).
Is there a way actually to force the IsVisible state as stated here to prevent efficiency mode: https://github.com/MicrosoftEdge/WebView2Feedback/issues/3238
EDIT: I must precise that i have a periodic task (setInterval) on my front end that retrieve informations on my go backend. Maybe there is an underlying problem when it go to efficiency mode ?
It should be reasonably easy to add. Are you comfortable raising a PR?