Eel icon indicating copy to clipboard operation
Eel copied to clipboard

Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.

Open KirigayaKazuto06 opened this issue 2 years ago • 1 comments

Hey, I know this issue has probably been dealt with before, however I can't find any proper workarounds to it.

I'm getting this message: Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.

image

when I running my main.py

here's the code:

JS image

Python image

HTML image

and I really confused 'cause everything looks fine...

Any help will be very appreciated in advance.

KirigayaKazuto06 avatar Jul 27 '22 10:07 KirigayaKazuto06

You can see a 404 like that if you're not initializing eel (i.e. eel.init(<dir>)) and/or the start page path (i.e. eel.start(<path>)) properly.

I'm curious about line 4 of your main.py because the implementation of eel.init tries to find the absolute path for you and ensure it's properly escaped for your OS, etc.... was there a reason you did it like that instead of eel.init('web')? It's very possible that I'm overlooking something...

What happens when you update line 4 to eel.init('web')?

Also, depending on your OS, the "/" could be the wrong one. os.path.join (or similar from https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module) can help you out here.

dstricks avatar Aug 23 '22 00:08 dstricks