Code flashing correctly, but status 'failed'

Hi guys,

Whenever I hit flash on the Web IDE, I get a spark/flash/status of failed. The updated code, however, seems to be flashed correctly and everything works as expected. Here’s the typical events I get while flashing:

event: spark/flash/status
data: {"data":"failed ","ttl":"60","published_at":"2016-02-08T14:08:22.202Z","coreid":"xxx"}

event: spark/status
data: {"data":"online","ttl":"60","published_at":"2016-02-08T14:08:22.199Z","coreid":"xxx"}

event: spark/device/app-hash
data: {"data":"B260284A56FF00B208C15C2A0E61EA71CCFED36BEA2F5167BC5BC7A055A76C3E","ttl":"60","published_at":"2016-02-08T14:08:28.346Z","coreid":"xxx"}

As far as I know, the app-hash event is only triggered after a flash, right? Any idea why I get this status of failed, even though the new code is flashed just fine?


1 Like

You can ignore the failure message - it’s a false negative caused by the way the cloud determines the result of the OTA - the cloud team are aware of this - I’ve posted a suggestion internally to to give some time to fixing it this sprint.

Still happening, but for me it is intermittent instead of always. Sometimes it says success.

{"name":"spark/flash/status","data":"started ","ttl":"60","published_at":"2016-07-11T21:05:08.297Z","coreid":"2f0031000647343232363230"}
{"name":"spark/flash/status","data":"failed ","ttl":"60","published_at":"2016-07-11T21:05:12.569Z","coreid":"2f0031000647343232363230"}

App hash is different, so I assume its actually success, like the IDE says

Is this still an issue? I am getting this message after every flash attempt. thanks.

event: spark/flash/status
data: {“data”:"failed ",“ttl”:60,“published_at”:“2018-12-07T05:07:54.060Z”,“coreid”:“4800000000000002”}

There are several reasons why a flash would fail with that error:

  • The device isn’t actually online (more common with cellular)
  • An Electron with a 3rd-party SIM card has the keep-alive set incorrectly
  • The user firmware is interfering with the flash.

The last one can usually be remedied by flashing in safe mode (breathing magenta). Hold down RESET and SETUP/MODE, release RESET and continue to hold down SETUP/MODE until the status LED blinks magenta (red and blue at the same time). Release SETUP/MODE. Wait while the status LED cycles trough blinking green, blinking cyan, fast blinking cyan, and finally breathing magenta. Then try flashing.

1 Like

Thanks for the reply Rick. This one was the culprit
An Electron with a 3rd-party SIM card has the keep-alive set incorrectly