So I upgraded my dfx to 0.14.2, and saw this strange error.
It resisted upgrading my canister, by throwing I am not the controller of canister, but this happens only when I am upgrading my canister with a new network config added in dfx.json.
So I added staging as a network in dfx.json like this :
"stag": {
"providers": [
"https://ic0.app"
],
"type": "persistent"
}
Now canisters with network ic are getting upgraded normally, but when i am deploying canister with flag –network stag, it throws i am not the controller of canister, but as soon as i changed network of canister in canister_ids.json file, it got upgraded normally.
So should i change network configs in dfx.json? Or its a sdk error?