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

localhost refused to connect. #20

Open
harryherold opened this issue Dec 28, 2022 · 2 comments
Open

localhost refused to connect. #20

harryherold opened this issue Dec 28, 2022 · 2 comments

Comments

@harryherold
Copy link

Hi,
I tried to build mediocre on my Windows 11 like

~> yarn
~> yarn tauri dev

When the tauri application starts, I get following error message:

localhost refused to connect.
ERR_CONNECTION_REFUSED

Please, could you tell what I am doing wrong?
I also tried to build a release ala:

yarn build:fe
@harryherold
Copy link
Author

I totally forgot the debug message

[2022-12-28T16:10:04Z INFO] Starting Tauri backend...
[2022-12-28T16:10:05Z INFO] db does not exist, creating new db...

I think the application has not the correct permissions.

@nilaysavant
Copy link
Owner

Hey @harryherold
Thanks for checking out mediocre.

The issue seems to be because Tauri can't find the front-end dev server on localhost.

If you want to run in dev you should try:

  • yarn start which concurrently runs:
    • yarn devfe
    • yarn devbe

Essentially the devfe (front-end dev server) needs to start before the devbe (Tauri backend). So that it can find it running on http://localhost:3000/. Also make sure you give the Windows firewall permission for the same.

I think in your case you do not want to develop it but rather just build it. In that case you should just run yarn build.

Also note that the project might still fail to build because its using a pre-release version of Tauri. I'm considering a rewrite of this in the future, therefore all developments on this have been on a hold.

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

No branches or pull requests

2 participants