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
1 Like