error[E0635]: unknown feature `proc_macro_span_shrink`

when I run ./run_basic_scenario.sh step 6 in GitHub - dfinity/sns-testing: Testing SNS in local testing environment I got this error

error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /Users/ahmed/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.54/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

   Compiling phf_shared v0.10.0
   Compiling typenum v1.16.0
For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Error: Failed while trying to build all canisters.
Caused by: Failed while trying to build all canisters.
  The build step failed for canister 'bnz7o-iuaaa-aaaaa-qaaaa-cai' (test) with an embedded error: Failed to build Rust canister 'test'.: Failed to compile the rust package: test

my system
Mac m1
cargo 1.76.0-nightly (978722961 2023-12-06)
rustup 1.26.0 (5af9b9484 2023-04-05)
dfx 0.15.2

@lara this is my error. I hope someone can help.

Hi @AliSci , just wanted to confirm that I have found the question. Thanks for joining the sessions and following up here.
We will follow up here shortly!

Hi @AliSci,

Thanks for reporting this. I think the error is popping up at the time when the test canister is being built via cargo. Could you try confirming that, please, by running dfx build --network local test in your sns-testing folder?

So, everything runes fine till step number 5. the above error in addition to

  1. After runing dfx build --network local test
Error: Cannot find canister id. Please issue 'dfx canister create test'.
  1. dfx canister create test
Error: Failed to get wallet canister caller for identity 'default' on network 'local'.
Caused by: Failed to get wallet canister caller for identity 'default' on network 'local'.
  Failed to get wallet for identity 'default' on network 'local'.
    Failed to create wallet for identity 'default' on network 'local'.
      Failed create canister call.
        The lookup path ([726571756573745F737461747573, 909EAE6052D3C22B86D9AA7F7AEC8B444FBA5EFD950AB8044578C3C3B927305A, 737461747573]) is unknown in the certificate.

  1. dfx build --network
  1. dfx build or dfx build --network local

Not sure if this is a copy and paste typo, but these both commands seem incomplete.

The command I’ve asked for is dfx build --network local test where test is the name of the test canister that is included into the sns-testing repo. Could you double check that you’ve entered this exact command, please? This would help me debug the issue.

Generally, while sns-testing provides this test canister (written in Rust), the ultimate purpose of an SNS is to decentralize your own dapp. So in case you’re experiencing issues building the test canister, it might be a better investment of time to write your own canister (in Rust, Motoko, or any other language supported on the IC), and decentralize that. If you are able to successfully compile a canister into .wasm, then the SNS lifecycle instructions should still work for you, even if the ./run_basic_scenario.sh script won’t work for whatever reason.

We currently only test ./run_basic_scenario.sh on one single platform (docker linux) in our CI/CD pipeline, as we currently don’t have enough admin capacity to set up and support a bunch of platforms. So, the Apple Silicon instructions are unfortunately not guaranteed to work for everyone. That being said, I’d be happy to aid your debugging as much as possible if you still decide to go this route.

1 Like

Ok now I’m running the testflight but at step 4 Testing on mainnet (SNS testflight) | Internet Computer
When I ran the quill send register.json I got
Certificate verification failed. no idea what to check or debug here. But all my perimeters seams right
i checked my CID, PEM_FILE, and DEVELOPER_NEURON_ID and they are correct

@AliSci I don’t know what would be causing that offhand. I believe that’s an error related to interacting with the replica. I will ask around and see what I can find.

1 Like

Hello @AliSci, is there any additional logs to the Certificate verification failed error message? Or it’s just that one line?

Just that line no more errors
but I also noticed intersting error when I ran sns deploy-testflight

dfx identity get-principal
ggj4v-72tnz-rd673-mjjid-ljvyu-gdwyo-c2x7t-szji2-pfmoo-bhv7p-pae
dfx canister --network local id sns_governance
dfx failed when called with args: ["canister", "--network", "local", "id", "sns_governance"], error: Error: Cannot find canister id. Please issue 'dfx canister create sns_governance'.

SNS canisters not found, creating SNS canisters with Some(500000000000) cycles each
Creating SNS canisters...
Creating a wallet canister on the local network.
The wallet canister on the "local" network for user "default" is "bnz7o-iuaaa-aaaaa-qaaaa-cai"
Creating canister sns_governance...

but as you can notice it kept runing fine.
also, after dfx canister create sns_governance
and re ren sns deploy-testflight

Error: Failed to install wasm module to canister 'sns_governance'.
Caused by: Failed to install wasm module to canister 'sns_governance'.
  Failed during wasm installation call: The replica returned a replica error: reject code CanisterError, reject message Canister bkyz2-fmaaa-aaaaa-qaaaq-cai cannot be installed because the canister is not empty. Try installing with mode='reinstall' instead., error code None

