Particle Dev won't build, particle-cli will

Particle Dev has been giving me a hassle lately, and only with a specific project I’m working on. I’ll summarize.

  1. Particle Dev will compile my project successfully for the Core (this is the default if no “device” has been selected), resulting in a core_*.bin firmware file.
  2. Particle Dev will not compile my project for the Photon (once I have selected it as the target)
  • The error provided is lack-luster: only “Compiler timed out or encountered an error” in red at the bottom of the Particle Dev window. Clicking this message shows “There were no compile errors”, which is obviously untrue.
  1. Particle CLI will compile my project for the Photon, with no warnings or errors, and results in a fully functional photon_*.bin firmware file.

How can I troubleshoot this further? A different (much simpler) piece of code works in all circumstances, so it must be code-related.

This happens to me with Particle Dev after firmware updates become available.

If you haven’t already done so, try flashing “Bare Minimum” sketch to your Photon on Build web dev app.

That may force a firmware update (that may take a while… like 10mins but you get to look at fascinating color changes).

I can then flash from Particle Dev.

Bare Minimum:

void setup()
{

}

void loop()
{

}

Are you sure that the firmware version on the Particle has anything to do with Cloud Compile? This is all before I even try to flash.

[edit] Funny, even the Bare Minimum provided by Particle Build won’t compile, in Particle Build!
[edit2] Looks like the Bare Minimum will compile when I have a different Particle targeted (I have two), but not at all when I have my primary targeted. This is very odd.

It sounds like the cloud does not think your primary Photon is a Photon. This has happened sporadically to a few other folks.

Can you log into the web IDE (Build) and look at your devices there on the target menu?

Other than that, my only thought is that dev did not installed correctly somehow.

1 Like

I just flashed Tinker to the primary Photon, and I am now able to compile and flash things from Particle Build. I think it’s now updating to the latest firmware, we shall see. I’ll reply back when that’s finished…

1 Like

Okay, after the Tinker flash and firmware update, things are working from both Particle Dev and Particle Build again.

I’m willing to bet that flashing Tinker with the iOS app fixed any issue in the cloud regarding the device type, but I still wish that Particle Dev had a better output for these kinds of errors.

2 Likes

I spoke too soon! Some random amount of time later, the old behaviour came back, seemingly without me actually doing anything. Trying the Tinker trick…

[edit] That worked again. What’s going on here? Why is this happening for this Photon?

[edit2] Looks like I have about 45 minutes time between flashing Tinker and then my own application code before the Cloud refuses to compile for this Photon again - it just happened again (at about 3:30 pm MDT)

[edit3] It looks like just initiating the Tinker flash thru iOS is enough to convince the Cloud to compile for this device again - it doesn’t even need to actually finish flashing (I can click Compile right after initiating a Tinker flash and it will work)

I am still consistently encountering this error where I flash my non-Tinker code, and after a random amount of time the Cloud will refuse to build/flash anything from Dev or Build. Cli still works fine (I think because it’s not looking for a specific device). It’s only happening with one of my two Photons, the one with more complex code.

Also, one thing that I will mention is that I have more than the “allowed” number of Spark Variables registered (though they actually all work). Will the cloud refuse to work with a Phonon that is over this limit after a bit?

After reducing the number of Spark variables, this issue seems to have vanished.

So: at what number of variables does this become an issue? I’m checking on this now.