SNS-Testing: Failed to parse payload for ic00 method install_chunked_code

I get the following error when trying to deploy locally:


Installing code for canister OpenFPL_backend, with canister ID avqkn-guaaa-aaaaa-qaaea-cai
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to install all canisters.
Caused by: Failed to install wasm module to canister 'OpenFPL_backend'.
Caused by: Failed during wasm installation call
Caused by: The replica returned a rejection error: reject code CanisterReject, reject message Failed to parse payload for ic00 method install_chunked_code: IC0408: Error decoding candid: Custom(Fail to decode argument 0

I’ve been following the sns-testing repo steps, it used to work… never had this error before. As you can see from the screenshots the testing repo was setup correctly so just wondering if something is required in the OpenFPL repo.

I think it’s because the sns-testing repo uses dfx 0.19.0 and my system is on 0.22.0.

When I switch to 0.19.0 I get the following error:

Specifically:
table: type table0 = vec table1
type table1 = record { 1_158_164_430 : table2 }
type table2 = vec nat8
wire_type: record { 1_158_164_430 : table2 }, expect_type: unknown

Hello, I’m just bumping this using 20 characters.

Some dfx versions around 0.18 had wrong install logic for larger wasms. Can you bump dfx in general or use a newer version for that single install call?

Hi @Severin,

I’m not sure what you meean by ‘bump dfx in general’ or use a different version for a call.

I would need to follow some kind of documentation as everything I know has come from the existing documentation.

If you could provide me the resources to perform these tasks and get the site testable with the current SNS testing repo, that would be great.

Happy to do the leg work but just not sure where to start.

This is in a Docker container, right? I meant that you would either use dfx 0.22.0 or a different version >0.19 entirely in Dockerfile. If that doesn’t work (no idea what can break if you do that), then you could also add dfxvm install 0.22.0 to the dockerfile, and then change only the failing call to e.g. dfx +0.22.0 canister install ...

1 Like

Thanks Severin will give this a go

So because my mac is new, from the sns-testing repo:

the ‘solution is based on Docker and is currently not supported on Apple silicon systems*’

So I didn’t use docker, is there a solution for the ’ Special instructions for Apple silicon users’?

No idea, but probably not. @mraszyk would know best I guess

sounds like a version mismatch between the replica and dfx making the request. I’m not sure about the other error you got when downgrading to 0.19.0. My recommendation would be to use a recent dfx version, e.g., the one you have installed locally. You can try to specify the version here and then rerun the install.sh script (step 3) and carry on by starting the replica (step 4), setup_locally.sh (step 5) and finally your test.

Updated the settings.sh to have the latest dfx im on, 0.22.0.

When I try to run the setup_locally.sh after it says local registry not found…

Also a destination invalid error in the terminal running the replica

Not sure if related but not sure I’ve seen that before either.

On linux, you can changing this line to:

REGISTRY=$(find "${HOME}/.local/share/dfx/network/local" -name ic_registry_local_store)

On a Mac, it’d be a few lines above:

REGISTRY="$(find "${HOME}/Library/Application Support/org.dfinity.dfx/network/local/state/replicated_state/ic_registry_local_store" -name ic_registry_local_store)"

So using this on the line a few lines above:

image

I get a new error, do I need to run from a different point to download any files? I added that line and ran ./setup_locally.sh

Please try the few prefixes on your laptop to see where the registry local store is for you and insert find there:

REGISTRY=".dfx/network/local/state/replicated_state/ic_registry_local_store"
REGISTRY="${HOME}/Library/Application Support/org.dfinity.dfx/network/local/state/replicated_state/ic_registry_local_store"
REGISTRY="${HOME}/.local/share/dfx/network/local/state/replicated_state/ic_registry_local_store"

The .dfx folder in the sns-testing repo is empty:
image

And when I search for ic_registry_local_store it can’t find the file anywhere but maybe because it’s a hidden folder someone else or i need to redo a step to get that file?

I also tried all 3 of these and got the same error.

The dfx start docs say:

dfx stores data for the shared local network in one of the following locations, depending on your operating system:

$HOME/.local/share/dfx/network/local (Linux)
$HOME/Library/Application Support/org.dfinity.dfx/network/local (Macos)

So once you run dfx start you should find the ic_registry_local_store there (confirmed with dfx v0.22.0).

Thanks for pointing me to the folder, when I list the files I don’t see the ic_registry_local_store file:

It isn’t a direct subfolder, that’s why I used the find command to find it recursively within a subfolder.