Internet Identity Is Now Pullable!

Hi everyone

Just a quick announcement that the Internet Identity canister now supports the dfx deps feature.

You can add Internet Identity to your dev setup by specifying the following block in the canisters object in the dfx.json file:

{
  "canisters": {
    ...
    "internet-identity" : {
      "type": "pull",
      "id": "rdmx6-jaaaa-aaaaa-aaadq-cai"
    }
  },
  ...
}

This will pull in the dev build of Internet Identity (without WebAuthn and with a deterministic captcha).

If you need another flavour (i.e. prod or test build) you will still need to add Internet Identity via URL and type custom:

"internet_identity_prod": {
  "type": "custom",
  "candid": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity.did",
  "wasm": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity_production.wasm.gz",
  "remote": {
    "id": {
      "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
    }
  }
},

Please let me know if you encounter any issues.

18 Likes

If you’re new to the feature, here’s a quick guide on getting started with DFX Pull: How to use DFX Pull

5 Likes

I’ve been using the pulled version for local dev without issue however today I’m getting the following error:

ERROR: Failed to pull canister rdmx6-jaaaa-aaaaa-aaadq-cai.
Hash mismatch.
on chain: 1d655f0bae74b9e54f0663f52c54e62cdece329fd5e4d8dc6cc06c0febd523c4
download: 3c54c0005a41f3d8c5bfddf93636a2b9055d8901ab7aadbdd3ef2b69b711136c

Delete the cached canister data(<username>/.cache/dfinity/pulled) and it will work as expected, I had this issue and I think we should be able to rewrite the cached canister by calling dfx deps pull!

I tried that but I still get the hash mismatch error. For now I went back to calling it this way and it works fine:

"internet_identity": {
  "type": "custom",
  "candid": "https://github.com/dfinity/internet-identity/releases/download/release-2024-03-08/internet_identity.did",
  "wasm": "https://github.com/dfinity/internet-identity/releases/download/release-2024-03-08/internet_identity_dev.wasm.gz",
  "remote": {
    "id": {
      "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
    }
  },
  "frontend": {}
}

Hi @daniamorris

Could you please run dfx cache delete first and the run dfx deps pull again?
Which dfx version are you using?

Version v0.15.3

still resulted in Hash mismatch
daniamorris@Danias-MacBook-Pro DDiary % dfx cache delete
daniamorris@Danias-MacBook-Pro DDiary % 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…
ERROR: Failed to pull canister rdmx6-jaaaa-aaaaa-aaadq-cai.
Hash mismatch.
on chain: aebbc78a773c0ec806bd187df3613fe345e9c0cc41a4fbae6bc0636240a7c324
download: 4fae35068ed79887f8de96823fc38cd0448173d1c4d2c5e98ad39f3fdec1b715
Error: Failed when pulling canisters.

Version v0.15.3
still resulted in Hash mismatch

Ah, that actually makes sense. Internet Identity makes use of a feature that was added in dfx 0.16.0.
Please upgrade dfx to 0.16.0 or later.

1 Like