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

Eel + Electron Forge + Vite: ERR_CONNECTION_REFUSED #738

Open
M1dnight-ofcl opened this issue Jul 16, 2024 · 1 comment
Open

Eel + Electron Forge + Vite: ERR_CONNECTION_REFUSED #738

M1dnight-ofcl opened this issue Jul 16, 2024 · 1 comment
Labels

Comments

@M1dnight-ofcl
Copy link

M1dnight-ofcl commented Jul 16, 2024

Eel version
0.16.0 (also present in 0.17.0 after testing)

Describe the bug
I added a python file named main.py to my electron project. here is the contents of it:

import eel;
import eel.browsers;
#---
eel.init('web');
eel.browsers.set_path('electron','node_modules/electron/dist/electron');
eel.start(mode='electron');

everytime i run this python file, it makes the electron window but gives me the following error:

(node:35720) electron: Failed to load URL: http://localhost:5173/ with error: ERR_CONNECTION_REFUSED
(Use `electron --trace-warnings ...` to show where the warning was created)

To Reproduce
Steps to reproduce the behavior:

  1. Create an Electron Forge project
  2. Add the following code in a file named main.py
  3. run main.py
  4. error happens after a couple of second of the window being open

Expected behavior
I Expected the electron window to also have the contents of my app, which i wrote in vite. it did not infact do this.

System Information

  • OS:Windows 11 x64
  • Browser: Chrome
  • Python Distribution: Python 3.11.4

Screenshots
image

Additional context
Add any other context about the problem here.

@M1dnight-ofcl
Copy link
Author

I tried updating to 0.17.0 but nothing has changed

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

1 participant