Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python crashes after moving from one HTML page to another HTML page. #268

Closed
santhalakshminarayana opened this issue Apr 6, 2020 · 5 comments
Labels

Comments

@santhalakshminarayana
Copy link

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.

@RahulBadenkal
Copy link

RahulBadenkal commented Apr 7, 2020

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

@alepodj
Copy link

alepodj commented Apr 17, 2020

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

@samuelhwilliams
Copy link
Collaborator

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?

@santhalakshminarayana
Copy link
Author

@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.

@Rafayjiwani
Copy link

@samuelhwilliams Hi Sir .. I am building a Python Eel app with multiple pages, It works fine when starts and runs well but after some time of inactivity when I try to change or reload the page it crashes with the (local host refused to connect error) , can you please tell me how to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants