The replica returned an HTTP Error: Http Error: status 400 Bad Request, content type "text/plain; charset=utf-8", content: Failed to connect to host: Connection refused (os error 111)

I’ve tried deploying and keeps failing with this error message on windows. any help would be appreciate. Everything seems good but for deploying.

Are you using WSL2?

(too few words
and forum wants more
haiku solves :leaves:)

Yes, I am. Everything seems great. But not sure what I’m missing out that it doesn’t deploy

What is is the method to check if I’m using WSL2 or how to update?

Just double check you’re running dfx start alongside and there are no errors in that terminal. Restarting dfx with a clean state using dfx start --clean might help too.

Also check that you’re storing your projects within the Linux file system, eg under ~/my_projects/ and not on a mounted drive eg /mnt/d/my_projects. The mounted drive can cause permissions issues for files.

As for WSL, see further down this page to check the version, if it’s v1 you’d need to upgrade, there are details on that here too: Install WSL | Microsoft Docs

1 Like