Hello, did search but did not find anything similar.
I used IDE 1.8.x for a project that needs to be compiled and exported. There were no compiling/exporting errors in IDE 1.8.x.
Downloaded and installed IDE 2.2.1 then restarted computer (macOS 10.14) and got this when compiling:
cp: {sketch_path}: Permission denied
exit status 1
Compilation error: exit status 1
I tried to find the sketch_path variable but I have no idea where it is.
Two more weird things.
If I create a new sketch with some minimal hello world-like code and save it in the predefined Documents/Arduino folder I get the same error when compiling/exporting.
If I double click a *.ino file when IDE is not running, it will only open half way. The actual sketch is never opened and the Open option under File in the IDE Menu bar is not even present, there's only a greyed out Close.
IDE 2.2.1 was indicated being compatible with macOS 10.14 (Mojave) but maybe I would benefit from backing to some lower version?
Hi @Oortone. This error is caused by a bug in Arduino IDE 2.1.0 and newer (or more precisely a bug in one of the helper tools used by those versions of Arduino IDE):
The bug has already been fixed, but there hasn't been a release of Arduino IDE since that time. There is a beta build of Arduino IDE that has the bug fixed. I'll provide instructions you can use to get that version of Arduino IDE:
Sign in to your GitHub account.
(GitHub only allows downloads of the tester builds when you are signed in.)
A .dmg file will be extracted from the ZIP file. Double click on that .dmg file.
A window will open that contains an "Arduino IDE" icon and an Applications folder icon.
Copy the "Arduino IDE" icon to some convenient location on your computer.
If you would like to continue to use the release version of Arduino IDE you have installed already, then make sure not to replace the existing installation of the Arduino IDE app with the tester build you downloaded while following these instructions. You can rename the tester build app to a unique name or store it in a separate folder from the release version Arduino IDE app.
Double click on the app you installed.
An ""ArduinoCreateAgent" is an app downloaded from the Internet. Are you sure you want to open it?" dialog might now appear. Click the "Open" button in the dialog.
The tester build of Arduino IDE will now start. If you are using an Apple Silicon machine, you might notice that it is slower to open than the release version, and perhaps that it has inferior performance/higher resource usage in general. The reason for this is that, because they incur extra expenditures to produce, native Apple Silicon tester builds are not generated. The macOS tester builds are for "Intel" processors, but can be used on Apple Silicon machines as well thanks to the Rosetta 2 binary translator. However, the performance of the emulator is inferior when compared to the native Apple Silicon builds.
ⓘ Using the tester build you downloaded via the instructions above will not interfere with any other installations of Arduino IDE on your computer so you are welcome to have beta tester versions as well as the release version of Arduino IDE installed on your computer at the same time.
You are welcome. The alternative workaround you found of using Arduino IDE 2.0.4 (which is the last version before the regression) is a reasonable one.
The bug fix will be in the next production release of Arduino IDE.