Error: Failed to install wasm module to canister 'sns_index'.
Caused by: Failed to install wasm module to canister 'sns_index'.
  Failed during wasm installation call: The replica returned a replica error: reject code CanisterError, reject message Canister bd3sg-teaaa-aaaaa-qaaba-cai cannot be installed because the canister is not empty. Try installing with mode='reinstall' instead., error code None


then I ran

dfx canister create sns_governance
dfx canister create sns_ledger
dfx canister create sns_root
dfx canister create sns_swap
dfx canister create sns_index

then there was no more error expt that line

Now I got new error

Error: The replica returned a replica error: Replica Error: reject code DestinationInvalid, reject message Requested canister has no wasm module, error code Some("IC0304")

Now

# sns_testing
1. `cd ic && dfx extension install sns`
2. `brew install bazel`
3. install quill from github.com/dfinity/quill
4. `dfx start --clean`

```bash
dfx deploy sns_testing_backend
dfx canister create sns_governance
dfx canister create sns_ledger
dfx canister create sns_root
dfx canister create sns_swap
dfx canister create sns_index
sns deploy-testflight
Developer neuron IDs:
xxxxxxxx
export DEVELOPER_NEURON_ID="xxxxxxxx"
dfx canister create sns_testing_backend
dfx canister update-settings --add-controller $(dfx canister id sns_root) sns_testing_backend

mes: “”" Added as controller of “sns_testing_backend”: br5f7-7uaaa-aaaaa-qaaca-cai “”"

export IC_URL="http://localhost:8080/"
  1. To get ur pem file path run ths
~/.config/dfx/identity/default/identity.pem
export PEM_FILE="/Users/ahmed/.config/dfx/identity/$(dfx identity whoami)/identity.pem"
  1. after that set the PEM_FILE and run this
export CID="$(dfx canister id sns_testing_backend)"
quill sns --canister-ids-file ./sns_canister_ids.json --pem-file $PEM_FILE make-proposal --proposal "(record { title=\"Register dapp's canisters with SNS.\"; url=\"https://example.com/\"; summary=\"This proposal registers dapp's canisters with SNS.\"; action=opt variant {RegisterDappCanisters = record {canister_ids=vec {principal\"$CID\"}}}})" $DEVELOPER_NEURON_ID > register.json
quill send register.json

I am runing this I got no error excpet this error

Request ID: xxxxx
Certificate verification failed.

Note: I replaced the id with xxxx

Hi @AliSci, thank you for providing these details.

Before diving into the technical issue, let’s maybe take a step back — what is your overall goal with SNS testing?

Some context: If you are interested to launch an SNS, it is probably sufficient to experiment with sns-testing, as discussed in the beginning of this thread. The SNS testflight solution has been very useful in the early days when we needed to get as much evidence as possible that a project would be viable, but sns-testing has been assuming these responsibilities more and more.

Hi again, Happy Christmas. My goal is just to get my self familiarise with sns. I never used it before. But I read about it and find out it provide DOA and funding for my site.
The local testing does not seams very compatible with my macm1

Hi @AliSci, happy end-of-year holidays to you, too!

My recommendation for now is to use sns-testing as you’ve been trying before, but this one small change: Instead of compiling the test canister, could you download a ready-to-use WASM for that canister? This could mitigate the compilation errors.

To help you get it done, I’ve prepared the following pull request for sns-testing, which is under review. Feel free to already try out the basic scenario on this branch of that pull request.

I’m looking forward to hearing how far you get with sns-testing, and happy to answer any further questions that you may have.

Update. The PR was merged; please feel free to try again the sns-testing basic scenario as before, on the latest main branch.

1 Like

Thank you. Now I got


🚀 Success!
Proposal ID: 1
Using identity: "default".

which seams a good thing, I hope this will help how SNS works
Now I want to changes in the test canister then make 3 votes to accept out of total 5 SNS holders. How to do that?

Thanks for trying out the latest version of sns-testing.

If the whole SNS lifecycle worked out, you should see the message Basic scenario has successfully finished. in the terminal. If this doesn’t happen for you, could you please compare your output with the logs from this sample CI pipeline?

Now I want to changes in the test canister then make 3 votes to accept out of total 5 SNS holders. How to do that?

If you want to run sns-testing with your own custom canister, you would need to be able to build it. (Currently, the script is just downloading the wasm from here.)

My recommendation is to first try building a canister on your system (in isolation from sns-testing). Please follow the instruction from here to get started.

Once you have a canister that you can build and deploy to a local DFX replica, you should be able to follow these instructions to integrate it with sns-testing. Note that in Step 1, you would need to run your canister’s custom deployment command. You also need to replace YOUR_CANISTER_ID with the actual principal of your canister in example_sns_init.yaml, and possibly make other customizations.

Please let me know if you get stuck!