Eel: Python crashes after moving from one HTML page to another HTML page.

Created on 6 Apr 2020  路  4Comments  路  Source: ChrisKnott/Eel

Many people raised issue about this earlier but not resolved.
After sometime switching from one webpage to another through internal links Python crashes leaving webpages unable to load. I'm using eel for building an Machine Learning related project. I don't know anything about web development.

Here's home page looks like
Screenshot from 2020-04-06 11-55-38

And after moving to another page like
Screenshot from 2020-04-06 11-57-59

Now if move to another page, app crashes and I get a blank screen like this
Screenshot from 2020-04-06 11-59-55

Also app is not closing (terminal) after closing window (app window) . This happens when there is no internal JS function call to Python. I have to force exit by pressing Ctrl + C.
Screenshot from 2020-04-06 12-04-08

Please resolve the issue and help me.
Thank you.

bug

Most helpful comment

@samuelhwilliams Thank you for your reply. I have added eel.jsmyself earlier for all pages and issue got resolved. Sorry I didn't close the issue.

All 4 comments

Can you upload some samples files here so we can replicate the issue?

I can add myself to this issue, my app crashes when an event that requires a new html to be loaded is triggered repeatedly and in some cases on a single click, especially if one were to spam click a link that points to an html file, say a <a href="index.html"> the whole thing crashes without errors on the console after a few clicks.

Using this fancy diagram:

web             (parent folder that holds `index.html`)
 \___pages      (children of web folder that holds `loading.html` and `404.html`)

One interesting pattern for me(could certainly be specific to my setup), when my app logic navigates from loading.html to index.html i get no issues at all everything keeps running. But if the logic takes it from loading.html to 404.html (sibling items on the pages folder) then the app crashes.

In this case it plays in my favor as my logic includes closing the app if it ever hits the 404.html but im not sure thats the expected behavior naturally.

i start my app like so:

import eel
eel.init('web')
eel.start('pages/loading.html', host=socket.getfqdn(), size=(1300, 1000), mode='custom', port=443)

This item is old but was what brought me here: #54

Does your 404.html page embed eel.js? The Eel server shuts down shortly after the last websocket to it closes. This means that it always needs to have a connection open for the server to stay alive at the moment.

Often people find that the server "crashes" because they visit a page that doesn't open a connection to Eel - which causes Eel to shut itself down (in theory, gracefully). But clearly this is causing users some problems, so we may want to provide some extra information to users in this case.

@santhalakshminarayana - can you confirm that all of your pages include eel.js?

@samuelhwilliams Thank you for your reply. I have added eel.jsmyself earlier for all pages and issue got resolved. Sorry I didn't close the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Slexom picture Slexom  路  6Comments

04fsnape picture 04fsnape  路  4Comments

JanStgmnn picture JanStgmnn  路  4Comments

alifeinbinary picture alifeinbinary  路  3Comments

ghost picture ghost  路  6Comments