Open SuperDumbTM opened 5 days ago
I have tested that invoking WindowMinimise
and then WindowUnminimise
can trigger this error.
Combining with Github release API, one can simply pull all the WebView2 binary from WebView2RuntimeArchive and test whether an app will crash against each version.
If WebView2 error occurs, an error "ERR | WebVie2wProcess failed with kind 0" will appear.
But I'm not sure how to gather the piece above into an automated test.
I tested the borderless application and implemented a custom toolbar that crashes when zooming in, out, or closing(Quit). When dragging the window position, it also crashes. It seems that whenever the runtime is called, a crash exception occurs:”The WebView2 processcrashed and the application needs to be restarted“
But when I drag using the native title bar, this exception does not occur
The incompatible versions seem to be 113.0.1774.50 and prior for Wails v2.9.2.
Have you tried using replace
to downgrade the go-webview2 version ?
Have you tried using
replace
to downgrade the go-webview2 version ?
I tested downgrading go-webview2 to 1.0.13
and working fine, and getting higher than 1.0.13
was wiped out
@SuperDumbTM - Looking at the features we use, we don't support any post 117.0.2045.60 specific apis so it should be ok. I have pushed up a commit to better handle the EnvironmetCompleted callback. Could you please try that? Thanks.
According to the change from https://github.com/wailsapp/go-webview2/compare/v1.0.13...v1.0.14, the change has been made for MoveFocus to use a pointer for a reason from using a enum value itself. However, when looking at the api specification, looks like it needs to take a enum value itself, however versions later then v1.0.13 would call
MoveFocus(pointer value of a value)
instead of
MoveFocus(0~2)
as in the enum specification. I think that this would be the cause of the crash as it would cause an error like this, and maybe the version later then 118 has a way to avoid the crash for the failure.
What bug did this fix resolve?
Good catch! Yeah, this may have been done in error. It was a while back now so no idea why. I've reverted the commit. If you use the replace directive and use github.com/wailsapp/go-webview2@e53758943f0fbd774dcc2ce5229cd1d082308cca
and let me know if that fixes it 🙏
@leaanthony Reverting the commit indeed fixes the crash when changing the focus for me. @SuperDumbTM, @xiexul could you check if this fixes the issue too?
I've released v1.0.18 with this revert in it. Updated deps on master for Wails v2. If you have the time it would be great to get your feedback on whether master fixes your issues (it should!) and if so, I'll look at doing a release later tonight. Really appreciate all your time tracking this down 🙏
Duplicate the issue (https://github.com/wailsapp/wails/issues/3913) here for tracking.
Summary
An error message "The WebView2 process crashed and the application needs to be restarted" will show up when the GUI window is being "refocused" (mouse click on somewhere else and then click the app's window).
The incompatible versions seem to be
117.0.2045.60
and prior forWails v2.9.2
.