arduino / arduino/Arduino

Arduino 1.8.9 - macOS Mojave - upload issue

Open
#8,980 0 comments 0 reactions 0 assignees View on GitHub
Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

Have not used Arduino IDE a while, 1.8.5 last, upgraded to macOS 10.14, new Arduino 1.8.9, and could not upload any more, see msgs below. This is caused by an old `/Library/Arduino15` directory. Deleting or renaming it solves the problem, a new "Arduino15" directory is then created in `/Library/`

**Request: please check if the Arduino15 directory is old and/or invalid, and please display an error message. This has cost me quite some googling to resolve.**

error:
```
Arduino: 1.8.9 (Mac OS X), Board: "Arduino/Genuino Uno"

Sketch uses 450 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
___REMOVE___/bin/avrdude -C___REMOVE___/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.usbmodem14301 -b115200 -D -Uflash:w:/var/folders/7m/vwwfgmcs5wvg_3q3fq5slr400000gn/T/arduino_build_611321/sketch_jun15b.ino.hex:i
java.io.IOException: Cannot run program "___REMOVE___/bin/avrdude": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:11)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:197)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2070)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 11 more
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the upload failure with an old or invalid /Library/Arduino15 directory and compare it with a newly created directory. Start by tracing the Arduino IDE upload flow around the avrdude command shown in the report. Done means the IDE detects the invalid directory and displays a useful error message instead of failing with the shown missing-file error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, macos
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.