Hi @Tobarrientos2 and @paulous,
The fix PR on the dfx
side has been merged. The next dfx
release (expected in the week of March 4th) will include this fix.
I also came up with a workaround that will unblock you even without the fixed dfx deps
.
Step 1
Declare internet-identity
as a pull type canister in dfx.json
.
{
"canisters": {
"ii": {
"type": "pull",
"id": "rdmx6-jaaaa-aaaaa-aaadq-cai"
}
}
}
Step 2
Run dfx deps pull
:
$ Fetching dependencies of canister rdmx6-jaaaa-aaaaa-aaadq-cai...
Found 1 dependencies:
rdmx6-jaaaa-aaaaa-aaadq-cai
Pulling canister rdmx6-jaaaa-aaaaa-aaadq-cai...
WARN: Canister rdmx6-jaaaa-aaaaa-aaadq-cai has different hash between on chain and download.
on chain: a3b50a3b35c487b9e5e9cd0174845d83fe15d5bb5d78e507647ed2272777568f
download: 197d0423178a6ae2785c924b962648e2b47e6ccb2a25e98d9220d9f3ce5eebf7
Step 3
Replace the “wasm_hash” field in deps/pulled.json
with the download
hash you see above.
{
"canisters": {
"rdmx6-jaaaa-aaaaa-aaadq-cai": {
"name": "ii",
"wasm_hash": "197d0423178a6ae2785c924b962648e2b47e6ccb2a25e98d9220d9f3ce5eebf7",
"init_guide": "Use '(null)' for sensible defaults. See the candid interface for more details.",
"init_arg": null,
"candid_args": "(opt InternetIdentityInit)",
"gzip": true
}
}
}
Step 4
The following dfx deps init/deploy
will work.
$ dfx deps init
Canister rdmx6-jaaaa-aaaaa-aaadq-cai (ii) set init argument with "(null)".
$ dfx start --clean --background
...
$ dfx deps deploy
Installing canister: rdmx6-jaaaa-aaaaa-aaadq-cai (ii)
$ dfx canister call ii captcha_create
(
variant {
Ok = record {
png_base64 = "...";
challenge_key = "...";
}
},
)