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.

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.

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 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.