Error when running dfx quickstart

I was playing around with dfx and setting up a new identity and cycle wallet. I tried out the dfx quickstart command but was stopped by an error.

% dfx quickstart
Your DFX user principal: sai5t-5avhd-uegcd-3odoy-tzosh-ehu5y-47r45-jgwar-ujjt6-wq7hl-dqe
Your ledger account address: c30ccf838855d92ed7257179bcee87d8c33a9a2e4804ddca452fe642d032e4b1
Your ICP balance: 3.30000000 ICP
Conversion rate: 1 ICP <> 3.0843 XDR
Import an existing wallet? no
Spend 3.24222676 ICP to create a new wallet with 10 TC? yes
⠲ Sending 3.24222676 ICP to the cycles minting canister...
  Sent 3.24222676 ICP to the cycles minting canister at height 6376918
  Created wallet canister with principal ID ohn6u-5qaaa-aaaal-acraq-cai
Error: Failed to install the wallet code to the canister
Caused by: Failed to install the wallet code to the canister
  Failed to construct wallet canister caller: The Replica returned an error: code 3, message: "IC0304: Attempt to execute a message on canister ohn6u-5qaaa-aaaal-acraq-cai which contains no Wasm module"

However after running dfx identity --network ic set-wallet ohn6u-5qaaa-aaaal-acraq-cai and verifying that the wallet had a wasm installed, I was able to get my balance. My question is: does someone has an idea why I did got the error in the 1st place?

For information here is the full log.

% dfx identity list
anonymous
bootcamp *
default
% dfx identity whoami
bootcamp
% dfx identity new
error: the following required arguments were not provided:
  <NEW_IDENTITY>

Usage: dfx identity new <NEW_IDENTITY>

For more information, try '--help'.
% dfx identity new d8x-frontend
Your seed phrase for identity 'd8x-frontend': XXX
This can be used to reconstruct your key in case of emergency, so write it down in a safe place.
Created identity: "d8x-frontend".
% dfx identity use d8x-frontend
Using identity: "d8x-frontend".
% dfx quickstart
Your DFX user principal: sai5t-5avhd-uegcd-3odoy-tzosh-ehu5y-47r45-jgwar-ujjt6-wq7hl-dqe
Your ledger account address: c30ccf838855d92ed7257179bcee87d8c33a9a2e4804ddca452fe642d032e4b1
Your ICP balance: 0.00000000 ICP
Conversion rate: 1 ICP <> 3.0800 XDR
Import an existing wallet? no

You need 3.24675325 more ICP to deploy a 10 TC wallet canister on mainnet.
Deposit at least 3.24675325 ICP into the address c30ccf838855d92ed7257179bcee87d8c33a9a2e4804ddca452fe642d032e4b1, and then run this command again, to deploy a mainnet wallet.

Alternatively:
- If you have ICP in an NNS account, you can create a new canister through the NNS interface
- If you have a Discord account, you can request free cycles at https://faucet.dfinity.org
Either of these options will ask for your DFX user principal, listed above.
And either of these options will hand you back a wallet canister principal; when you run the command again, select the 'import an existing wallet' option.
% dfx quickstart
Your DFX user principal: sai5t-5avhd-uegcd-3odoy-tzosh-ehu5y-47r45-jgwar-ujjt6-wq7hl-dqe
Your ledger account address: c30ccf838855d92ed7257179bcee87d8c33a9a2e4804ddca452fe642d032e4b1
Your ICP balance: 3.30000000 ICP
Conversion rate: 1 ICP <> 3.0843 XDR
Import an existing wallet? no
Spend 3.24222676 ICP to create a new wallet with 10 TC? yes
⠲ Sending 3.24222676 ICP to the cycles minting canister...
  Sent 3.24222676 ICP to the cycles minting canister at height 6376918
  Created wallet canister with principal ID ohn6u-5qaaa-aaaal-acraq-cai
Error: Failed to install the wallet code to the canister
Caused by: Failed to install the wallet code to the canister
  Failed to construct wallet canister caller: The Replica returned an error: code 3, message: "IC0304: Attempt to execute a message on canister ohn6u-5qaaa-aaaal-acraq-cai which contains no Wasm module"
% dfx identity --network ic deploy-wallet ohn6u-5qaaa-aaaal-acraq-cai
Creating a wallet canister on the ic network.
Error: Failed to create wallet for identity 'd8x-frontend' on network 'ic'.
Caused by: Failed to create wallet for identity 'd8x-frontend' on network 'ic'.
  The wallet canister "ohn6u-5qaaa-aaaal-acraq-cai" already exists for user "d8x-frontend" on "ic" network.
% dfx identity --network ic get-wallet
Error: Failed to get wallet for identity 'd8x-frontend' on network 'ic'.
Caused by: Failed to get wallet for identity 'd8x-frontend' on network 'ic'.
  Wallet not configured.
    Diagnosis was added here.
Error explanation:
This command requires a configured wallet, but the combination of identity 'd8x-frontend' and network 'ic' has no wallet set.
How to resolve the error:
To use an identity with a configured wallet you can do one of the following:
- Run the command for a network where you have a wallet configured. To do so, add '--network <network name>' to your command.
- Switch to an identity that has a wallet configured using 'dfx identity use <identity name>'.
- Configure a wallet for this identity/network combination: 'dfx identity set-wallet <wallet id> --network <network name>'.
- Or, if you're using mainnet, and you haven't set up a wallet yet: 'dfx quickstart'.
% dfx identity --network ic set-wallet ohn6u-5qaaa-aaaal-acraq-cai
Checking availability of the canister on the network...
Setting wallet for identity 'd8x-frontend' on network 'ic' to id 'ohn6u-5qaaa-aaaal-acraq-cai'
Wallet set successfully.
% dfx identity --network ic deploy-wallet ohn6u-5qaaa-aaaal-acraq-cai
Creating a wallet canister on the ic network.
Error: Failed to create wallet for identity 'd8x-frontend' on network 'ic'.
Caused by: Failed to create wallet for identity 'd8x-frontend' on network 'ic'.
  The wallet canister "ohn6u-5qaaa-aaaal-acraq-cai" already exists for user "d8x-frontend" on "ic" network.
% dfx wallet --network ic balance
9.888 TC (trillion cycles).

That’s really weird. Let me ask round…

1 Like

Should be fixed in #3219.

1 Like

Great! Thank you @AdamS @Severin

1 Like