Can't Upload Frontend after DFX upgrade

I upgraded dfx this morning and the command I used to upgrade the frontend:

dfx canister install OpenFPL_frontend --ic --mode=upgrade

Gives me:
Only controllers of canister bgpwv-eqaaa-aaaal-qb6eq-cai can call ic00 method install_code, error code Some(“IC0512”)

I have tried both the identities I have on my laptop, I did nothing but upgrade dfx so not sure what changed.

Here’s what I suspect:

  • Your identity is not a controller of the frontend but is allowed to upload content
  • The frontend is on the wasm version that was bundled with the previous version of dfx, therefore when deploying the frontend dfx didn’t attempt to install the wasm but instead only ran the asset sync
    • In case you want to verify this: switch back to previous dfx version and deploy again but add the --upgrade-unchanged flag. You should get the same error you’re getting now
  • The new dfx version attempts to upgrade the wasm since it has a newer wasm bundled

What you can do to fix:

  • I don’t know of a way to get dfx to only do the asset sync. But you could use icx-asset to run the sync manually
  • Switch back to the previous dfx version for frontend deployments
  • Update the frontend canister to the wasm that’s in the latest dfx version

Ideally I wouldn’t want to switch back to an old version of dfx, I’ll roll with whatever process is now the done way.

Would this issue be solved if I upgrade the wasm build to the latest version, and follow the path you mentioned here, where the frontend is updated via SNS proposal. I would prefer this as I should have no special power really.

Yes, that would work. You can either get the wasm from here (switch to the right release branch for your new version) or from .dfx/ic/canisters/<canister name>/assetstorage.wasm.gz after your failed deployment attempt

1 Like

Yeah I normally gzip and get from .dfx folder, I have that all setup so will build with new version of dfx and get the proposal raised.

Checked the controllers for the frontend the OpenFPL SNS Root is the only one so it should work, thanks Severin.

1 Like