Device-os 1.2.1 and particle-cli 1.43 fail in 'particle update'

There is a node js error “Cannot read property ‘code’ of undefined” when running particle update, best guess is dfu util is erroring while trying to do the new bootloader update for 1.2.1 (

I’ve cross posted issues on device-os and particle-cli:

Everything works if you force version 1.1.1

Incidentally, worth noting I have two issues.

a) particle update on 1.43 particle-cli fails and the device is stuck in white pulse light, nothing on serial, only fix is flashing the 1.1.1 parts via particle flash --usb.
b) doing a cloud compile of our code, presumably which uses 1.2.1, then flashing that via particle flash [deviceid] mybinary@1.2.1.bin causes the device to brick in the same manner. I accidentally lost 2 devices to this before I realised what had happened. Silly me for trusting it to work.

Until both issues are resolved

I highly recommend anyone reading this do NOT use 1.2.1 or upgrade particle-cli to 1.43

Code and particle update works perfectly with 1.1.1 and CLI 1.42

Hi @mterrill I’m currently trying to reproduce your issue and I cannot do so after 30 updates to my P1. I’m wondering if the issue is with your user app that you posted about in the github issue? Could you please share that code? If you need to keep it confidential you can possibly boil it down to a minimal test case that can be shared, or share just the binary via email… 41%20PM
Also since you can downgrade and recover, I would suggest changing the language of “bricks” to “fails to update” or something along those lines. “bricks” is typically reserved for a non-booting device, and one that can no longer enter DFU mode.


An update here, I have been able to reproduce the error case. It does not brick the unit, but the final piece of the particle update fails and the device needs to be reset to get it out of a locked up state.

If you update to 1.2.1 with the CLI 1.43.0 particle update command via DFU mode from a Device OS version prior to 1.2.1-rc.3, it will require a reset. After doing that if you had credentials and online connectivity in your device it should boot in safe mode and get the bootloader from the Cloud, restart and be online. If your device was offline, it will appear to be in safe mode but be blinking green because it doesn’t have credentials. You can simply run particle update again and it should succeed this time, but you’ll still need to give your device credentials to see it connect to the Cloud.

We are currently looking into this issue for users that update with the Particle CLI and it should not affect a device that gets a 1.2.1 user app flashed to it OTA, which causes a safe mode healer update to system and bootloader.


We have a fix coming in 1.43.1 of the CLI today, so please be sure to update.

Particle CLI 1.43.1 is out and the particle update command has been tested on many different update paths successfully:
0.4.9 to 1.2.1
0.5.5 to 1.2.1
0.6.3 to 1.2.1
1.1.1 to 1.2.1

Please update your CLI to 1.43.1 with your favorite method.

Note that I updated the previous comment in the thread to reflect that the update path in question has been tested and fixed

1 Like

Cheers. I’ll test particle upgrade later on.

From a quick look before it seemed particle flash xxxdeviceidxxx /myfirmwaredirectory was still not working when you had a 1.1.1 device and cloud was sending it a 1.2.1 compiled binary. I got nothing on serial. I’ll test this again in about half an hour.

Lastly, out of interest, why are P1’s still being shipped to us from the factory with 0.5.5? Surely the line is putting at least 1.x on them and reducing the update steps / risk / length.