Hi everyone!
I will describe this error, received following this guide:
I have downloaded locally the did and wasm files of identity and this is my dfx json:
“internet_identity”: {
“type”: “custom”,
“candid”: “src/internet_identity/internet_identity.did”,
“wasm”: “src/internet_identity/internet_identity_dev.wasm.gz”,
“remote”: {
“id”: {
“ic”: “rdmx6-jaaaa-aaaaa-aaadq-cai”
}
},
“frontend”: {}
},
I have put the files in those paths but running dfx deploy there is a problem with tha wasm file
I’m getting this error:
Error: The Replica returned an error: code 5, message: “Wasm module of canister rrkah-fqaaa-aaaaa-aaaaq-cai is not valid: Wasmtime failed to validate wasm module wasmtime::Module::validate() failed with Bad magic number (at offset 0)”
kcbat@kcbat-HP-Pavili
I tried to reproduce myself, and I found that the important factor is dfx start with 0.14.2. If that is run with 0.14.1 or lower it doesn’t fail, no matter which version of dfx deploys it. Continuing to investigate…
hey folks,
I was able to reproduce the issue using the dfx 0.14.2 using the snippet in this thread. At the same time both the dfx nns install and the II canister included into the 0.14.2 release work just fine for me.
For the latter I used the following dfx.json snippet:
Have you try with a snippet that fetches the .wasm.gz from GitHub? When dfx nns install is not used, that’s the most common way to embed II in project I think.
That’s exactly what I used and it didn’t work for me, while the dfx 0.14.2 WASM binary (i.e. "wasm": "/Users/a/.cache/dfinity/versions/0.14.2/wasms/internet_identity_dev.wasm",) seems to work just fine.
Sorry for the confusion. I never stated that the gzipped WASM is the issue. And in fact I just verified, it does not.
The dfx release 0.14.2 ships with an older II WASM binary (version 2022-07-11) and it works just fine. The first failing II version is 2023-04-28, i.e. 2023-04-12 still works fine: