SNS testflight error

Hi guys, when I run the sns deploy-testflight --network ic command, then I receive this error:

Could not build canister init payloads: Could not determine whether the SNS init payload is using the one-proposal flow or the legacy because it contains a mix of set and unset one proposal parameters

Does anyone know what this is about?

Thanks for reporting!

This seems like a bug in the SNS CLI tool (I suspect that the SnsInitPayload object is being generated in a way that’s no longer supported). We’ll try to fix this over the course of the day, please stay tuned.

1 Like

Update. While the SNS CLI bug was confirmed, it’s affecting only the case when the init-config-file argument is not passed. In this case, the tool generates a default payload, which is incomplete. Fixing this might take a longer time due to the prioritization being difficult this week.

Could you please try running sns deploy-testflight init-config-file <path-to-your-sns-config-yaml-file> and see if that works? We should also make this suggestion in the documentation.

Thanks @aterga ,of course I try to add the sns_init.yaml file and it did not work. This is the error message:

thread 'main' panicked at rs/sns/cli/src/deploy.rs:452:27:
Could not build canister init payloads: Error: The one-proposal SNS initialization requires some SnsInitPayload parameters to be Some. But the following fields were set to None: nns_proposal_id, neurons_fund_participants, swap_start_timestamp_seconds, swap_due_timestamp_seconds
Error: nns_proposal_id must be specified
Error: neurons_fund_participants must be specified
Error: swap_start_timestamp_seconds must be specified
NeuronsFundParticipationConstraintsValidationError: neurons_fund_participation requires neurons_fund_participation_constraints must be specified

It seems that the current version of the sns_init.yaml doesn’t have the fields it wants in

By the way, my dfx version is 0.15.3, sns-cli 1.0.0

Sorry I didn’t have time to look into this today, but I’m going to try to reproduce this tomorrow.

Could you please share your sns_init.yaml file and the exact commands you’re running — this would help debugging the issue.

Sure.
Here is the sns_init.yaml

The command:
version

/Users/admin/.cache/dfinity/versions/0.15.3/sns -V 
sns-cli 1.0.0

dfx -V                                                             
dfx 0.15.3

deploy-testflight

/Users/admin/.cache/dfinity/versions/0.15.3/sns deploy-testflight --network ic
dfx identity get-principal
xxx
dfx canister --network ic id sns_governance
xxx
dfx canister --network ic id sns_ledger
xxx
dfx canister --network ic id sns_root
xxx
dfx canister --network ic id sns_swap
xxx
dfx canister --network ic id sns_index
xxx
SNS canisters already allocated
SNS canister IDs:
SnsCanisterIds { governance: xxx, ledger: xxx, root: xxx, swap: xxx, index: xxx }
thread 'main' panicked at rs/sns/cli/src/deploy.rs:452:27:
Could not build canister init payloads: Could not determine whether the SNS init payload is using the one-proposal flow or the legacy because it contains a mix of set and unset one proposal parameters
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

deploy-testflight with init file

/Users/admin/.cache/dfinity/versions/0.15.3/sns deploy-testflight --network ic --init-config-file sns_init.yaml
dfx canister --network ic id sns_governance
xxx
dfx canister --network ic id sns_ledger
xxx
dfx canister --network ic id sns_root
xxx
dfx canister --network ic id sns_swap
xxx
dfx canister --network ic id sns_index
xxx
SNS canisters already allocated
SNS canister IDs:
SnsCanisterIds { governance: xxx, ledger: xxx, root: xxx, swap: xxx, index: xxx }
thread 'main' panicked at rs/sns/cli/src/deploy.rs:452:27:
Could not build canister init payloads: Error: The one-proposal SNS initialization requires some SnsInitPayload parameters to be Some. But the following fields were set to None: nns_proposal_id, neurons_fund_participants, swap_start_timestamp_seconds, swap_due_timestamp_seconds
Error: nns_proposal_id must be specified
Error: neurons_fund_participants must be specified
Error: swap_start_timestamp_seconds must be specified
NeuronsFundParticipationConstraintsValidationError: neurons_fund_participation requires neurons_fund_participation_constraints must be specified.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1 Like

I’m on the NNS team and my current top priority is figuring out how to unblock you on testing. Right now I think the most direct path is to fix the issue you’re encountering with sns testflight. The advantage of sns testflight is that it allows you to test your SNS deployment in a local replica or on mainnet. However, if you only need to test on the local replica for now, let me know as that opens up some other options