Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the behavior or the error message for the add_controller method. #66

Closed
lsgunnlsgunn opened this issue Apr 4, 2021 · 1 comment
Closed

Comments

@lsgunnlsgunn
Copy link
Contributor

After setting my wallet on the alpha network, I added an identity and tried to make that second identity as a controller.
If i call the get_controllers method, my default principal is the controller of my alpha wallet:

dfx canister --network=alpha call f3yw6-7qaaa-aaaab-qaabq-cai get_controllers                      
(
 vec {
  principal "zen7w-sjxmx-jcslx-ey4hf-rfxdq-l4soz-7ie3o-hti3o-nyoma-nrkwa-cqe";
 },
)

This is expected. But I try to add the principal for my second identity while I'm the default/controller identity by running this command:

dfx canister --network=alpha call f3yw6-7qaaa-aaaab-qaabq-cai add_controller '(principal "vpqee-nujda-46rtu-4noo7-qnxmb-zqs7g-5gvqf-4gy7t-vuprx-u2urx-gqe")'

I get an error:

The Replica returned an error: code 5, message: "Canister f3yw6-7qaaa-aaaab-qaabq-cai trapped explicitly: An error happened during the call: 4: Only the controller can call this method."

This is unexpected because I've just verified that I am, in fact, the controller.

@adamspofford-dfinity
Copy link
Contributor

The wallet now properly adds both itself and the caller as controllers when a canister is created, and DFX no longer automatically proxies any calls save canister creation through the wallet. This issue should be resolved upon installing the latest release of DFX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants