Eel icon indicating copy to clipboard operation
Eel copied to clipboard

connection to 'ws://localhost:8000/eel?page=main.html' failed: Could not decode a text frame as UTF-8.

Open bribrah opened this issue 5 years ago • 4 comments

Eel version 0.12.2 Describe the bug Occasionally loses WebSocket connection because of this error message connection to 'ws://localhost:8000/eel?page=main.html' failed: Could not decode a text frame as UTF-8.. This is happening when sending pretty large arrays to the front end To Reproduce send (1024x256) multidimensional array from python backend to the javascript front end like so eel.sendData(arr) until the error is produced (will not happen first time, seems to be random) Expected behavior Websocket does not close because of encoding error

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows
  • Browser Chrome

bribrah avatar May 21 '20 19:05 bribrah

By the way this appears to be caused by the javascript side calling eel before the last eel call has completed. I solved it by implementing a mutex on the javascript front end but Im sure there is a better way to do this in eel backend

bribrah avatar Jun 29 '20 18:06 bribrah

I am running into this same issue. Could you describe more how you implemented the mutex on the JavaScript front end?

justindbarrett avatar Jun 10 '21 21:06 justindbarrett

I'll look into this

ChrisKnott avatar Jul 22 '21 09:07 ChrisKnott