[ERROR] particle cli nodejs thread error

Hi there :wave:

I’m trying to use particle cli but having some troubles with my setup.

Ubuntu 21.10
GNU bash 5.1.8(1)-release
particle-cli 3.0.0
nodejs v12.22.5
npm 7.5.2

Installation works fine, besides the PATH which I need to manually adjust.
However, when I connect my particle ARGON and try to read it form USB, a nodejs error related to thread safety blocks me.
USB cable works fine. ARGON led blinks, and the same error does not show up when cable is not connected.

Details follow.

myuser@mylaptop:~$ particle usb list --verbose
Node.js[7632]: ../src/node_api.cc:1087:napi_status napi_release_threadsafe_function(napi_threadsafe_function, napi_threadsafe_function_release_mode): Assertion `(func) != nullptr' failed.
 1: 0x9ef190 node::Abort() [particle usb list --verbose]
 2: 0x9ef217  [particle usb list --verbose]
 3: 0x9c572a napi_release_threadsafe_function [particle usb list --verbose]
 4: 0x7f7e495a7a28 Device::Close(Napi::CallbackInfo const&) [/home/myuser/.particle/node_modules/particle-cli/node_modules/usb/prebuilds/linux-x64/node.napi.glibc.node]
 5: 0x7f7e495b07ca Napi::InstanceWrap<Device>::InstanceMethodCallbackWrapper(napi_env__*, napi_callback_info__*) [/home/mysuer/.particle/node_modules/particle-cli/node_modules/usb/prebuilds/linux-x64/node.napi.glibc.node]
 6: 0x9a3755  [particle usb list --verbose]
 7: 0xbc9a29  [particle usb list --verbose]
 8: 0xbcb817 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [particle usb list --verbose]
 9: 0x13a72b9  [particle usb list --verbose]

I tried to reproduce this error on ubuntu 21.10 but I was unable to.

Could you try using neopo? It will provide you with particle CLI in addition to the tools needed to build workbench projects using CLI. (It usually resolves any environment or dependency errors.)

You can install neopo with:

bash <(curl -sL neopo.xyz/install)
1 Like


It solved the error. It was a missing dependency problem.

In particular, neopo installed in my system the following missing packages
python3-pip python3-setuptools libarchive-zip-perl libgpm2:i386 libncurses5:i386 libtinfo5:i386

One of these must have been the missing dependency in the particle cli installer.
In fact, I later tried with the installer at https://particle.io/install-cli and it started working as expected.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.