Forntend upgrade fail

Failed to create batch: The replica returned a replica error: Replica Error: reject code CanisterReject, reject message Caller does not have Prepare permission, error code None.

The identity you are trying to update your frontend with does not have the required permissions to modify files. Are you using the right identity?

For what it’s worth I’m having the same problem.

dfx identity get-principal is the same principal as my canisters controller in the NNS.

This is the first time I’m using a new CLI wallet and this effects my frontend canister only.

Did we ever find the fix?

You should reinstall your frontend canister.

The asset canister only grants permissions to the installer by default. But if you are a controller you can also give yourself the required permissions:

dfx canister call ugd_frontend grant_permission '(record { to_principal = principal "<your principal here>"; permission = variant {Commit} })'
dfx canister call ugd_frontend grant_permission '(record { to_principal = principal "<your principal here>"; permission = variant {Prepare} })'
1 Like

Ahh, yes. It was my first time changing wallets.

These commands on the network made the fix. Thank You.

1 Like