arduino/Arduino · error · RunnerException
Couldn't find a Board on the selected port. Check that you h
Error message
Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
What it means
SerialUploader.waitForUploadPort waits for the board to disappear and re-enumerate on a (possibly new) serial port after triggering the 1200-baud bootloader reset. If no matching port appears within the timeout, it throws this RunnerException telling the user the IDE never saw the board re-open its bootloader port.
Source
Thrown at arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java:277
}
// Keep track of port that disappears
before = now;
Thread.sleep(250);
elapsed += 250;
// On Windows and OS X, it can take a few seconds for the port to disappear and
// come back, so use a time out before assuming that the selected port is the
// bootloader (not the sketch).
if (elapsed >= 5000 && now.contains(uploadPort)) {
if (verbose)
System.out.println("Uploading using selected port: " + uploadPort);
return uploadPort;
}
}
// Something happened while detecting port
throw new RunnerException(tr("Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload."), false);
}
private boolean uploadUsingProgrammer(String buildPath, String className) throws Exception {
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
String programmer = PreferencesData.get("programmer");
if (programmer.contains(":")) {
String[] split = programmer.split(":", 2);
targetPlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);
programmer = split[1];
}
PreferencesMap prefs = PreferencesData.getMap();
PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences();
if (boardPreferences != null) {
prefs.putAll(boardPreferences);
}
PreferencesMap programmerPrefs = targetPlatform.getProgrammer(programmer);View on GitHub (pinned to a0df6e0e83)
Solutions
- Press the board's reset button twice quickly right after upload starts (double-tap into bootloader)
- Select the correct port and verify with the Tools > Port menu after replugging
- Try a different USB cable/port (avoid hubs) and reinstall drivers
- Manually put the board in bootloader mode, or recover via another ISP programmer if the sketch bricks reset
Example fix
// before: no board visible after upload start // Tools>Port: /dev/ttyACM0 (greyed) // after: double-tap reset button // bootloader port reappears: /dev/ttyACM0 -> upload completes
Defensive patterns
Strategy: try-catch
Validate before calling
// Verify port enumerates before upload
SerialPort p = SerialPort.getCommPort(portName);
if (!p.openPort()) throw new IllegalStateException("Board port not present: " + portName); Try / catch
try {
serialUploader.uploadUsingPreferences(...);
} catch (RunnerException e) {
if (e.getMessage().contains("Couldn't find a Board on the selected port")) {
// prompt: double-tap reset, recheck port, retry
}
} Prevention
- Learn the double-tap reset maneuver for 32u4 boards
- Use good USB cables, avoid hubs
- Reinstall board drivers if ports don't enumerate
- Verify the selected port matches the board before uploading
When it happens
Trigger: During uploadUsingPreferences on 32u4/native-USB boards (Leonardo, Micro, etc.): the board did not reset, or the bootloader port had a different identity/never appeared before timeout.
Common situations: Leonardo-class boards whose sketch crashes so the 1200bps touch does nothing; driver problems leaving ports unenumerated; user selected the wrong port; board held in a bad state; USB cable/hub issues.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Burning bootloader is not supported via network!
- serial.port
- Error touching serial port ''{0}''.
- SCP error:
- Uknown SCP error:
AI-assisted analysis of arduino/Arduino@a0df6e0e83 (2026-09-06).
Data as JSON: /api/errors/d0683534454d106f.
Report an issue: GitHub.