—add-controller and —controller are just so close that it’s easy to make this mistake.
Sounds like we need a dfx warning built in for the —controller flag. That plus or a redesign of this flag, or even maybe a —force flag for certain irrecoverable actions.
@jzxchiang Do you own the principal you gave access to in any way? If so you can re-add the controller on the canister you lost through that principal using the ic management canister’s update_settings method.
I suppose it depends on how exactly you have access through II. Since II generates a new pseudonymous principal for every separate url that requests login through II, it may be more or less difficult to do. If you’re in a random page, you should be able to do the calls through agent-js as Max describes. If you added the NNS principal, you should be able to manually add the canister to the canister list and add your normal principal through there.