nrfjprog Error -"Worker process is dead, cannot execute command" - Ubuntu Docker Container

Hello,

I am currently trying to get our nRF52 development workflow working in a Docker container. I have been able to compile the firmware in the container and debug it using a remote JLink sever however I am unable to flash the firmware using nrfjprog whilst in the container.

Host: Windows 10

Guest: Ubuntu 20.04 - Dockerfile

When I run (or any nrfjprog command):

nrfjprog -i --log 

I get the following error log:

[2022-Jan-31 16:13:56] [ info] --------------------------------------------------------------------------------
[2022-Jan-31 16:13:56] [ info] nrfjprog -i --log
[2022-Jan-31 16:13:56] [ info] nrfjprog version 10.15.2 external
[2022-Jan-31 16:13:56] [ info] --------------------------------------------------------------------------------
[2022-Jan-31 16:13:56] [ info] Load library at /opt/nrf-command-line-tools/lib/libnrfjprogdll.so.
[2022-Jan-31 16:13:56] [ info] Library loaded, loading member functions.
[2022-Jan-31 16:13:56] [ info] Member functions succesfully loaded.
[2022-Jan-31 16:13:56] [debug] [ Client] - open
[2022-Jan-31 16:13:56] [debug] [ Client] - start
[2022-Jan-31 16:13:56] [error] [ Client] - Worker process is dead, cannot execute command.
[2022-Jan-31 16:13:56] [debug] [ Client] - terminate
The error is the same as seen on the nrfjprog not working on raspberry pi 4 post but the solution of "LANGUAGE=en nrfjprog -i" did not work for me.
I was wondering if anyone else has come across this issue and found a solution?
Many thanks,
Archie
  • Had a very similar issue on my Linux machine:

    $ nrfjprog --version --log
    ERROR: [ Client] - Worker process is dead, cannot execute command.
    ERROR: An internal error has occurred, please try again.

    Problem was my LANG env variable, which was set to en_CH.UTF-8, but for which I had no locales generated for. Looks like this in strace:

    openat(AT_FDCWD, "/usr/lib/locale/en_CH.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/lib/locale/en_CH.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/lib/locale/en_CH/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/lib/locale/en.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/lib/locale/en.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/usr/lib/locale/en/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    futex(0x7f60445471e0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
    write(2, "ERROR: [ Client] - Worker proces"..., 67ERROR: [ Client] - Worker process is dead, cannot execute command.


    Worked around the issue by unsetting LANG:

    $ LANG= nrfjprog --version
    nrfjprog version: 10.15.3 external
    JLinkARM.dll version: 7.64c

Related