mediocre icon indicating copy to clipboard operation
mediocre copied to clipboard

localhost refused to connect.

Open harryherold opened this issue 2 years ago • 2 comments

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 avatar Dec 28 '22 16:12 harryherold

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.

harryherold avatar Dec 28 '22 16:12 harryherold

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.

nilaysavant avatar Dec 29 '22 12:12 nilaysavant