1.现象
nrf connect for desktop中升级toolchain时报错:
Unable to install: Error invoking remote method 'apps:install-downloadable-app': Error: Failed with exit code 1. Failed to bootstrap core functionality before executing command.
HTTP request to default bootstrap resource
raw.githubusercontent.com/.../ master/bootstrap.json
failed.
Please check that your internet connection is functioning. If you use a proxy, please try the --detect-proxy flag or manually set the appropriate HTTP_PROXY- style environment variable(s).
To use a custom bootstrap config, set NRFUTIL_BOOTSTRAP_CONFIG_URL. To bootstrap directly from a nrfutil-core package tarball, set NRFUTIL_BOOTSTRAP_TARBALL_PATH.
Caused by: 0: error sending request for url (raw.githubusercontent.com/.../bootstrap.json): error trying to connect: tcp connect error: Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig. (os error 10013) 1: error trying to connect: tcp connect error: Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig. (os error 10013) 2: tcp connect error: Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig. (os error 10013) 3: Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig. (os error 10013).
2.原因
nrfutil工具安装报错。从日志可以看到
raw.githubusercontent.com/.../ master/bootstrap.json
这里面的master前面多了一个空格,怀疑是软件后台脚本的问题导致url分析出错无法下载安装。
直接点这个链接会404报错,但是把master前面的空格删掉,就会出现一个JSON的地址解析结果:
{
"nrfutil_core_tarball_urls": {
"aarch64-apple-darwin": "https://developer.nordicsemi.com/.pc-tools/nrfutil/nrfutil-aarch64-apple-darwin-7.7.0.tar.gz",
"x86_64-apple-darwin": "https://developer.nordicsemi.com/.pc-tools/nrfutil/nrfutil-x86_64-apple-darwin-7.7.0.tar.gz",
"x86_64-pc-windows-msvc": "https://developer.nordicsemi.com/.pc-tools/nrfutil/nrfutil-x86_64-pc-windows-msvc-7.7.0.tar.gz",
"x86_64-unknown-linux-gnu": "https://developer.nordicsemi.com/.pc-tools/nrfutil/nrfutil-x86_64-unknown-linux-gnu-7.7.0.tar.gz"
}
}
3.解决办法
手动安装nrfutil。再去更新toolchain。
到这里:官网nrfutil工具页面 下载nrfutil工具。
放置到任意目录,为了方便起见,比如D:根目录下面。
然后打开cmd命令提示,切换到该目录下,输入 :
nrfutil install device
出现100%成功提示即可。
D:\>nrfutil install device
[00:00:13] ###### 100% [Install packages] Install packages
此时再次进入nrf connect for desktop点击update升级toolchain manager就能正常更新了!