wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.26k stars 1.22k forks source link

minimizing and focusing window causes it to crash with Chrome Widgets related error seemingly #2807

Closed Deepfried-Chips closed 1 year ago

Deepfried-Chips commented 1 year ago

Description

I was recently experimenting with making a soundboard app and came across this I am using a custom template (one I made with i18n) but I can replicate it with a newly created project with a default template

After doing that, you get an error in console saying

2023/08/01 16:18:25 Not enough quota is available to process this command.
[0801/161825.222:ERROR:window_impl.cc(119)] Failed to unregister class Chrome_WidgetWin_0. Error = 0

Causing process to die completely, wails cli does not pick up on it and keeps running, attempting to then kill the process yields a ERROR: The Process "id" not found. and Error from 'npm run dev': exit status 128

To Reproduce

  1. Unfocus/Minimize window
  2. Focus window again

Expected behaviour

for it to not crash when minimizing the application

Screenshots

No response

Attempted Fixes

No response

System Details

# System

OS           | Windows 10 Pro
Version      | 2009 (Build: 22621)
ID           | 22H2
Go Version   | go1.20.4
Platform     | windows
Architecture | amd64

# Wails

Version | v2.5.1

# Dependencies

Dependency | Package Name | Status    | Version
WebView2   | N/A          | Installed | 115.0.1901.188
Nodejs     | N/A          | Installed | 20.1.0
npm        | N/A          | Installed | 9.6.4
*upx       | N/A          | Installed | upx 4.0.2
*nsis      | N/A          | Installed | v3.08
* - Optional Dependency

# Diagnosis

Your system is ready for Wails development!

Additional context

No response

Deepfried-Chips commented 1 year ago

i'll probably look to see if I can replicate this on linux but probably not, this appears to be an edge webview issue

leaanthony commented 1 year ago

Doesn't sound like a Wails bug: https://answers.microsoft.com/en-us/windows/forum/all/error-0x80070718-not-enough-quota-is-available-to/08d799ce-835e-4bf1-a1f8-4498a48ffe99

Deepfried-Chips commented 1 year ago

Doesn't sound like a Wails bug: https://answers.microsoft.com/en-us/windows/forum/all/error-0x80070718-not-enough-quota-is-available-to/08d799ce-835e-4bf1-a1f8-4498a48ffe99

from my encounters, that wasn't always the error, the only consistent part was the [0801/161825.222:ERROR:window_impl.cc(119)] Failed to unregister class Chrome_WidgetWin_0. Error = 0 but I will look into it, my original search didn't crop up much

Deepfried-Chips commented 1 year ago

gotta love windows being inconsistent, it might be related to me recently cloning my hard drive since I bought an ssd to replace it, and by default windows makes a Hybrid MBR (MBR and GPT on one drive) layout

altho, the project was being done on my C drive, which was unchanged, and in terms of what you said, those are talking about network share related errors

And I can only replicate with Wails, not seeing any problems with a Tauri app (flightcore in this test, which is a manager for the titanfall 2 modding library Northstar)

Deepfried-Chips commented 1 year ago

tried another windows machine and the only real difference between this and that is that this is an intel machine, this one is amd, and the go version is 1 minor different

Deepfried-Chips commented 1 year ago

I don't know what I did but I fixed it, so i'm gonna be closing it here.

Deepfried-Chips commented 1 year ago

Oh you gotta be kidding, not even half an hour later, problem's back, dunno why it doesn't work on this pc but does on the other, but i'm about 5 minutes away from reinstalling windows

Deepfried-Chips commented 1 year ago

i'll keep you updated, currently going through every possible step

leaanthony commented 1 year ago

Please feel free to update this issue with your progress, however I'm closing as it really isn't a Wails issue 👍

rasteiner commented 2 months ago

Just had the same issue. Everytime I minimized the window and then tried to maximize it again the app crashed.

A slightly different error however:

2024/08/28 19:56:25 The parameter is incorrect.
[0801/161825.222:ERROR:window_impl.cc(119)] Failed to unregister class Chrome_WidgetWin_0. Error = 0

The parameter is incorrect. also happens to be the error message of a failed syscall to user32.dll I had done before. Maybe it's a coincidence, maybe not. Even though after restarting the app, it consistently crashed when maximizing, even when removing any reference to the syscall. Only rebooting the PC fixed it for me. Is it possible that wails keeps some logs about failed syscalls and then checks that when focusing the window to then panic when it finds an error or a similar behaviour?