Compile failed. Server Error

As of 18 hours ago I have not been able to compile using cli "particle compile photon". I get this message at the end of the compile:

attempting to compile firmware
Compile failed. Exiting.
Server error

Others have had this issue in the past:

and

Out of interest, when trying to compile from particle-dev, it says "Success", but does not create a binary file.

I have 73 source files in the src sub-dir plus less number of files in the lib sub-dir and so perhaps this is the issue...

Could you try compiling a known good app, something like Tinker, to rule out coding issues?

Good idea, back soon (that said, I did get it to compile once or twice successfully).

@Moors7, guess what?

Downloading firmware source (by mistake, was meant to be Tinker source) from https://github.com/particle-iot/firmware/archive/v0.7.0.zip timed out… trying again and still waiting. Pings to github are okay…

Hmmm…

I note that 18 hours ago issues started at home and now I am at work - so time and space were diverse.

Web sites are coming up okay.

Do you know what domain I should ping for the compiler service?

Now I can compile the original source:

attempting to compile firmware
downloading binary from: /v1/binaries/5ac723dab4d9440aeb8b67ed
saving to: photon_firmware_1523000251975.bin
Memory use:
text data bss dec hex filename
110028 2480 7884 120392 1d648 /workspace/target/workspace.elf

Compile succeeded.
Saved firmware to: C:\projs\R620_IOT\particle-iot\photon_firmware_1523000251975.bin

And tried again 30 seconds later and it failed.

Theory is now rounding on external network issues.....

I will close this ticket once it is understood as to where the network is clogging up (am in Melbourne, Australia).

Problem was still in play this evening:

attempting to compile firmware
Compile failed. Exiting.
Server error

I upgraded particle-cli from v1.27 to 1.29 AND deleted the non-required .particle.ignore that I had added (refer to CLI Compilation - Flattening, Ignoring, Etc - #8 by UMD).

Problem solved!

I should have removed .particle.ignore. first before upgrading, but didn't.

What I did do was put .particle.ignore. back to see if this was the cause, got this:

attempting to compile firmware
Compile failed. Exiting.
Server error
Compile a source file, or directory using the cloud compiler
Usage: particle compile [options] [files...]

Global Options:
....

Am 80% sure that the problem is the particle-cli version because .particle.ignore. was added after the problem had come up.

Case closed!

PS - NOTE that "Server error" comes up if you use wrong parameters in the command line, eg "particle compile photon -v"

1 Like

Spoke too soon.... this morning back to the same error return:

attempting to compile firmware
Compile failed. Exiting.
Server error
Compile a source file, or directory using the cloud compiler
Usage: particle compile [options] [files…]

Global Options:
…

ie the particle cli update does not fix the issue.

Am now going to chase the too many source files theory.... back soon.

After detailed investigation I can say with a high probability that the issue is related to:

  • the overall number of lines of code - whether or not they are just comments or in #ifdef blocks
  • when you compile - ie it is random in nature

This fits in with how this issue first arose for me:

working fine -> developing new (working!) code -> Server Error

It seems that I am on the limit of what the cloud compilation service can handle.

Conditional compiliation may be the answer - have raised this ticket:

Any other thoughts?

I will keep this ticket open because it needs to be sorted!

So now it is working as it should, with all my source files in place, \

Conclusion: clearly pointing to an upstream issue - either internet connectivity and/or (most likely) cloud compiler service.

Is there some clue in that it is now a weekend which one would assume has less compilation activity?

Am closing this ticket as it is “solved” in that we better know what is going on.