Wallet-deploy failed

I started learning IC and got immediately stuck deploying a wallet for my identity. Here are details:

I create a canister with my identity ‘alien’ (uus5n-5xj5l-ngo5q-uqe5v-aqpgd-4nsod-w3gxa-7eqel-n77j4-5ekqg-hae):
s0lav@Ubuntu-Alien:~$ dfx ledger --network ic create-canister uus5n-5xj5l-ngo5q-uqe5v-aqpgd-4nsod-w3gxa-7eqel-n77j4-5ekqg-hae --amount 0.32
Please enter the passphrase for your identity: [hidden]
Decryption complete.
Transfer sent at block height 5564753
Canister created with id: “p5hhr-hyaaa-aaaal-qbtka-cai”

I deploy wallet for alien and get an error:
s0lav@Ubuntu-Alien:~$ dfx identity --network ic deploy-wallet p5hhr-hyaaa-aaaal-qbtka-cai
Please enter the passphrase for your identity: [hidden]
Decryption complete.
Creating a wallet canister on the ic network.
Error: Failed to create wallet for identity ‘alien’ on network ‘ic’.
Caused by: Failed to create wallet for identity ‘alien’ on network ‘ic’.
Failed to store wallet wasm.
The replica returned an HTTP Error: Http Error: status 503 Service Unavailable, content type “application/cbor”, content: Requested canister has no wasm module

Wallet is not created:
s0lav@Ubuntu-Alien:~$ dfx wallet --network ic balance
Please enter the passphrase for your identity: [hidden]
Decryption complete.
Error: Failed to setup wallet caller.
Caused by: Failed to setup wallet caller.
Failed to get wallet canister caller for identity ‘alien’ on network ‘ic’.
Failed to get wallet for identity ‘alien’ on network ‘ic’.
Wallet not configured.
Diagnosis was added here.
Error explanation:
This command requires a configured wallet, but the combination of identity ‘alien’ 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 ’ to your command.
  • Switch to an identity that has a wallet configured using ‘dfx identity use ’.
  • Configure a wallet for this identity/network combination: ‘dfx identity set-wallet --network ’.

I try to redeploy but get an error that wallet has already been created:
s0lav@Ubuntu-Alien:~$ dfx identity --network ic deploy-wallet p5hhr-hyaaa-aaaal-qbtka-cai
Please enter the passphrase for your identity: [hidden]
Decryption complete.
Creating a wallet canister on the ic network.
Error: Failed to create wallet for identity ‘alien’ on network ‘ic’.
Caused by: Failed to create wallet for identity ‘alien’ on network ‘ic’.
The wallet canister “p5hhr-hyaaa-aaaal-qbtka-cai” already exists for user “alien” on “ic” network.

Wallet canister’s status is OK:
s0lav@Ubuntu-Alien:~$ dfx canister --network ic status p5hhr-hyaaa-aaaal-qbtka-cai
Please enter the passphrase for your identity: [hidden]
Decryption complete.
Canister status call result for p5hhr-hyaaa-aaaal-qbtka-cai.
Status: Running
Controllers: uus5n-5xj5l-ngo5q-uqe5v-aqpgd-4nsod-w3gxa-7eqel-n77j4-5ekqg-hae
Memory allocation: 0
Compute allocation: 0
Freezing threshold: 2_592_000
Memory Size: Nat(3786242)
Balance: 1_252_337_768_331 Cycles
Module hash: 0xb944b1e5533064d12e951621d5045d5291bcfd8cf9d60c28fef02c8fdb68e783

Why did I fail to deploy a wallet and how to fix this mess?

I found a way around:

I use set-wallet instead of deploy-wallet:
s0lav@Ubuntu-Alien:~$ dfx identity --network ic set-wallet p5hhr-hyaaa-aaaal-qbtka-cai
Please enter the passphrase for your identity: [hidden]
Decryption complete.
Checking availability of the canister on the network…
Setting wallet for identity ‘alien’ on network ‘ic’ to id ‘p5hhr-hyaaa-aaaal-qbtka-cai’
Wallet set successfully.

Now everything is OK:
s0lav@Ubuntu-Alien:~$ dfx identity --network ic get-wallet
Please enter the passphrase for your identity: [hidden]
Decryption complete.
p5hhr-hyaaa-aaaal-qbtka-cai

s0lav@Ubuntu-Alien:~$ dfx wallet --network ic balance
Please enter the passphrase for your identity: [hidden]
Decryption complete.
1.249 TC (trillion cycles).

So tutorial that I initially used (Internet Computer Content Validation Bootstrap) was wrong (deploy-wallet didn’t work in my case).

1 Like

Thanks for the detailed steps you took! I’ll make a note to check what we can do to improve the error messages and the wallet-limbo. Most likely we’re setting something before the wallet is successfully installed…