Can't install canister in 0.9.2

I’m trying to run dfx deploy after upgrading to 0.9.2, but I get this error:

...
Installing canisters...
Installing code for canister service, with canister_id va76m-bqaaa-aaaaa-aaayq-cai
Error: The Replica returned an error: code 5, message: "Wasm module of canister va76m-bqaaa-aaaaa-aaayq-cai is not valid: Wasm module has an invalid import section. Module imports function 'canister_cycle_balance128' from 'ic0' that is not exported by the runtime."

Things I’ve tried:

  • Upgrading an existing canister
  • Reinstalling an existing canister
  • Deleting and creating a new canister
  • Reinstalling dfx

None of these is fixing the issue. Any idea what could be going wrong? Thanks.

1 Like

There was some breaking changes. From .0.8.0 to 0.9.0 versions of dfx. Bit me too.

Yeah I fixed the 403 error by adding my principal as a controller, but this error is something else entirely…

Are you deploying this locally or on the main net? Is it possible that you have an old version of dfx start running and the local deploy is talking to that replica?

2 Likes

I’m so dumb, thanks.