Compiler timed out or encountered an error


Hey all,
I’m having the same error, but an interesting twist is that the project file works perfectly on the Mac version of Particle Dev, but not the Windows 10 version… Any ideas?


It appears to be a bug. It only occurs if:

  • Your main source file has a .ino file extension
  • You have a file
  • You are targeting system firmware 0.6.0 or later

If any of those conditions is not true, then you’ll get the correct error messages as you’d expect.

For example, you can rename your source file to have a .cpp file extension instead of .ino and add to the top:

#include "Particle.h"

Or if you are not using any libraries, you can remove the file.

I’m not sure how long it will take for a bug fix, but either of those workarounds, or using the CLI, can be used to work around the problem for now.

You can track the status of this issue here.


This error can also occur if you’ve … say … copy and pasted your .h file into your .cpp file, and forgotten to implement one of the functions :confused:

ie, the implementation in library2.cpp only contains:

LIB_Ret_t LIB_LibraryFunction(uint8_t data);

and is missing its code block { … } with the implementation.

If that function is called somewhere in a chain (ie main.cpp -> library.cpp -> library2.cpp) where library2.cpp has the unimplemented function, it causes “Compiler timed out or encountered an error”.

Commenting out the calling function in main.cpp will allow compilation to succeed, and un-commenting it will cause it to fail with this message. Adding the implementation in library2.cpp resolves the issue.


I am getting the “Compiler timed out or encountered an error” message in the Particle Desktop IDE. However, if I do:

particle compile electron in the directory it works.

The IDE is signed into my Particle account. Is there a place I can find a more descriptive error message. The current message is almost completely useless.


There are 63 posts in this thread, several of them point at your main culprits, but no the IDE doesn’t give you any way of getting further detail, there are benefits to using the console… Are you using the latest version of ParticleDev?


The Atom interface is at 1.19.0 which says it is the latest when I check for updates.
It also says that all my packages are up to date.


When you use the CLI what is the error that you’re seeing?


There is no error when using the CLI. It compiles and flash normally. Only the IDE has the error.


Oh that’s interesting. Is it possible for you to share your app with us?


My post above from June 2 includes a link to a library that causes the problem.


I just got this same error, it turns out that the trouble was with the variable name length.
I’m not sure why, but when I changed the variable name, it compiled fine.

This caused the compiler error (I even tried camel case): Particle.variable("heartbeatvalue", heartbeatvalue);

This resolved the error which made me think it was something to do with the variable length: Particle.variable("bpmvalue", bpmvalue);


Particle.variable names are limited to 12 characters, as is stated in the documentation (here)


Also having issues but I could identify 1 line of code, that made it break when compiling for 0.6.4 from the CLI or the Desktop IDE:


Maybe that helps…


I had a similar problem.
The problem was caused from using a Particle.variable() name which was too long. It must NOT be longer than 12 characters.
It would be great to have a real error message instead of a timeout :slight_smile:

I hope it will help.


I got just that when trying it on 0.6.3.


How did you get this error?

When I’m compiling in the local IDE, I have absolutely no error. Is there a way to display these errors?


I had this error “compiler timed out or encountered an error” because I exceeded max length of particle variable name:

Particle.variable("THIS_IS_VERY_LONG_VARIABLE_NAME", _DBG_indexToInsertPoint);

after changing this name to few characters (I don’t remember exact limit, however it can be found in documentation) everything works fine and error disappeared.