# SNS testflight error

**URL:** <https://forum.dfinity.org/t/sns-testflight-error/27081>\
**Category:** Developers\
**Tags:** sns\
**Created:** [January 29, 2024, 11:04am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081 "2024-01-29T11:04:26Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![simpson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/simpson/32/10431_2.png) [@simpson](https://forum.dfinity.org/u/simpson)\
**Post date:** [January 29, 2024, 11:04am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/1 "2024-01-29T11:04:26Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![aterga](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/aterga/32/4143_2.png) [@aterga](https://forum.dfinity.org/u/aterga)\
**Post date:** [January 29, 2024, 11:22am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/2 "2024-01-29T11:22:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aterga](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/aterga/32/4143_2.png) [@aterga](https://forum.dfinity.org/u/aterga)\
**Post date:** [January 29, 2024, 8:36pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/3 "2024-01-29T20:36:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![simpson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/simpson/32/10431_2.png) [@simpson](https://forum.dfinity.org/u/simpson)\
**Post date:** [January 30, 2024, 1:38am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/4 "2024-01-30T01:38:56Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![simpson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/simpson/32/10431_2.png) [@simpson](https://forum.dfinity.org/u/simpson)\
**Post date:** [January 30, 2024, 3:22am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/5 "2024-01-30T03:22:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aterga](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/aterga/32/4143_2.png) [@aterga](https://forum.dfinity.org/u/aterga)\
**Post date:** [January 30, 2024, 10:52pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/6 "2024-01-30T22:52:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![simpson](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/simpson/32/10431_2.png) [@simpson](https://forum.dfinity.org/u/simpson)\
**Post date:** [January 31, 2024, 2:01am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/7 "2024-01-31T02:01:49Z")

</div>

Sure.  
Here is the [sns\_init.yaml](https://github.com/iclighthouse/sns-icl/blob/main/sns_init.yaml)

The command:  
version

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

dfx -V                                                             
dfx 0.15.3

```

deploy-testflight

```auto
/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

```auto
/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

```

---

<div class="post-metadata">

**Author:** ![Andre-Popovitch](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/andre-popovitch/32/10269_2.png) [@Andre-Popovitch](https://forum.dfinity.org/u/Andre-Popovitch)\
**Post date:** [February 7, 2024, 9:02pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/8 "2024-02-07T21:02:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tensor](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@tensor](https://forum.dfinity.org/u/tensor)\
**Post date:** [February 23, 2024, 3:39pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/10 "2024-02-23T15:39:08Z")

</div>

I have the same error  
I’m using dfx version of 0.14.2 and sns-cli 1.0.0 (same as sns-test repo)

any solutions to fix this error ?

@simpson @aterga

---

<div class="post-metadata">

**Author:** ![Andre-Popovitch](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/andre-popovitch/32/10269_2.png) [@Andre-Popovitch](https://forum.dfinity.org/u/Andre-Popovitch)\
**Post date:** [February 23, 2024, 6:13pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/11 "2024-02-23T18:13:33Z")

</div>

Hi everyone. You can use these instructions to deploy a testflight to a local replica:

First you need to get the right version of the `sns` binary, which this command will download to `./sns`:

```bash
GIT_HASH="f72ad66cc01b5441da26a596abaa2117c023844d"
PLATFORM=$(uname | tr '[[:upper:]]' '[[:lower:]]')
DOWNLOAD_NAME="sns"
DEST=./sns
curl "https://download.dfinity.systems/ic/${GIT_HASH}/binaries/x86_64-${PLATFORM}/${DOWNLOAD_NAME}.gz" | zcat >"$DEST" && chmod +x "$DEST"

```

Once we have that, we can deploy the testflight like this:

```bash
# Requires a modern DFX
dfx --version 
# should say: dfx 0.16.1 or similar

```

```bash
# add the sns canisters to your DFX environment
dfx extension install sns --version 0.3.1
export DFX_IC_COMMIT=f72ad66cc01b5441da26a596abaa2117c023844d
dfx sns import
dfx sns download

```

```bash
# start the local replica (in a new terminal)
dfx start --clean
# (you may need to run `dfx stop`)

```

```bash
# deploy a testflight
rm ./sns_canister_ids # ok if this fails
./sns deploy-testflight --verbose --init-config-file=$(pwd)/sns_init.yaml

```

```bash
# you need a canister to give to the SNS, I'll create one but you can deploy it to the local replica any way you like, just set the CID variable to the canister's principal ID
TMP=$(mktemp -d) && (cd $TMP && echo '{"canisters": { "x": {} }}' >dfx.json && dfx canister create --no-wallet x ; rm -rf .dfx ; rm dfx.json ) ; rmdir $TMP
CID="bnz7o-iuaaa-aaaaa-qaaaa-cai" # replace with your canister ID

```

```bash
# create the proposal to register the dapp canister
NETWORK="local"
SNS_GOVRENANCE_CANISTER=$(jq -r '.governance_canister_id' ./sns_canister_ids.json) 
CANDID_PATH="candid/sns_governance.did"
PRINCIPAL="$(dfx identity get-principal)"
NEURON_ID=$(dfx canister \
   --network "${NETWORK}" \
   call "${SNS_GOVRENANCE_CANISTER}" \
   --candid ${CANDID_PATH} \
   list_neurons "(record {of_principal = opt principal\"${PRINCIPAL}\"; limit = 1})" | sed -n 's/.*id = blob "\([^"]*\).*/\1/p')
dfx canister \
   --network "${NETWORK}" \
   call "${SNS_GOVRENANCE_CANISTER}" \
   --candid ${CANDID_PATH} \
   manage_neuron "(record { subaccount = blob \"${NEURON_ID}\"; command = opt variant {MakeProposal = 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}\"}}}}} })"

```

Edit: replaced with instructions that are tested to work on mainnet. In particular, the steps where we download the sns-cli and add the sns canisters to your dfx environment have been changed. If you followed the previous version of the instructions, run `rm ./sns-* && rm ./ic-icrc1-*` before re-adding the sns canisters to your environment

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [February 29, 2024, 1:29am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/12 "2024-02-29T01:29:28Z")

</div>

Hi I’ve been working through this and was wondering how I could work around this restriction:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/b/c/bc28acab162fb853ea68aee64a511bf31c19a654.png)

My project was funded by 120 people and need to give them each 5 neurons, was hoping to do this via sns\_init.yaml.

Kind regards,  
James

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [March 1, 2024, 2:58pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/13 "2024-03-01T14:58:38Z")

</div>

> [@Andre-Popovitch](#):
>
> ```auto
> ./sns deploy-testflight --verbose --init-config-file=$(pwd)/sns_init.yaml
> 
> ```
> 
> ```auto
> 
> ```

So I ran this and I get such a long message back that ends in an error I can’t see what the start says:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/8/8/88a89c17c9d814dc5856c1ff17018fd51eded3e4.png)

I’ve consolidated my neurons so there are less than 100

---

<div class="post-metadata">

**Author:** ![Andre-Popovitch](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/andre-popovitch/32/10269_2.png) [@Andre-Popovitch](https://forum.dfinity.org/u/Andre-Popovitch)\
**Post date:** [March 6, 2024, 6:15am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/14 "2024-03-06T06:15:59Z")

</div>

Hey @jamesbeadle . I updated the instructions in my post. I’m not sure they’ll fix what you’re experiencing, but could you try again?

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [March 7, 2024, 6:29pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/15 "2024-03-07T18:29:00Z")

</div>

So I refollowed the instructions but got argument list too long:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/6/b/6b9435ef2b87942b9ffda35b4d79941d66b8fb8b.png)

Here is the sns\_init.yaml:

> <https://github.com/jamesbeadle/OpenFPL/blob/master/sns_init.yaml>

---

<div class="post-metadata">

**Author:** ![Dustin](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@Dustin](https://forum.dfinity.org/u/Dustin)\
**Post date:** [April 12, 2024, 3:19pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/16 "2024-04-12T15:19:56Z")

</div>

I’ve followed the guide above to deploy a testing sns and when I try to stake a new neuron I get the following error

```auto
(
  record {
    command = opt variant {
      Error = record {
        error_message = "Because governance is currently in PreInitializationSwap mode, manage_neuron commands of this type are not allowed (caller_is_swap_canister=false). command: ClaimOrRefresh(\n ClaimOrRefresh {\n by: Some(\n MemoAndController(\n MemoAndController {\n memo: 1,\n controller: Some(\n 465sx-szz6o-idcax-nrjhv-hprrp-qqx5e-7mqwr-wadib-uo7ap-lofbe-dae,\n ),\n },\n ),\n ),\n },\n)";
        error_type = 10 : int32;
      }
    };
  },
)

```

Main problem seems to be that the SNS is still mode `PreInitializationSwap`.  
How can I change this?

---

<div class="post-metadata">

**Author:** ![Fahadk509](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@Fahadk509](https://forum.dfinity.org/u/Fahadk509)\
**Post date:** [April 7, 2025, 11:51am UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/17 "2025-04-07T11:51:23Z")

</div>

Hey, I am facing the same issue, were you able to solve this?

---

<div class="post-metadata">

**Author:** ![Nimakra](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Nimakra](https://forum.dfinity.org/u/Nimakra)\
**Post date:** [April 7, 2025, 6:28pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/18 "2025-04-07T18:28:18Z")

</div>

Have you tried reducing the file size of your logo, the one you refrenced in your .yaml file.

I don’t know if it’s related but I think I had a similar error that I solved by simply compressing the logo.

---

<div class="post-metadata">

**Author:** ![Fahadk509](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@Fahadk509](https://forum.dfinity.org/u/Fahadk509)\
**Post date:** [April 8, 2025, 12:27pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/19 "2025-04-08T12:27:31Z")

</div>

Thank you so much, finally got through this issue. May I know how much did you compress the logo? for now i just created a file logo.png jus to test the solution and voila everything works, now I have to add the logo but i dont know how much do I have to compress the logo.

---

<div class="post-metadata">

**Author:** ![Nimakra](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Nimakra](https://forum.dfinity.org/u/Nimakra)\
**Post date:** [April 8, 2025, 9:09pm UTC](https://forum.dfinity.org/t/sns-testflight-error/27081/20 "2025-04-08T21:09:23Z")

</div>

A few kbs, less than 20 I think.
