403 forbidden error when running command "dfx identity --network ic deploy-wallet <canister-identifer>"

Hey everyone, I am trying to figure out an error when I run the command "dfx identity --network ic deploy-wallet ", the error I get is “The replica returned an HTTP Error: Http Error: status 403 Forbidden, content type “”, content: Requested canister rejected the message”. I have ICP and I’ve converted them to cycles already. I am following the network deployment quick start tutorial.

Thank you everyone for your time and help in solving this.

1 Like

Hi Jared, can you break down the steps you’ve taken already? When you say you’ve converted ICP to cycles already, have you used them to create a canister that will host your cycles wallet?

While we’re at it, what is the output of the command dfx identity --network ic get-wallet?

1 Like

I am following the network deployment quick start guide here Network deployment :: Internet Computer

I have gotten all the way down to the paragraph labeled “Convert ICP tokens to cycles”, I did step one no problem but when I get to step 2 where it tells me to run the command dfx identity --network ic deploy-wallet is where I get the 403 forbidden error.

When I run dfx identity --network ic get-wallet I get:
Creating a wallet canister on the ic network.
The replica returned an HTTP Error: Http Error: status 404 Not Found, content type “text/html”, content:

404 Not Found

404 Not Found


nginx/1.19.10
1 Like

Sorry I didnt answer this question “When you say you’ve converted ICP to cycles already, have you used them to create a canister that will host your cycles wallet”

I think I did, that is done with command "dfx ledger --network ic create-canister --amount ", is that correct?

1 Like

Okay great, so you have a canisterId to point at, created from the dfx ledger --network ic create-canister <principal-identifier> --amount <icp-tokens> command

1 Like

I may be wrong about this, but I think you may need to set that canisterId as your wallet first before deploying, with the current logic in dfx. That will look like

dfx identity --network ic set-wallet <canister-id>, and you may need to run that command with --force at the end.

Then, the deploy-wallet command may go through. If this works like I think it should, I can update the guide for the next person to come along

1 Like

Ok let me give that a shot and I will let you know thank you

1 Like

Ok so I ran dfx identity --network ic set-wallet and this is the error I got

1 Like

Are you on dfx 0.7.2?

1 Like

oof no, I’m on 0.7.1

1 Like

Here’s a helpful snippet I use to keep my version up to date:

dfxv () {
	if [ -n "$1" ]
	then
		export DFX_VERSION="$1"
	fi
	sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
}
1 Like

That is helpful thank you, so update then try again with the dfx identity --network ic set-wallet command?

I’d try it again just to see, but the more likely outcome is that deploy-wallet will work this time

1 Like

ok great, let me try and I’ll let you know

1 Like

Screen Shot 2021-06-21 at 16.26.42

Ok updated but still getting same error I ran dfx identity --network ic set-wallet --force and still got the no wasm module error, I also updated the version in my dfx.json to 0.7.2

1 Like

this error here

1 Like

and deploy-wallet is still giving you the 403 error?

1 Like

it is yes, giving me the same 403 error

1 Like

Hmm, I know a workaround, but it’s pretty kludgey.

Not recommended
The workaround I have done before is:
clone GitHub - dfinity/cycles-wallet: DFINITY Cycles Wallet

add a canister_ids.json file with the following code:

{
  "wallet": {
    "ic": "<canister-id>"
  }
}

Then run

dfx build wallet
dfx canister --network ic --no-wallet install wallet
dfx identity --network ic set-wallet <canister-id>
dfx wallet --network ic upgrade