Closed mediawall closed 2 months ago
Fixed on master: https://github.com/wailsapp/go-webview2/pull/13
I found the panic occurs here: https://github.com/wailsapp/go-webview2/blob/ec818435537bbe310deee97015212770857b6a25/pkg/edge/chromium.go#L422-L428
This panic happens when the backend attempts to send the received message back to the frontend without any modification, and the message is long string.
It seems that when the data sent from the backend to the frontend via WebView is too large, the "Overlapped I/O operation is in progress" error occurs.
So, while it appears that the panic is caused by the frontend sending large data to the backend, it is actually similar to #12, where the issue is caused by the backend sending large data to the frontend(or more precisely, is caused by syscall
).
Additionally, I don't quite understand why MessageReceived, after receiving the message and executing the callback function, needs to send the message back to the frontend via PostWebMessageAsString without any modification. @leaanthony @mediawall maybe you should reopen this issue.
Error "Overlapped I/O operation is in progress" occurs if the length of the parameter is relatively long (approximately len(msg) >= 9000).
Steps to reproduce:
Download this project myproject.zip
Run wails dev Click the Greet button Then you will see the error message on the console.
Error happens on Windows, the app works well on Linux.