The command "particle keys doctor" failed

Hi everyone,

I saw here in the forum a lot of issues about the “green -> cyan -> red” error (which pointing of a problem with the server/device keys) and I saw how you guys suggest solving this issue ( using “particle keys server”, “particle keys doctor” commands) but in the 2nd command I receive a unique error that I didn’t see here in the forum.

the following is a screenshot of the error:

C:\Users\Omri Hadad>particle keys server -v
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Opening DFU capable USB device…
ID 2b04:d008
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #1
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash "
Downloading to address = 0x00000822, size = 512
Download [=========================] 100% 512 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Okay! New keys in place, your device will not restart.

C:\Users\Omri Hadad>particle keys doctor 23002e000a47363433353735 -v
New Key Created!
Saved!
dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Opening DFU capable USB device…
ID 2b04:d008
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #1
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash "
Downloading to address = 0x00000022, size = 608
Download [=========================] 100% 608 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Saved!
Make sure your device is in DFU mode (blinking yellow), and that your computer is online.: ENOENT: no such file or directory, unlink ‘C:\Users\Omri Hadad\AppData\Local\Temp\20191013-8288-yrpahb.02far.pub.pem’
VError: Make sure your device is in DFU mode (blinking yellow), and that your computer is online.: ENOENT: no such file or directory, unlink ‘C:\Users\Omri Hadad\AppData\Local\Temp\20191013-8288-yrpahb.02far.pub.pem’
at Promise.resolve.then.then.then.then.then.then.then.catch.err (C:\Users\Omri Hadad\AppData\Local\particle\node_modules\particle-cli\dist\cmd\keys.js:370:13)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
caused by: Error: ENOENT: no such file or directory, unlink ‘C:\Users\Omri Hadad\AppData\Local\Temp\20191013-8288-yrpahb.02far.pub.pem’
at Object.fs.unlinkSync (fs.js:1061:18)
at cleanup (C:\Users\Omri Hadad\AppData\Local\particle\node_modules\particle-cli\dist\cmd\keys.js:300:30)
at Promise.resolve.then.then.then.catch.then.err (C:\Users\Omri Hadad\AppData\Local\particle\node_modules\particle-cli\dist\cmd\keys.js:321:7)
at
at process._tickCallback (internal/process/next_tick.js:189:7)

Please, I did try almost everything from the solutions you guys have offered here in order to fix the server/device keys error.

Thanks.

This may be due to the fact that your user name contains a blank and some command line tools don’t like that.
Try to run the command from a different directory where the entire path does not contain any blanks.

Thank you for your answer.

I tried to do that from a different directory and still the same error. It seems like the particle CLI searching this file 20191013-8288-yrpahb.02far.pub.pem .

In which directory this file should be? How this file created?

As it seems CLI always uses a subdirectory of your user porfile and hence will always fail this way.
You could add another Windows user with no blanks in the name and try running CLI with this user.
There may also be some syntax for the particle keys doctor command that allows you to provide the path to the file, but I don’t know it off the top of my head - maybe @rickkas7 knows.

I always advise people to avoid blanks in user names, passwords, directory- and file names as there are just too many legacy (and ever modern) applications that will break that way.

It was actually the problem. I tried to do this with a computer that user directory is without spaces and it’s just working fine.

Thanks. @ScruffR

1 Like