Canister's controllers: Error in deployment

Trying to post to Developers category but New topic is not activated for me as new user.

dfx identity get-principal
gives me:


dfx deploy --network ic
gives me:

The invocation to the wallet call forward method failed with the error: An error happened during the call: 5: Only the controllers of the canister XXXX-XXXX-XXXX-XXXX-cai can control it. Canister’s controllers: osn…dwr-pqe zbz…rw4-cqe

Why that error? My principal ID is in the canister’s controllers list? Can anyone guess?

Do you have enough cycles to deploy the canister?

I have already created the canister on NNS with my safe secret and added the principal address of my laptop to the canister’s controllers list. Indeed “zbz…rw4-cqe” is my NNS principal while “osn…dwr-pqe” is my computer’s. But both show up in the error message. So the canister has indeed both addresses assigned.

And yes the canister also has 3.4T cycles… Isn’t this enough? :sweat:

That amounts to about $2.21. 4T cycles is the minimum dfx allows - 1T as the fee to create a canister, and 3T to provide it with cycles to run a while before freezing

Yes, that’s enough cycles. Which version of dfx are you using? Run dfx --version to see.

The version is 0.8.0
My bad… I have 31.4T cycles

The thing really is the error message itself:

Only the controllers of the canister < canister ID > can control it

But my principal is in the list of that canister’s controllers

Then it sais:

Sender’s ID: < canister ID >

Screenshot 2021-08-06 at 21.18.21

which I don’t know what is… the sender ID being the canister’s ID… not sure what Sender refers to. Should the sender ID be like that?

Also having this problem… will update here should I find something

Is there any update on this issue? Anyone who has dealth with this?

The canister is created on NNS. The canister original controller is “zbz…rw4-cqe” and though NNS added additional controller “osn…dwr-pqe” which is my computer’s result of “dfx identity get-principal”

dfx deploy --network ic

doesn’t allow me to deploy the code to the canister I have created through the NNS

My guess would be this -

DFX assumes that you are creating canisters through a Cycles Wallet, like the one you would get through A call to dfx deploy --network ic will attempt to forward that call through the cycles wallet, which dfx assumes is the controller of the wallet.

If you went through the NNS app and added your identity through dfx identity get-principal, that identity won’t be the identity of your wallet, but instead an identity that is generated from a local private key on your device. You can think of that as a public key for your development environment.

To make a call to the IC using that identity directly, you will need to pass a --no-wallet flag to the command. In this case that would be:

dfx deploy --network ic --no-wallet

I am having the same issue here and the solution proposed by @kpeacock didn’t work for me. How do I check if my id is in the list of controllers for a particular canister @sparebytes?

dfx canister --network ic info <canister> will show it’s controllers. Example with OpenChat’s main canister:

❯ dfx canister --network ic info 6hsbt-vqaaa-aaaaf-aaafq-cai
Controllers: 7y2se-wiaaa-aaaaf-aaaba-cai
Module hash: 0xe0df779f65fe44893d8991bef0f9af442bff019b79ec756eface2b58beec236f

Thanks @Severin, using that command I found out which wallet was the controller of the canisters and than I needed to reinstall those cannisters specifying the controller wallet.

  1. Find out who is the controller of the canister:

dfx canister --network ic info <canister-id>

  1. Realize that the id of the controller returned, represent a wallet id which was created almost a year ago;

  2. Pass --wallet parameter (since my principal did not have direct control of the canisters):

dfx canister --network ic --wallet <controller-wallet-id> install <canister-name> --mode reinstall

1 Like

In my case it was necessary to specify a wallet.

Instead of always passing in the wallet, you can also add yourself to the controllers with dfx canister update-settings as described in the troubleshooting section here: Deploy a "Hello World" Dapp in 10 Minutes | Internet Computer Developer Portal