Strange installation problem with nRF Connect SDK - git not found

I am facing yet another strange installation problem, after  nRF Connect SDK always fails with error "not found" has been solved.

The installation worked so far and I was able to use the nRF Connect SDK without any issues.

When I yesterday tried to use the setup again, I suddenly got errors like "No boards found" etc. I read up on this forum about potential issues and reinstalled the SDKs and so on. Nothing helped. I noticed that everything worked fine if I tried to build on the commandline using "west builld" in VS Code, but the UI functions did not work.

Then I tried uninstalling everything, reinstall the VS Code extensions and all of a sudden I was no longer able to install the SDK anymore given me errors like "git not found" while GIT is DEFINITELY PRESENT on the system, also in the default search path. Running git from a cmdline works fine.

So I even reinstalled GIT with the Windows installer, rebooted etc, but nothing seemed to make this problem go away.

Then I tried installing the stuff using VS Code again, but where presented the same problem

If I open a new nRF Connect terminal and issue the very same command "west init" manually there, it works:

But after the installation the extension still complains nothing is installed.

[19:08:47] nRF Command Line Tools 10.23.2 are up to date
[19:08:58] nrfutil-toolchain-manager install v2.5.0: Download toolchain
[19:09:00] nrfutil-toolchain-manager install v2.5.0: Finished, using previously downloaded file: success
[19:09:00] nrfutil-toolchain-manager install v2.5.0: Unpack toolchain
[19:09:28] nrfutil-toolchain-manager install v2.5.0: Toolchain unpacked to C:\ncs\tmp\.tmpjhd3yt: success
[19:09:28] nrfutil-toolchain-manager install v2.5.0: Install toolchain
[19:09:28] nrfutil-toolchain-manager install v2.5.0: Toolchain installed at C:\ncs\toolchains\c57af46cb7: success
[19:09:29] =========== Toolchain validation report for nRF Connect SDK Toolchain v2.5.0 ===========
No issues were detected with the toolchain.
[19:09:53] Command failed: west init -m https://github.com/nrfconnect/sdk-nrf --mr v2.5.1
FATAL ERROR: can't find git; install it or ensure it's on your PATH

IMPORTANT: The data below could contain sensitive or confidential information about your environment.
If you do not wish this to be seen by others, please make sure to remove it before sharing.

For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.

{
  "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Pro",
    "osKernel": "10.0.19045",
    "vscode": "1.85.1",
    "electron": "25.9.7",
    "node": "v18.15.0"
  },
  "system": {
    "date": "2023-12-26T18:11:31.932Z",
    "vscodeRoot": "c:\\Users\\daubsi\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:02:53",
    "osUptime": "04:51:20",
    "cpu": "Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz"
  },
  "workspace": {
    "name": "hv23last",
    "workspaceFile": null,
    "folders": [
      "c:\\Users\\daubsi\\Nextcloud\\hv23last"
    ]
  },
  "sdks": [],
  "apps": [],
  "workspaceState": "freestanding-unconfigured",
  "toolchains": [
    {
      "version": "2.5.0",
      "path": "c:\\ncs\\toolchains\\c57af46cb7"
    }
  ],
  "connectedDevices": [],
  "deviceProvider": "nrfutil",
  "tools": {
    "C:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.16.1",
    "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.88j",
    "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.23.2",
    "nrfutil": "Not found",
    "C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\cmake.exe": "3.20.5",
    "C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\Scripts\\west.exe": "1.1.0",
    "C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\python.exe": "3.8.2",
    "C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\ninja.exe": "1.9.0",
    "C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\gperf.exe": "3.1",
    "C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\dtc.exe": "1.4.7",
    "C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\gn.exe": "2122",
    "C:\\ncs\\toolchains\\c57af46cb7\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
    "gdbPath": "c:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe"
  },
  "nrfutil": {
    "nrfutil-device": {
      "version": "2.0.0",
      "binPath": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.11.301-win32-x64\\platform\\nrfutil\\bin\\nrfutil-device"
    },
    "nrfutil-toolchain-manager": {
      "version": "0.14.1",
      "binPath": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.11.301-win32-x64\\platform\\nrfutil\\bin\\nrfutil-toolchain-manager"
    }
  },
  "environment": {
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\daubsi",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\daubsi",
      "PATH": "C:\\ncs\\toolchains\\c57af46cb7;C:\\ncs\\toolchains\\c57af46cb7\\mingw64\\bin;C:\\ncs\\toolchains\\c57af46cb7\\bin;C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin;C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\Scripts;C:\\ncs\\toolchains\\c57af46cb7\\opt\\nanopb\\generator-bin;C:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\aarch64-zephyr-elf\\bin;C:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\x86_64-zephyr-elf\\bin;C:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.11.301-win32-x64\\platform\\nrfutil\\lib\\nrfutil-toolchain-manager;C:\\Program Files (x86)\\VMware\\VMware Workstation\\bin\\;C:\\Python310\\Scripts\\;C:\\Python310\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\Pico Technology\\PicoScope6\\;C:\\Program Files\\010 Editor;C:\\Program Files (x86)\\GitExtensions\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\daubsi\\.cargo\\bin;C:\\Python310\\Scripts\\;C:\\Python310\\;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\daubsi\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files (x86)\\Nmap;C:\\Users\\daubsi\\vod_download_tools;",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "C:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk",
      "PYTHONPATH": "C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin;C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\Lib;C:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\Lib\\site-packages"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\daubsi",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\daubsi",
      "Path": "C:\\Program Files (x86)\\VMware\\VMware Workstation\\bin\\;C:\\Python310\\Scripts\\;C:\\Python310\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\Pico Technology\\PicoScope6\\;C:\\Program Files\\010 Editor;C:\\Program Files (x86)\\GitExtensions\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\daubsi\\.cargo\\bin;C:\\Python310\\Scripts\\;C:\\Python310\\;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\daubsi\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files (x86)\\Nmap;C:\\Users\\daubsi\\vod_download_tools;",
      "PATH": "C:\\Program Files (x86)\\VMware\\VMware Workstation\\bin\\;C:\\Python310\\Scripts\\;C:\\Python310\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\Pico Technology\\PicoScope6\\;C:\\Program Files\\010 Editor;C:\\Program Files (x86)\\GitExtensions\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\daubsi\\.cargo\\bin;C:\\Python310\\Scripts\\;C:\\Python310\\;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\daubsi\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files (x86)\\Nmap;C:\\Users\\daubsi\\vod_download_tools;"
    },
    "toolchainPath": "c:\\ncs\\toolchains\\c57af46cb7",
    "toolchainBinPath": "c:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin",
    "toolchainVersion": "2.5.0"
  },
  "terminal": {
    "defaultProfile": null
  },
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "",
      "toolchain": {
        "path": "${nrf-connect.toolchain:2.5.0}"
      },
      "ozonePath": "",
      "applications": [],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "taskBindings": {},
      "debugging": {
        "flash": true,
        "bindings": {},
        "justMyCode": true
      },
      "activeAppFollowActiveEditor": true,
      "deviceProvider": "",
      "flash": {
        "softreset": false,
        "erase": false,
        "recover": false
      },
      "enableTelemetry": false,
      "thirdpartyIntegration": {},
      "toolchainManager": {
        "indexURL": null,
        "installDirectory": null
      },
      "nrfutil": {
        "home": null
      },
      "defaultOpenAction": "ask"
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    }
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2023.11.301",
        "path": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.11.301-win32-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2023.10.17",
        "path": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2023.10.17",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2023.11.120",
        "path": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2023.11.120",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2023.11.64",
        "path": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2023.11.64",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": null,
      "ms-vscode.cpptools": "1.18.5",
      "ms-vscode.js-debug": "1.85.0",
      "ms-vscode.js-debug-companion": "1.1.2",
      "ms-vscode.vscode-js-profile-table": "1.0.8",
      "ms-python.python": "2023.22.1",
      "ms-python.vscode-pylance": "2023.12.1",
      "ms-vscode-remote.remote-wsl": "0.81.8",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "twxs.cmake": "0.0.17"
    }
  }
}

What could be the reason for this?

Refering to my other post mentioned at the top: I made sure that tools like "reg.exe", "git.exe" etc. fully resolve without issued. 

  • As you can see in the screenshot, the (manual) installation finished successfull, but the Icon on the lower right corner is still red:

    PS C:\ncs\v2.5.1> where.exe git
    C:\ncs\toolchains\c57af46cb7\mingw64\bin\git.exe
    C:\ncs\toolchains\c57af46cb7\bin\git.exe
    C:\Program Files\Git\cmd\git.exe

    Restarting VS Code now shows, that the SDK and Toolchain are properly installed. Clicking on "Create build config" again shows "No boards found"

    I noticed the terminal names in the lower right corner are written in yellow. Hovering over them gives:

    When I now click on "Create build config" despite the message "No boards found" I get "cmake is not found"

    But again we see, it can be resolved!

    As you can see, all the commands which are claimed to be not found are present.

    And if I now also restart nRF Desktop's Tool Chain manager I see the v2.5.0 was detected as installed.

    Trying to install another version again yields:

    Could you tell me which command the installer is actually trying to execute so I could try to investigate whether similar things like in my other posts with the conflicting python package might be present? 

  • Trying the build by hand: 

    This is what VS Code prints:

    Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for c:\Users\daubsi\cell-fund\v2.4.0\lesson5\cellfund_less5_exer1

    Building cellfund_less5_exer1
    west build --build-dir c:/Users/daubsi/cell-fund/v2.4.0/lesson5/cellfund_less5_exer1/build_1 c:/Users/daubsi/cell-fund/v2.4.0/lesson5/cellfund_less5_exer1 --pristine --board nrf52840dk_nrf52840 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE

    -- west build: generating a build system
    FATAL ERROR: CMake is not installed or cannot be found; cannot build.

    Opening a nRF Connect Shell and issuing the same command... everything works...

  • Hello

    To start off, I just have to say that we are severely understaffed this week because of the Christmas holidays, and I will have to get back to you on this when I have the time, which might be next week. Sorry for the inconvenience.

    Are you sure that you've installed the tools for Windows32 and not 64? It seems that you are using 32.

    Have you downloaded and installed anything using a VPN? (that typically makes you drop a few files when downloading the SDK or toolchain, which makes it not work). If so, turn it off and try again.

    Regards,

    Elfving

  • Hi Elfving, merry christmas and holidays first of all! Thanks for supporting on this task.

    I was getting back to my other post (linked at top) because I remembered that I modified the %PATHEXT% environmental variable to NOT include the .py extension in order to avoid any ambiguities like in the other post.

    I thought maybe we have a similar thing here and added ".py" again to see if it makes any difference. And yes... suddenly it started working again. So I tried removing the setting AGAIN and rebooted to see if it now fails again but much to my surprise it still worked, so it did not seem to be related to the %PATHEXT% variable....

    I have no explanation for this as I sincerely tried all kind of things as you can see above.

    I'd like to ask why you think I might have used the 32 bit edition? Where do you deduce this from? Don't think that should be the case. Also no VPN here.

    Could you maybe tell me which commands are executed when I click on install in the ToolChain Manager UI? I'd like to investigate this further to see what could have been the reason cause I'd like to know what made it fail... 

    The tip with the "reg ...." from the other post was well worth it, cause this brought me to the problem with the Impacket python library which shadowed the commands the Extension was internally executing.... Thanks! 

  • Hello again and sorry about the wait, I must've forgotten about this case here.

    daubsi said:

    Could you maybe tell me which commands are executed when I click on install in the ToolChain Manager UI? I'd like to investigate this further to see what could have been the reason cause I'd like to know what made it fail... 

    I'll look into it, either way I am glad that it is now working for you. Though what you describe seems a bit strange. I guess the rebooting must've made it work then? Considering the new case you've created I guess it still works for you?

    daubsi said:
    I'd like to ask why you think I might have used the 32 bit edition? Where do you deduce this from? Don't think that should be the case.

    My mistake, I just quickly saw that it said  "os": "win32," in your support info.

    Regards,

    Elfving

Related