Custom(No more values on the wire, the expected type nat64 is not opt, reserved or null)

I’m testing out init arguments in Azle, and all of the sudden I can’t deploy canisters locally with parameters. I am using dfx 0.9.3 and I’ve been trying to follow the advice here: Upgrade canister on ic with new dfx version - #7 by ericswanson but I keep the following error every time I try to deploy with an argument:

Installing canisters...
Upgrading code for canister init, with canister_id rrkah-fqaaa-aaaaa-aaaaq-cai
Error: The Replica returned an error: code 5, message: "Canister rrkah-fqaaa-aaaaa-aaaaq-cai trapped explicitly: Custom(No more values on the wire, the expected type nat64 is not opt, reserved or null)"

The code looks like this, just a normal init with a simple argument:

import {
    Init,
    ic,
    nat64
} from 'azle';

export function init(nat64: nat64): Init {
    ic.print('nat64', nat64);
}

Did you update the did file to include the init arg types and deploy with dfx deploy --argument "(42)"?

1 Like

Ah, I see the service needs the parameters. I will try that, thanks!

This worked! Thank you