Unable to parse JSON String when opening project

OS: Ubuntu 20.04.6
NCS SDK: 1.6.1
Segger: 5.50c

I recently got a new laptop, which I installed using the following guide:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/v1.6-branch/nrf/gs_installing.html

I'm in the process of porting to NCS 2, but I still need access to 1.6.1.

When I open the project in Nordic Segger, I get:

Unable to parse JSON String.

I've seen many other people with the same error on the forums, but most had also NCS 2 installed. I did a fresh install of 1.6.1 to prevent this error message.

After some troubleshooting I got this:

I modified html/import_nordic_project_dialog.htm to print more verbose information regarding this problem.

It seems that the JSON contains this error message, of course it would be unable to parse.

This is the javascript that causes the error:

  // CMake print the json string to std error, this is due to the nature of `message()` function.
  var releasesJson = cmake.readStandardError();
  releases = JSON.parse(releasesJson);

I have nRF for Desktop installed, with the toolchain manager. But as you might know, NCS 1.x is not listed because of Linux limitations.

So I firstly source ncs/zephyr/zephyr_env.sh before I start Segger from the commandline.

I hope someone can give me a solution. Maybe do a hard coded JSON string with the 1.6.1 version in it would suffice? But I need to know how the JSON should look like.

Related