Following official SNS docs, `dfx nns install` leads to faulty NNS-dapp local deployment

Following these steps with dfx 0.12.x:
https://internetcomputer.org/docs/current/developer-docs/integrations/sns/get-sns/local-testing

dfx nns install works, installs frontend II and NNS-dapp. II seems to work fine (my own apps can use it to authenticate successfully)

But when logging into NNS-dapp, the frontend console shows:

Which one exactly? I just tried with 0.12.1 and everything worked as intended

  • dfx start --clean --background
  • dfx nns install
  • Go to printed nns-dapp URL
1 Like

Ok, so it’s an issue on my side.

Tried both 0.12.1 and 0.12.0

Any ideas on where the error comes from?

I’ve seen the same thing if the install script fails to install the wasm to some of the NNS canisters. The actual error will be buried somewhere deep in the console output. Should be highlighted yellow or red, at least

2 Likes

Can you post your network config for local please?

jq .local ~/.config/dfx/networks.json

The local entry shoud look like this:

{
    "bind": "127.0.0.1:8080",
    "type": "ephemeral",
    "replica": {
      "subnet_type": "system"
    }
  }

Rationale: It looks like some kind of comms problem, so it is probably either a network configuration problem or a canister ID problem. Or something else I haven’t thought of yet. :smiley:

1 Like

Found it!

In Chrome it works. Disabling shields in Brave also works.

I was using Brave version:

Release Notes v1.45.133 (Nov 25th, 2022)

3 Likes

I would love to learn why…

(Btw system wide networks.json was good, output install script for dfx nns install was good)

1 Like

Can we not using 8080 as default?
The older projects are by default 8000, and many frontend projects run on 8080.
The port number will be occupied

Re: Changing the port. This is the default port for dfx. If you start on a clean machine, install dfx and run dfx start, it will use port :8080. To change that, I’d open a ticket on the SDK repo.

The nns code has the port compiled in, unfortunately. It would be really nice if ports, canister IDs and so on could be passed as arguments, at which point you could set that port to whatever you wanted. I think this is a better approach. We’ve wanted to do this for a while but it’s never been prioritized highly enough to be done.

1 Like

Side note: this has been changed. Now the default is port 4943. Only the nns install has port and network name hardcoded in, so you have to reconfigure to use 8080 in this (admittedly common) use case

1 Like

Oh, super. So just rebuild the canisters and this should be good to go.

Nice port number, by the way. :slight_smile: