# Wallet upgrade not possible

**URL:** <https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113>\
**Category:** Command Line Tools\
**Created:** [February 24, 2022, 11:06pm UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113 "2022-02-24T23:06:24Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [February 24, 2022, 11:06pm UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/1 "2022-02-24T23:06:24Z")

</div>

i’m currently trying to upgrade my wallet, but it fails with the following error:

```auto
❯ dfx wallet --network ic upgrade
The replica returned an HTTP Error: Http Error: status 403 Forbidden, content type "", content: Requested canister rejected the message

```

my current identity is the controller of the wallet

```auto
❯ dfx identity --network ic get-principal
cbvco-k27pa-...-dayv3-4qe
❯ dfx wallet --network ic controllers
cbvco-k27pa-...-dayv3-4qe

```

is this a bug?

tagging @diegop bc i don’t know whose expertise this is

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [February 25, 2022, 12:09am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/2 "2022-02-25T00:09:29Z")

</div>

thanks for tagging me @cryptoschindler . let me escalate within the team

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [February 25, 2022, 4:58am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/3 "2022-02-25T04:58:11Z")

</div>

Hi there, what version of `dfx` are you using? That will help us investigate. Thank you

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [February 25, 2022, 8:28am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/4 "2022-02-25T08:28:56Z")

</div>

thanks for the quick response!

i’m using `0.9.0`

---

<div class="post-metadata">

**Author:** ![ericswanson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ericswanson/32/622_2.png) [@ericswanson](https://forum.dfinity.org/u/ericswanson)\
**Post date:** [February 25, 2022, 5:06pm UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/5 "2022-02-25T17:06:14Z")

</div>

Would you please run the following?

```auto
$ dfx identity --network ic get-wallet
$ dfx canister --network ic status $(dfx identity --network ic get-wallet)
$ dfx wallet --network ic addresses

```

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [February 28, 2022, 10:01am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/6 "2022-02-28T10:01:38Z")

</div>

```auto
❯ dfx identity --network ic get-wallet
lom6m-...-cai
❯ dfx canister --network ic status $(dfx identity --network ic get-wallet)
The replica returned an HTTP Error: Http Error: status 403 Forbidden, content type "", content: Requested canister rejected the message
❯ dfx wallet --network ic addresses
Id: edhea-...-sqe, Kind: Unknown, Role: Custodian, Name: No name set.
Id: cbvco-...-4qe, Kind: Unknown, Role: Controller, Name: No name set.
Id: ec4jk-...-tqe, Kind: Unknown, Role: Custodian, Name: No name set.
Id: 3hlbk-...-dqe, Kind: Unknown, Role: Contact, Name: No name set.

```

---

<div class="post-metadata">

**Author:** ![ericswanson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ericswanson/32/622_2.png) [@ericswanson](https://forum.dfinity.org/u/ericswanson)\
**Post date:** [February 28, 2022, 10:14am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/7 "2022-02-28T10:14:52Z")

</div>

It looks like the identity that you are using isn’t the controller of the wallet, at the canister level. The wallet’s address list is a different entity from the list of controllers of the canister.

Would you please run this? (`dfx canister info`, which works for anyone, vs `dfx canister status`, which works only for a controller of the canister)

```auto
$ dfx canister --network ic info $(dfx identity --network ic get-wallet)

```

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [February 28, 2022, 10:39am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/8 "2022-02-28T10:39:44Z")

</div>

you are right!

```auto
❯ dfx canister --network ic info $(dfx identity --network ic get-wallet)
Controllers: 3hlbk-...-dqe
Module hash: 0x9183a38dd2eb1a4295f360990f87e67aa006f225910ab14880748e091248e086

```

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [February 28, 2022, 10:41am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/9 "2022-02-28T10:41:04Z")

</div>

I didn’t even know there’s a distinction between controller at canister level and controller at wallet level, it might be of helps to use a different term here to avoid confusion?

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [February 28, 2022, 10:49am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/10 "2022-02-28T10:49:34Z")

</div>

When trying to update the controller for the wallet canister I get the following error (I’m using the identity that is the controller at the canister level):

```auto
❯ dfx canister --network ic update-settings --controller mainnet $(dfx identity --network ic get-wallet)
Cannot find canister name for id 'lom6m-...-cai'.

```

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [February 28, 2022, 10:51am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/11 "2022-02-28T10:51:05Z")

</div>

Adding the principal to `canister_ids.json` doesn’t help either:

```auto
❯ dfx canister --network ic update-settings --controller mainnet lom6m-...-cai
Cannot find canister 'wallet'.

```

---

<div class="post-metadata">

**Author:** ![ericswanson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ericswanson/32/622_2.png) [@ericswanson](https://forum.dfinity.org/u/ericswanson)\
**Post date:** [February 28, 2022, 10:57am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/12 "2022-02-28T10:57:33Z")

</div>

> it might be of helps to use a different term here to avoid confusion?

Yeah, it’s confusing.

---

<div class="post-metadata">

**Author:** ![ericswanson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ericswanson/32/622_2.png) [@ericswanson](https://forum.dfinity.org/u/ericswanson)\
**Post date:** [February 28, 2022, 11:05am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/13 "2022-02-28T11:05:13Z")

</div>

Okay, `update-settings` is trying to look up the canister name in `dfx.json` given the canister id. So it might work to add it there, in addition to `canister_ids.json`.

Another option would be to try `dfx --identity mainnet wallet --network ic upgrade`

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [February 28, 2022, 11:46am UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/14 "2022-02-28T11:46:30Z")

</div>

Adding the canister name to `dfx.json` did the trick! Can we avoid this in general? So that we don’t need to modify `dfx.json` or `canister_ids.json` when running commands that address a principal directly? `dfx` should have everything it needs (the canister id) to run the command correctly without needing to specify stuff somewhere else, right?

Thanks for your help Eric! 🙂

---

<div class="post-metadata">

**Author:** ![ericswanson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ericswanson/32/622_2.png) [@ericswanson](https://forum.dfinity.org/u/ericswanson)\
**Post date:** [February 28, 2022, 5:29pm UTC](https://forum.dfinity.org/t/wallet-upgrade-not-possible/11113/15 "2022-02-28T17:29:57Z")

</div>

The reason `dfx canister update-settings` is looking up the canister in dfx.json is to look up the compute allocation, memory allocation, and freezing threshold, so it might not be that simple.

In this case though, the way to upgrade a wallet is to upgrade it with the identity that created it, in this case `dfx --identity mainnet wallet --network ic upgrade`
