Failed to clone the repositories: /usr/bin/bash: ncsmgr/ncsmgr: No such file or directory

Hello. Here's some information on my setup:

  • nRF Connect for Desktop v3.9.1 for Windows (Windows 10)
  • Toolchain Manager v0.10.1
  • Trying to download and install nRF Connect SDK v1.8.0 (also faced the same issue with v1.7.1)

When I run Toolchain manager to set everything up, I get the following error:

Failed to clone the repositories: /usr/bin/bash: ncsmgr/ncsmgr: No such file or directory

(I've attached the full log below for you to review)

After the process completes, I can see the toolchain directory with (what I believe are) the appropriate files, but I am missing all of the required directories (e.g. nrf, zephyr, etc). I also don't see the "Open SES" button though I do see the "Open VS Code" button in Toolchain Manager.

If I manually open up git-bash.exe and run the suggested command "ncsmgr init-ncs" then I can see files get pulled from the remote repos and the directories are created. After this if I refresh Toolchain Manager the "Open SES" button does appear.

But even if I continue on at this point, I am running into issues. For example, in SES I am getting the message "create_nordic_project.py failed (1)". I suspect that the root problem is this: because a step in Toolchain manager is failing, some part of the general configuration is not getting set which is causing failures.

I've tried to manually fix my setup, such as making sure that my SES environment variables for Zephyr and Cmake are set properly, and I still am getting this error.

Any idea what could be the cause here?

Complete log attached: /cfs-file/__key/communityserver-discussions-components-files/4/2021_2D00_12_2D00_14T23_5F00_20_5F00_01.224Z_2D00_log.txt

  • Hey Sandeep!

    That is odd. I assume you followed this guide for installing NCS automatically for Windows?

    Best regards,

    Elfving

  • I had followed those instruction and had repeated several times, trying various things, and had no luck.

    Today, though, I had a hunch that something in my git configuration and/or ssh-agent was causing issues. I temporarily deleted my .bashrc and .bash_profile files, re-ran the Toolchain Manager install, and it worked! After this, I can open SES and build projects.


    I right now am trying to do a commit of the full, clean SDK into a git repo- I want to commit the files as a snapshot of how they are right now, and not have dependent modules. If I delete all of the .git files in the subdirectories then I end up getting that same "create_nordic_project.py failed (1)" error when I try to go through the "Open nRF Connect Project" flow. It seems like this has some dependencies on the .git files.

    Do you have any suggestions for getting this working? Yes, I've seen the "User Workflows" in the documentation, and am trying to follow "Workflow 1: Eschew Git and west", but as I said deleting the .git directories causes that python error. What I ended up doing was deleting all of the .git directories so that I could commit all of the files into a repo, and then afterward undeleted those files so that SES could open projects without causing that error. The problem now is that if someone else pulls from my repo, they will get this same error.

    Overall, this has been a very frustrating experience in getting NCS working in a clean manner. I understand that this is a very complex software system, but all of these dependencies make the setup very complicated. It is especially frustrating when I see that customizations that I've made to my git bash setup are causing the installation to break. Yes, there is a lot of documentation, but it seems like there's so many corner cases and so many steps that it's very easy for things to go wrong and difficult to pinpoint exactly what the problem is.

  • Hey again Sandeep!

    swlnk said:
    I temporarily deleted my .bashrc and .bash_profile files, re-ran the Toolchain Manager install, and it worked! After this, I can open SES and build projects.

    Great! Glad to hear it!

    I wouldn't say that you are really eschewing git and west by deleting all of the related files though.

    swlnk said:
    I right now am trying to do a commit of the full, clean SDK into a git repo- I want to commit the files as a snapshot of how they are right now, and not have dependent modules.

    I guess what works for you depends on what you want to do, but committing the entire SDK to your own repo doesn't sound that optimal to me.

    NCS isnt that complex. Essentially, the one thing you as a developer need to pay attention to is this file. It contains all of the modules in NCS v1.8 that you need, and all you need to do is run "west update". Though you would also need the west.yml file, which has to be placed in the manifest repo, which won't be changed by running "west update". (note that nrf is the manifest repo in ncs). Using your application as the manifest repo sounds like a workflow I think would be a better solution for you. That is listed as workflow 4 in the documentation you linked me to btw.

    If you haven't seen it already, I would really recommend this tutorial if you want to make NCS a bit less confusing to you.

    Let me know if there is anything else, though due to the holidays, you might have to wait a bit longer than usual for a response.

    Best regards,

    Elfving

  • Yep have the exact same issue. Needed to do a fully manual install with ncs v1.7.1, probably need to do that again today with v1.8

    (btw. Not really a big fan of all those 'nice' GUI electron apps, doing a mediocre job managing my Windows environment. I'd rather have proper WSL2 support with remote USB debugging and VS Code support)

Related