I can’t get “particle flash DEVICEID” to return anything other than errors at the moment. Here’s what I’m getting:
Flash device failed.
{ Error: socket hang up
at createHangUpError (_http_client.js:253:15)
at TLSSocket.socketOnEnd (_http_client.js:345:23)
at emitNone (events.js:91:20)
at TLSSocket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9) code: 'ECONNRESET' }
Then after trying again, I’m getting this:
Flash device failed.
{ Error: connect ETIMEDOUT 52.0.104.117:443
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
code: 'ETIMEDOUT',
errno: 'ETIMEDOUT',
syscall: 'connect',
address: '52.0.104.117',
port: 443 }
I did a restart of my machine; no change.
Tried once more and then it suddenly compiled!
Tried yet another time and this time it’s just hanging. I’ve waited 15 minutes, but the task never ends.
Cancelled and tried a fourth time - now it compiled…
I just realised - this is definitely a server issue. The compiler output shows errors that have long been fixed, so the server is caching old code instead of using the current code.
I've seen ECONNRESET on clients side issues before as well, when the connection was killed for whatever reason.
I still cannot reproduce the issue, and particle compile photon tinker.ino works fine on multiple occasions wihtout a hiccup.
That seems to indicate that the cloud is fine, and it's most likely an issue on the client side.
Could you try compiling first, and then uploading? Shouldn't really make a difference, but doesn't hurt to try.
Also, could you try a more simple project, and see if that does work reliably?
Can you elaborate how complex? (I see you've meanwhile already clarified )
There is a (IMHO questionable) statement that "too big projects" should rather be built with local toolchain than via the build farms - which might play a role, but isn't a valid excuse
I dunno what happened, but now everything is back to normal. Compile times are down to 20 seconds (normal for this project). The Particle Status page has indicated no errors all the time. While the problem persisted, I had more than 3 minutes compile time, but since only every second compile worked it took me 6 minutes for each change.
I will certainly put in the last effort to make it compile properly locally. My problem is that I can’t get it to work properly since something isn’t being linked as it should. It compiles fine, but the output does not contain a valid app:
text data bss dec hex filename
6476 8 1780 8264 2048 …/…/…/myproject/target/myproject.elf
Both the other two binaries compile as they should (system-part1 + system-part2), but my local app compiles without errors, but does not contain the app itself. It works for simpler stuff. I’ll keep that in a separate thread though.