Errors creating a canister with 'dfx deploy'

I’m trying to set up a project locally, following the quickstart guide but I’m getting errors at the ‘dfx deploy’ stage.

Firstly, I was being told my account needed to be an administrator (which it was), but I seem to be able to get past that step. The very next part, though…

I get this message in the shell:
“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 61)”

And at this point the other shell window, running the server goes nuts and gives an error every few milliseconds along the lines of “Couldn’t find transcript at height 200 with finalized height 199…”

From that point ‘dfx start’ always throws the height error above until I start clean. But it never gets past the bad request error.

Anyone come across this before or have any troubleshooting steps I can try?

Thanks

Slightly different but similar error next attempt:

“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: Internal error: connector has been disconnected”

And in the replica terminal"

“Mar 12 10:01:31.666 WARN s:fscpm-uiaaa-aaaaa-aaaap-yai/n:uuafg-yid6r-7twlj-jasi4-5tzba-xpd4b-qrqkq-tzu4k-rn3op-r7o7y-nae/ic_consensus/block_maker Cannot propose block as the locally available validation context is smaller than the parent validation context (locally available=ValidationContext { registry_version: 1, certified_height: 7, time: Time(1615543291652678000) }, parent context=ValidationContext { registry_version: 1, certified_height: 99, time: Time(1615543240160242000) })”

Try running dfx start --clean, instead of dfx start, this will clear the local cache. Or you could manually delete the .dfx directory in your project. See if that helps the issue.

1 Like

Thanks for the suggestion, Ori. I have tried both of those things several times. It still throws up the http error sadly.