EPERM indicates a permission error.
What command did you use?
Try particle logout and particle login and mayby also a particle update-cli
BTW, once you have a binary created via a local build you’d rather use particle flash <deviceName> <firmware.bin>.
And to separate potential cloud building errors from OTA flashing you could also do the two steps individually.
Flashing from the CLI worked. But I also moved a copy of the .bin file to the ‘/users/me/’ directory.
I guess this might be an issue with working on a mac and all the permissions OS Catalina has. However, I have Cloud Flashed before from the Workbench and it has worked fine. Hoping that @m_m might comment? The feedback could be better on the error!
...then launch a terminal outside of vscode (e.g. Terminal.app) and run:
readlink $(which particle)
...finally, let's check permissions:
ls -al <your project directory>
ls -al ~/.particle/toolchains/buildscripts/1.8.0/
ls -al ~/.vscode/extensions/particle.particle-vscode-core-1.8.1/src/cli/bin/darwin/amd64/
I also moved a copy of the .bin file to the ‘/users/me/’ directory
Hi,
I have the same problem since today. Yesterday, Cloud compilation worked fine and suddenly I get this error:
Compile failed: Compiler encountered an error
Error: Command failed with exit code 1 (EPERM): /Users/egbert/.vscode/extensions/particle.particle-vscode-core-1.8.1/src/cli/bin/darwin/amd64/particle cloud compile xenon --target 1.4.4 --no-update-check
at makeError
[...]
I used VSCode for something else today and installed another plug-in. I also remember there was a recent VSCode update to 1.41.1 for my Mac runing 10.15.2 Catalina.
i was able to connect with @armor 1-on-1 to help troubleshoot this issue. turns out our error message is confusing things some - when you opt to “view logs” after hitting an error while running CLI-dependent commands (cloud flash / compile, etc) within Workbench, you see a message like:
Targeting version: 1.4.4
Including:
src/stroby.ino
src/stroby.cpp
project.properties
attempting to flash firmware to your device my-photon
Flash device failed: I didn't recognize that device name or ID
Error: Command failed with exit code 1 (EPERM): /home/me/.vscode/extensions/particle.particle-vscode-core-1.8.1/src/cli/bin/linux/amd64/particle cloud flash my-photon --target 1.4.4 --no-update-check
at makeError (/home/me/.vscode/extensions/particle.particle-vscode-core-1.8.1/node_modules/execa/lib/error.js:59:11)
at handlePromise (/home/me/.vscode/extensions/particle.particle-vscode-core-1.8.1/node_modules/execa/index.js:112:26)
…the Error bit:
Error: Command failed with exit code 1 (EPERM): /home/me/.vscode/extensions/particle.particle-vscode-core-1.8.1/src/cli/bin/linux/amd64/particle cloud flash my-photon --target 1.4.4 --no-update-check
at makeError (/home/me/.vscode/extensions/particle.particle-vscode-core-1.8.1/node_modules/execa/lib/error.js:59:11)
at handlePromise (/home/me/.vscode/extensions/particle.particle-vscode-core-1.8.1/node_modules/execa/index.js:112:26)
…is tacked on and misinterprets the CLI’s exit code as having been related to permissions (EPERM). more info can be found here.
the important part of the message is:
Flash device failed: I didn't recognize that device name or ID
in @armor’s case, this was due to targeting an unclaimed device.
for now, ignore the EPERM bit as it is inaccurate. we’ll get this fixed up in the next release of Workbench - thanks for your patience
All right, so for me it was a different issue. I only got cloud compilation back working when creating a new project with the workbench, reinstalling dependencies and copying over my files.
For now it works.
Flash device failed: Compiler encountered an error
Nothing to do with using an unclaimed device.
It is however now reporting successful flash but then not actually completing the flash - more likely to be an internet issue than Workbench or CLI related.