I could reproduce your issue if I add "port": 8000
to my json config. So you should be good to go if you omit that.
nice, that networks.json config worked! after running the ./install.sh
I followed up on another terminal window:
I ran the ./setup_locally.sh script
got initial errors
Here’s the full log:
Then going back to the other window where dfx is running I get these logs:
Sample
2024-05-22 07:57:49.265844431 UTC: [Canister rrkah-fqaaa-aaaaa-aaaaq-cai] [Governance] Error when refreshing XDR rate in run_periodic_tasks: External: Error calling 'get_average_icp_xdr_conversion_rate': code: Some(5), message: IC0503: Canister rkp4c-7iaaa-aaaaa-aaaca-cai trapped explicitly: Panicked at 'average_icp_xdr_conversion_rate is not set', rs/nns/cmc/src/main.rs:908:14
This error keeps cycling constantly, it doesn’t stop
Are you getting the same error after running ./setup_locally.sh ?
Because the readme instructions state that the networks.json should have this config
But it isn’t working
The error that the nns
and sns
extensions are already installed is expected and harmless. Same applies to the error concerning XDR rate which should disappear if you ./run_basic_scenario.sh
as setting the XDR rate is one of the first steps in running a basic scenario.
The port option from the README has been tested with the dfx version (v0.19.0) pinned in the Dockerfile and without using dfxvm (the install.sh
script downloads dfx
binary of the respective version directly). You should keep using it inside the Docker container, but you don’t need it if you run dfx natively (i.e., not inside the Docker container).
makes sense, now after running the basic scenario script I get this
Not all dapp canisters are controlled by the NNS root canister.
Use sns prepare-canisters add-nns-root
to make the necessary changes.
Defective canisters (1 out of 1):
- bkyz2-fmaaa-aaaaa-qaaaq-cai
Here’s the full log
I’m using the dfx 0.19.0 binary file from the sns-testing folder
Please note that the Dashboard has a different port from what the docker or mac instructions should have, not sure if that affects (since I updated the networks.json like the one you provided)
The issue is this
jq: parse error: Invalid numeric literal at line 1, column 6
thrown by the script ./let_nns_control_dapp.sh
. Could you please share you sns_init.yaml
file? If in doubt, you can add dfx sns prepare-canisters add-nns-root <canister-id>
to run_basic_scenario.sh
right after ./let_nns_control_dapp.sh
.
Yes, I’m using the default sns_init.yaml from the folder
Also using, and following instructions for the test canister on the readme (instead of our own canisters)
If you’re running the scripts natively without docker, you might need to install yq
:
# Install yq. We use it to read YAML file(s).
YQ_VERSION=v4.34.1
curl \
--location \
https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_386 \
--output /usr/bin/yq \
&& chmod +x /usr/bin/yq
What’s the reason you’re trying to run sns-testing directly instead of via docker?
Our canisters use vessel, mops and other libraries that might conflict with a docker instance to begin with, although I haven’t even tried for now I just want to be able to explore the sns-testing and catch up with how we are going to make proposals and upgrade canisters
Here’s the open source code for the canisters
Already had yq installed and scripts are running but somehow I get into random errors
what distro of linux are you using for testing? I’ll give it a try
I’m using ubuntu 22.04.4 LTS
I’m still getting this jq error also on the ./run_basic_scenario.sh
jq: parse error: Invalid numeric literal at line 1, column 6
I was checking the script what jq was doing
And I couldn’t find any sns_canister_ids.json on the project folder, is this supposed to come with the sns-testing or how is this file created before executing the ./run_basic_scenario.sh?
Could this error be related to the resolver workspace warning beforehand?
Additionally just for the record, on Ubuntu I get an error about the Payload being too large, probably because I’m running a virtual machine, probably I would need to have it physically installed.
Quick update, the sns-testing docker image has been updated yesterday and it runs smooth all the bootstrapping steps
-Starts a local replica instance
-Runs setup_locally.sh
-Runs run_basic_scenario.sh
But the problem with the nns frontend app persists even after running the basic scenario and waited for the info to update
Even after running
dfx canister call sns_aggregator reconfigure '(opt record { update_interval_ms = 100; fast_interval_ms = 1_000_000_000; })'
So when I try to test the local nns, I’m still getting these errors
http://qsgjb-riaaa-aaaaa-aaaga-cai.localhost:8080/
And I couldn’t find any sns_canister_ids.json on the project folder, is this supposed to come with the sns-testing or how is this file created before executing the ./run_basic_scenario.sh?
The sns_canister_ids.json
file is created by propose_sns.sh
.
Could this error be related to the resolver workspace warning beforehand?
No, the resolver workspace warning is harmless.
Additionally just for the record, on Ubuntu I get an error about the Payload being too large
This is because you’re targetting an application subnet. Your networks.json
file should look like this
$ cat ~/.config/dfx/networks.json
{
"local": {
"bind": "127.0.0.1:8080",
"type": "ephemeral",
"replica": {
"subnet_type": "system"
}
}
}
to avoid the too large payload error.
But the problem with the nns frontend app persists even after running the basic scenario and waited for the info to update
I could reproduce the error and I’ve created an MR that bumps the sns aggregator version and reconfigures the sns aggregator as part of the sns-testing setup and successfully tested that.
Note that the reconfiguration argument should be '(opt record { update_interval_ms = 1000:nat64; fast_interval_ms = 100:nat64; })'
with explicit types (otherwise, the integer literals might not be interpreted as nat64
).
Thanks for the update,
Now, I’m still getting the jq error, if you could please help me fix it.
Here’s the log until the error
(Note that this script has been run after ./install.sh, sns-testing]$ ./bin/dfx start --clean, and ./setup_locally.sh on Linux local environment
Also I added the yq and jq packages and even quill to the environment.
[bizkit@archlinux sns-testing]$ ./run_basic_scenario.sh
Using identity: "default".
Setting ICP/XDR conversion rate to 10000 ...
Using NNS URLs: ["http://localhost:44975/"]
Title: Updating Xdr/Icp conversion rate to 10000
Summary: Set ICP/XDR conversion rate to 10000
Payload: UpdateIcpXdrConversionRatePayload {
data_source: "IC admin",
timestamp_seconds: 1716577813,
xdr_permyriad_per_icp: 10000,
reason: None,
}
submit_proposal for Updating Xdr/Icp conversion rate to 10000 response: Ok(proposal 9)
proposal 9
Using identity: "default".
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 645k 100 645k 0 0 416k 0 0:00:01 0:00:01 --:--:-- 1028k
Using identity: "default".
Creating canister test...
test canister created with canister id: bkyz2-fmaaa-aaaaa-qaaaq-cai
Installing code for canister test, with canister ID bkyz2-fmaaa-aaaaa-qaaaq-cai
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
OK
Using identity: "default".
Using identity: "default".
jq: parse error: Invalid numeric literal at line 1, column 6
and then it ends up like this
Importing /home/bizkit/sns-testing/candid/sns_root.did from https://raw.githubusercontent.com/dfinity/ic/fda260e972c03a580be1119d6c2868e30171be02/rs/sns/root/canister/root.did
sns_root has no canister id for network 'ic'
Importing canister 'sns_swap' as 'sns_swap'
Importing /home/bizkit/sns-testing/candid/sns_swap.did from https://raw.githubusercontent.com/dfinity/ic/fda260e972c03a580be1119d6c2868e30171be02/rs/sns/swap/canister/swap.did
sns_swap has no canister id for network 'ic'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 25845 100 25845 0 0 207k 0 --:--:-- --:--:-- --:--:-- 208k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17373 100 17373 0 0 149k 0 --:--:-- --:--:-- --:--:-- 150k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14 100 14 0 0 71 0 --:--:-- --:--:-- --:--:-- 71
Not all dapp canisters are controlled by the NNS root canister.
Use `sns prepare-canisters add-nns-root` to make the necessary changes.
Defective canisters (1 out of 1):
- bkyz2-fmaaa-aaaaa-qaaaq-cai
[bizkit@archlinux sns-testing]$
For what I understand on your previous response propose_sns.sh
. creates the sns_canister_ids.json but for some reason, it is not creating it or maybe not on time, but at the same time when running the basic scenario on docker it works.
My guesses are
1- My Linux environment doesn’t have all the required packages for the scripts to run properly (maybe there’s something about my rust installation because on the docker it downloads libraries instead of the jq error)
2- The time execution of the script runs different on the github project than the docker
3- the Docker version of the sns-testing folder is different than the github project