# Add NNS root to canister fails

**URL:** <https://forum.dfinity.org/t/add-nns-root-to-canister-fails/28040>\
**Category:** Developers\
**Tags:** nns\
**Created:** [March 1, 2024, 6:13pm UTC](https://forum.dfinity.org/t/add-nns-root-to-canister-fails/28040 "2024-03-01T18:13:15Z")\
**Posts on this page:** 6\
**Page:** 1

<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, 6:13pm UTC](https://forum.dfinity.org/t/add-nns-root-to-canister-fails/28040/1 "2024-03-01T18:13:15Z")

</div>

When running

dfx sns prepare-canisters add-nns-root bboqb-jiaaa-aaaal-qb6ea-cai

(The backend of OpenFPL)

I get:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/7/4/7434916abb0c6eeab83e9cdd37bf145e9cddd314.png)

How do I specify that I want to add the nns root on the mainnet as passing the --network=ic flag doesn’t work

---

<div class="post-metadata">

**Author:** ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)\
**Post date:** [March 5, 2024, 10:42pm UTC](https://forum.dfinity.org/t/add-nns-root-to-canister-fails/28040/2 "2024-03-05T22:42:40Z")

</div>

Are you using the [SNS testing repo](https://github.com/dfinity/sns-testing) to test your canisters? This is only available locally.

If you are looking to test on mainnet, check out the [documentation on how to test on mainnet by doing an SNS testflight](https://internetcomputer.org/docs/current/developer-docs/daos/sns/testing/testing-on-mainnet).

---

<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 6, 2024, 2:07am UTC](https://forum.dfinity.org/t/add-nns-root-to-canister-fails/28040/3 "2024-03-06T02:07:15Z")

</div>

I have been using the sns testing repo.

I am trying to run this command on the live canister:

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

I just want to know why it fails as I can use that information to ensure dfx sns propose works without the same error, allowing me to confirm the sale will begin and plan around that.

As for the testflight deploy I’ve tried multiple times, this command doesn’t work:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/9/d/9d6d6728b04ad4f3458030c2359d1df43a4b6336.png)

so I get I need to installl sns-cli, which is different from the dfx sns library that contains the canister imports.

Have you considered the response in this post that highlights issues with the sns testflight testing:

> [@SNS testflight error](https://forum.dfinity.org/t/sns-testflight-error/27081/11):
>
> Hi everyone. There’s an issue still with using SNS testflight on mainnet and my top priority right now is to fix it and update the documentation. Once I do the experience will be a lot nicer. In the meantime, 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: GIT\_HASH="25d05cb2d7f3ec39541c825659199610e3fcea48" PLATFORM=$(uname | tr '[[:upper:]]' '[[:lower:]]') DOWNLOAD\_N…

Have these been resolved now?

---

<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:16am UTC](https://forum.dfinity.org/t/add-nns-root-to-canister-fails/28040/4 "2024-03-06T06:16:52Z")

</div>

Hey @jamesbeadle. I updated the instructions in my post. The new instructions I’ve tested to work for mainnet deployments.

---

<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:54pm UTC](https://forum.dfinity.org/t/add-nns-root-to-canister-fails/28040/5 "2024-03-07T18:54:53Z")

</div>

Hi Jennifer,

When you say the command only works locally, it is in the docs under the launch section:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/d/2/d2ff5c483069c0d13bcee7977733359ccda8ed1e.png)

So it should run on --network ic too?

Thanks,  
James

---

<div class="post-metadata">

**Author:** ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)\
**Post date:** [March 7, 2024, 8:11pm UTC](https://forum.dfinity.org/t/add-nns-root-to-canister-fails/28040/6 "2024-03-07T20:11:13Z")

</div>

Thank you for the clarification that you are not doing a test flight. Let me check and get back to you.
