CLI 1.44.0 device doctor error

I updated my CLI to 1.44 this morning in hopes of fixing a different issue (I’ll post that separately after struggling a bit longer), and after running ‘particle doctor -v’ , I get the following error:

C:\Users\xxxxx>particle device doctor -v
The Device Doctor will put your device back into a healthy state
It will:
  - Upgrade system firmware
  - Flash the default Tinker app
  - Reset the device and server keys
  - Clear the Wi-Fi settings
Cannot read property 'then' of undefined
TypeError: Cannot read property 'then' of undefined
    at DoctorCommand.deviceDoctor (C:\Users\xxxxx\AppData\Local\particle\node_modules\particle-cli\dist\cmd\doctor.js:40:37)
    at Object.handler (C:\Users\xxxxx\AppData\Local\particle\node_modules\particle-cli\dist\cli\doctor.js:11:34)
    at Promise.resolve.then (C:\Users\xxxxx\AppData\Local\particle\node_modules\particle-cli\dist\app\command-processor.js:284:56)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
    at evalScript (bootstrap_node.js:482:13)
    at startup (bootstrap_node.js:180:9)
    at bootstrap_node.js:625:3

To be fair, I was having issues with CLI 1.43 doctor command, but didn’t note it. Was definitely not this one because I would get to the DFU prompt, etc. I’ll uninstall/reinstall to 1.43 now to see what that was, but just wanted to post this before. Thx

And if someone has time to show me how to format the code in the post properly, feel free to chip in. Newb

You can use this button image to do that.

If the code hilighting doesn't properly autodetect, you can add code modifiers like cpp, text, js, ... after the opening ``` symbols to provide a hint.

I've edited your post above to show how that would look and when you hit the image on your own posts, you can look at the way how I've done it (and edit your own posts if needed).

Thanks for help @ScruffR.

Some additional info, all from v1.44 since I wasn’t able to find an older windows installer (recent ones pull latest from repo and just reinstalls).

Doctor seems to be tripped up at identifying the device type. But ‘particle serial list’ returns

Found 1 device connected via serial:
COM4 - Boron

And ‘particle usb list’ returns

<no name> [e00fce68148a1206bf7a45f7] (Boron)
is it odd that this device returns no name?

And ‘particle serial inspect’ returns

Platform: 13 - Boron
Modules
  Bootloader module #0 - version 400, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 403, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 101
      undefined module #0 - version 0
  User module #1 - version 5, main location, 131072 bytes max size
    UUID: 0C07E8644A16xxxxxxxxxxx.....
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 403
      undefined module #0 - version 0
  empty - factory location, 131072 bytes max size

So you’d think device type could be resolved by doctor code.
Any other info needed?

This part should be moved to a separate post, but might be helpful to this topic.

Some background on why this might be. I performed a Factory Reset a couple of days ago, and cannot get the device past setup/listening mode ever since.

Mobile app (iPhone) setup will not progress past Pairing (stops at Error: Unable to find your mesh device…)

CLI/particle setup just returns back to command prompt after providing tips about how to get into Setup mode

CLI/particle flash of bootloader, system, and tinker via serial/DFU seems to work fine, but device stays in Setup mode

Workbench local compile and local flash of Tinker on 0.9.0 finishes with success, but no change in behavior.

Happy holiday!

System modul #1 - version 403 seems rather dated - it should be 1210 for latest official release v1.2.1.

I’d first run a particle update with the device in DFU Mode before going any further.

Ok, I just did this and got more weird (worse) results - device is now in 10-red SOS mode. Here’s what it said when I ran update:

C:\Users\xxxxx>particle update -v

> Your device is ready for a system update.
> This process should take about 30 seconds. Here it goes!

▌ Updating system firmware on the device...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:d00d
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x00030000, size = 645132
Downloadng syste[=========================] 100%       645132 bytes
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Download done.
File downloaded successfully
▀ Updating system firmware on the device...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:d00d
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "External Flash   "
Downloading to address = 0x80289000, size = 41756
Downloadng syste[=========================] 100%        41756 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
▐ Updating system firmware on the device...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:d00d
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: "DCD Flash   "
Downloading to address = 0x000006d9, size = 1
Downloadng syste[=========================] 100%            1 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
File too short for DFU suffix
A valid DFU suffix will be required in a future dfu-util release!!!
! System firmware update successfully completed!

> Your device should now restart automatically.

Not sure what to try next? Not as many options when it doesn’t show up as a serial device LOL! I do have one of the Particle USB SWD debuggers if it comes to that.

Try reinstalling Tinker now via particle flash --usb tinker -v (in DFU Mode again).
Then run particle serial inspect again.

Ok here’s the tinker flash

C:\Users\xxxxx>particle flash --usb tinker -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:d00d
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x000d4000, size = 11412
Download        [=========================] 100%        11412 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!

Flash success!

But particle serial inspect does not work because the device stays in SOS and doesn’t show up in Device Manager yet.

C:\Users\xxxxx>particle serial inspect
Could not get inspect device: No serial port identified

Any other tricks you can think of? Thanks

Can you get the device into Safe Mode?

Hi everyone,

I meet this issue also. I have updated the Particle-cli and the “doctor” command shows the same error. there is any solution?

No. I tried Mode/Reset button combo and it goes back to SOS. And tried particle usb safe-mode and get a no devices found message.

hi all :wave:

apologies - it seems the particle doctor command was broken in a recent release. i’ll get a bugfix release together ASAP :+1:

1 Like

If you cannot get your device out of that state it may be best to file a support ticket