Eel icon indicating copy to clipboard operation
Eel copied to clipboard

Eel failed to show html pages after multiple refresh...

Open vikramsamak opened this issue 3 years ago • 8 comments

when I purposefully refreshed the index, it failed to reload it... is there any solution for this...

Note: I'm working on data science app in which I am showing some pie charts on frontend (by fetching data from python code) and that's why I was checking the performance of eel and the I found this bug.

vikramsamak avatar Oct 22 '22 11:10 vikramsamak

Since i dont see any activity from the original developr im going to tell you the solution to the problem from my own experience. Eel has a function that detects if the browser is still active, if it detects the page has been closed/refreshed it stops the python script. So, reloading is not compatible with refreshes. This feature is intended.

zinixyt avatar Nov 01 '22 15:11 zinixyt

Since i dont see any activity from the original developr im going to tell you the solution to the problem from my own experience. Eel has a function that detects if the browser is still active, if it detects the page has been closed/refreshed it stops the python script. So, reloading is not compatible with refreshes. This feature is intended.

I have been using eel for a while, and now and then I randomly get crashes when reloading a page or going to another page.

I generally get this on console:

WebSocket connection to 'ws://localhost:60220/eel?page=index.html' failed:

And the eel.js file points the error to this line:

eel._websocket = new WebSocket(websocket_addr);

All my html files have the eel.js tag btw.

Is there anything that could be done to solve this or make it more reliable?

1drg avatar Nov 02 '22 22:11 1drg

After seeing this many issues, I moved to another lib which also provides the facility of developing desktop based application by using HTML CSS JS.

vikramsamak avatar Nov 03 '22 01:11 vikramsamak

After seeing this many issues, I moved to another lib which also provides the facility of developing desktop based application by using HTML CSS JS.

What did you ended up using?

1drg avatar Nov 03 '22 12:11 1drg

Now I am using flaskwebgui which is based on flask.. its working great for me...

vikramsamak avatar Nov 03 '22 13:11 vikramsamak

Hey @vikramsamak, I'm sorry you were having trouble! I hope that flaskwebgui works better for your use case. Do you by chance have a small example where the issue is easily reproducible so that I can take a look and see for myself? Or anyone else that is willing to create an example would also be appreciated.

dstricks avatar Nov 14 '22 06:11 dstricks

@dstricks I also face similar issues during multiple refreshes or heavy page transitions. This tends to happen with transitions to large html pages, but it also reproduces with a very fast hit of the F5 key.

Launch ElloWorld and do a quick F5 refresh many times and you should be able to reproduce this.

kobayashi-deepinsight avatar Nov 21 '22 09:11 kobayashi-deepinsight

This issue was already resolved in #453. I could have been happy if I made shutdown_delay large enough.

kobayashi-deepinsight avatar Dec 06 '22 10:12 kobayashi-deepinsight