[Solved] Intermittent error compiling with CLI with the following message "attempting to compile firmware Compile failed. Exiting."

Hey guys does anyone you have a problem compiling with the command line?
For me I almost always have to run the command several times before in order for it to completely successfully or at least give me meaningful compiler error on my code.

Anyone else experiencing this?
this is the command I run to compile for my core
particle compile core …/GRID_LED_SEARCH --saveTo grid.bin

Hey there! Would you mind sharing the output of the CLI when it errors out?

Sure thing. Here are the commands used and the output after running it twice in a row. the second time it compiled. It’s not unusual for me to try compiling several times before successful.
Any ideas what might cause it?

===========================================
james@Jamess-MacBook-Pro:~/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH$ particle compile core ../GRID_LED_SEARCH --saveTo grid.bin

Compiling code for core

Including:
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Grid.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/location.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/pathfinder.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Search_state.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/WS2801.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/main.ino
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Grid.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/location.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/pathfinder.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Search_state.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/WS2801.cpp
attempting to compile firmware 
Compile failed. Exiting.

james@Jamess-MacBook-Pro:~/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH$ particle compile core ../GRID_LED_SEARCH --saveTo grid.bin

Compiling code for core

Including:
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Grid.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/location.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/pathfinder.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Search_state.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/WS2801.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/main.ino
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Grid.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/location.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/pathfinder.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Search_state.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/WS2801.cpp
attempting to compile firmware 
downloading binary from: /v1/binaries/57882c51ca8aee205e8798b2
saving to: grid.bin
Memory use: 
   text	   data	    bss	    dec	    hex	filename
  83880	    928	   9260	  94068	  16f74	
Compile succeeded.
Saved firmware to: /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/grid.bin

I’ve got a similar issue when building from a Dropbox folder while Dropbox is running in the background.
Try deactivating/pausing Dropbox during builds.
I guess the file watcher/updater might cause the up- or download to trip.

1 Like

Looks like that worked! Thanks for the head up!

I just use this script now to compile

================

osascript -e 'tell application "Dropbox" to quit'
particle compile core ../GRID_LED_SEARCH --saveTo grid.bin
open -a "Dropbox"

================

1 Like

Huh that is super interesting. Good find, @ScruffR!