Quickstart First Deployment Errors on Windows

I’m having trouble getting past the quickstart local and network deployment tutorial. I am completely new at this so it could be something stupid but I can’t get anything to deploy.

I’m using a Windows computer with Ubuntu subsystem for Linux CLI. It’s my understanding that it works here too. I have installed and updated dfx, node.js, VSCode. Now here are some of the problem points.

Quickstart local development tab (got up to)
$ dfx canister create hello
returns code: 111 “tcp connect error”

Quickstart network development tab (got up to)
$ dfx deploy --network=ic
after trying to build canisters it returns httperror and does not deploy

One problem I get is when installing “brew” and going through the process, brew --version is never recognized but I thought this doesn’t matter since I have node. Has anyone had similar problems and know how to fix? Thank you.

1 Like

Check you’re using WSL version 2, as per this: https://forum.dfinity.org/t/native-windows-support/1241/2?u=ori

Also make sure you’re using two terminal windows, with dfx start left running in one of them.

1 Like

Switching to WSL version 2 got me over the hump. Didn’t realize everything that went into this but it’s working now. Thank’s Ori.

1 Like

My problem persists when trying to create canisters.
$ dfx canister create --all
“Could not reach the server”

Dfx is running in a separate cli tab. Any idea what I’m doing wrong Ori?

Try stopping and restarting the dfx start command, perhaps using the dfx start --clean flag to restore the project’s local network state to default.

No luck there. I’ve been trying those commands and restarting with no luck.

Are you seeing any errors in the dfx start terminal’s output? Has is started up correctly?

Jan 24 15:41:34.265 ERRO s:fscpm-uiaaa-aaaaa-aaaap-yai/n:qulyp-lyqyl-zzxe3-5k6gd-cpc6e-reqvx-iwo52-g57sc-4pb37-wwzlr-6ae/ic_consensus/random_tape_maker Couldn't find transcript at height 200 with finalized height 199 and CUP height 0

thread ‘replica-actor’ panicked at ‘called Result::unwrap() on an Err value: Cannot start the replica: Timeout’, src/dfx/src/actors/replica.rs:310:17
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Yes, this is the end of the start terminal output.

1 Like

Windows is not an officially supported platform at the moment. What previously worked under WSL or WSL2 might fail to work in new releases. We are aware of this problem, and we are working on supporting Windows developers through WSL.

Unofficially, I myself submitted patches recently to make things work under WSL again (I work for Dfinity). But it’ll take time for the patches to get into next release. Also, unless we have proper CI setup on Windows to catch future failures, we cannot guarantee official support.

The safer (but obviously non-optimal) fallback is to run dfx from a Linux running in VMWare or VirtualBox.

Okay. I actually was able to launch the hello canister a few months ago before WSL2 which now makes sense.

I hope this can be fixed. I shouldn’t have to buy a mac just for development purposes but thanks for letting me know, Paul.

1 Like

You can also connect VSCode to a VM so you don’t have to work inside the guest OS. Just get a Ubuntu Server for that.
If you want to be able to use vscode, you can enable port forwarding with Virtualbox. For that go to your vm settings > network > adapter 1 > advanced > port forwarding > add a rule ( ssh TCP 127.0.0.1 empty 22)

So my computer is not of a type that will run Linux well and the VirtualBox option seems pretty terrible.

I’m considering buying a cheap and crappy Linux compatible computer just for the purposes of learning ICP-related development. Is this a good idea? Should I expect limitations? Advice is much appreciated.

1 Like

Virtualbox is actually a very common solution for those who use windows, might not be as terrible as you’d think. The plus side of this approach is your development setup can easily be backed up and transferred around.

Edit: I’m super late, but just setting up my own development environment and google brought me here.

thread ‘replica-actor’ panicked at ‘called Result::unwrap() on an Err value: Cannot start the replica: Timeout’, src/dfx/src/actors/replica.rs:310:17

(… except I’m running Linux)

2 Likes

Also quite late, but I ended up getting a Linux machine and all the issues I was getting on windows went away while doing a second lap on the tutorials section. Still haven’t gotten much info on how/if WSL support changed, but for now, a crappy Linux Thinkpad was the right move.

I am running the SDK tutorials very nicely on VirtualBox, you might want to try it.

My setup runs Ubuntu 20.04 using 10G RAM and 3 CPU cores and 128MB video. Everything works fine.