Trying to post to Developers category but New topic is not activated for me as new user.
dfx identity get-principal
gives me:
osn…dwr-pqe
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?
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?
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
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
DFX assumes that you are creating canisters through a Cycles Wallet, like the one you would get through https://faucet.dfinity.org/. 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:
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?
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.
Find out who is the controller of the canister:
dfx canister --network ic info <canister-id>
Realize that the id of the controller returned, represent a wallet id which was created almost a year ago;
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