# Problem insalling Internet Identity in Local Setup

**URL:** <https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417>\
**Category:** Motoko\
**Created:** [June 2, 2023, 5:21pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417 "2023-06-02T17:21:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![iBat](https://avatars.discourse-cdn.com/v4/letter/i/7ea924/32.png) [@iBat](https://forum.dfinity.org/u/iBat)\
**Post date:** [June 2, 2023, 5:21pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/1 "2023-06-02T17:21:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [June 2, 2023, 5:56pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/2 "2023-06-02T17:56:25Z")

</div>

thanks for taking the time to write this. Let me ping the II team folks to see who can help.

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [June 2, 2023, 6:31pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/3 "2023-06-02T18:31:39Z")

</div>

Try this instead of your dfx config:

```auto
"internet_identity": {
      "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_dev.wasm.gz",
      "shrink": false,
      "remote": {
        "candid": "internet_identity.did",
        "id": {
          "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
        }
      }
    },

```

It will automatically pull the last dev version of II.

Note: there is a tutorial / sample in II repo but I had above piece of code literally open, so was faster to just copy paste that particular part

---

<div class="post-metadata">

**Author:** ![infu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/infu/32/11321_2.png) [@infu](https://forum.dfinity.org/u/infu)\
**Post date:** [June 2, 2023, 7:49pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/4 "2023-06-02T19:49:03Z")

</div>

I think that’s the old approach.  
Simply get the last dfx and run  
`dfx start --clean`  
`dfx nns install`

you will have Internet Identity and everything else

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [June 2, 2023, 8:51pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/5 "2023-06-02T20:51:33Z")

</div>

Depends what you try to achieve and what version of the canister you are looking for.

---

<div class="post-metadata">

**Author:** ![iBat](https://avatars.discourse-cdn.com/v4/letter/i/7ea924/32.png) [@iBat](https://forum.dfinity.org/u/iBat)\
**Post date:** [June 7, 2023, 2:11pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/6 "2023-06-07T14:11:02Z")

</div>

Thanks a lot, it worked!

---

<div class="post-metadata">

**Author:** ![cyberowl](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cyberowl/32/3635_2.png) [@cyberowl](https://forum.dfinity.org/u/cyberowl)\
**Post date:** [July 7, 2023, 8:50am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/7 "2023-07-07T08:50:55Z")

</div>

Has anyone experienced this error.

 ![Screenshot 2023-07-07 at 1.10.52 AM](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/6/60c743b3b62ffc04107477b408e05d4ad5eb010a.jpeg)

It happens when I try to create an II locally.

dfx 0.14.2  
latest internet identity repo

I tried diff approaches including above:

 ![Screenshot 2023-07-07 at 1.53.46 AM](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/4/4941bcdeebfd333a9f4bfc71d94c3eec070a70ee.png)

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [July 7, 2023, 9:09am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/8 "2023-07-07T09:09:08Z")

</div>

I’ve seen stuffs but, I’ve never seen that particular error 😜.

Have you try to clean up your local dfx state (`dfx start --clean`) and redeploy? Same issue?

---

<div class="post-metadata">

**Author:** ![cyberowl](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cyberowl/32/3635_2.png) [@cyberowl](https://forum.dfinity.org/u/cyberowl)\
**Post date:** [July 7, 2023, 9:11am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/9 "2023-07-07T09:11:52Z")

</div>

Yeah did everything. Did clean install ☹ did clean. Restarted machine. I guess I will keep digging.

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [July 7, 2023, 9:14am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/10 "2023-07-07T09:14:51Z")

</div>

As you mention v0.14.2, if you downgrade dfx, same issue?

---

<div class="post-metadata">

**Author:** ![cyberowl](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cyberowl/32/3635_2.png) [@cyberowl](https://forum.dfinity.org/u/cyberowl)\
**Post date:** [July 7, 2023, 9:21am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/11 "2023-07-07T09:21:33Z")

</div>

Hmm haven’t tried that but will soon. I did upgrade everything.

---

<div class="post-metadata">

**Author:** ![cyberowl](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cyberowl/32/3635_2.png) [@cyberowl](https://forum.dfinity.org/u/cyberowl)\
**Post date:** [July 7, 2023, 9:50am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/12 "2023-07-07T09:50:09Z")

</div>

ok that works. downgraded to 14.1

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [July 7, 2023, 10:01am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/13 "2023-07-07T10:01:23Z")

</div>

Thanks for the feedback, I forward the information!

---

<div class="post-metadata">

**Author:** ![Gabriel](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gabriel/32/546_2.png) [@Gabriel](https://forum.dfinity.org/u/Gabriel)\
**Post date:** [July 7, 2023, 10:30am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/14 "2023-07-07T10:30:17Z")

</div>

yeah I get that on 14.2 and on 0.14.2-beta.2 as well.

 ![Screenshot 2023-07-07 at 13.29.37](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/3/38c47c44f3487c7a2a3efa9750e4ab8acb01247d.jpeg)

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [July 10, 2023, 8:33am UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/15 "2023-07-10T08:33:48Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![berestovskyy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/berestovskyy/32/3989_2.png) [@berestovskyy](https://forum.dfinity.org/u/berestovskyy)\
**Post date:** [July 10, 2023, 3:57pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/16 "2023-07-10T15:57:04Z")

</div>

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:

```auto
    "internet_identity": {
      "type": "custom",
      "candid": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity.did",
      "wasm": "/Users/a/.cache/dfinity/versions/0.14.2/wasms/internet_identity_dev.wasm",
      "shrink": false,
      "remote": {
        "candid": "internet_identity.did",
        "id": {
          "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
        }
      }
    },

```

It’s a copy-paste of the snippet from this thread, just the WASM binary is from the `dfx 0.14.2` cache…

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [July 10, 2023, 4:25pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/17 "2023-07-10T16:25:46Z")

</div>

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.

```auto
"internet_identity": {
			"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_dev.wasm.gz",
			"shrink": false,
			"remote": {
				"id": {
					"ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
				}
			},
		},

```

---

<div class="post-metadata">

**Author:** ![berestovskyy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/berestovskyy/32/3989_2.png) [@berestovskyy](https://forum.dfinity.org/u/berestovskyy)\
**Post date:** [July 10, 2023, 4:39pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/18 "2023-07-10T16:39:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [July 10, 2023, 5:05pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/19 "2023-07-10T17:05:02Z")

</div>

Ah interesting, so `dfx start` with a `.wasm.gz` does not work but, works with `.wasm`.

Wasn’t the support for gzipped wasm recently added to dfx? Can there be a conflict there?

---

<div class="post-metadata">

**Author:** ![berestovskyy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/berestovskyy/32/3989_2.png) [@berestovskyy](https://forum.dfinity.org/u/berestovskyy)\
**Post date:** [July 10, 2023, 5:54pm UTC](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417/20 "2023-07-10T17:54:02Z")

</div>

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:

```auto
    "internet_identity": {
      "type": "custom",
      "candid": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity.did",
      "wasm": "https://github.com/dfinity/internet-identity/releases/download/release-2023-04-12/internet_identity_dev.wasm.gz",
      "shrink": false,
      "remote": {
        "candid": "internet_identity.did",
        "id": {
          "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
        }
      }
    },

```

This is the last working II for me on the `dfx 0.14.2`…

[Next page](https://forum.dfinity.org/t/problem-insalling-internet-identity-in-local-setup/20417.md?page=2)
