arduino/Arduino · error · Exception
Error downloading {0}
Error message
Error downloading {0} What it means
download() wraps the underlying DownloadableContributionsAwareDownloader; after calling downloader.download(noResume) it checks isCompleted(). If the downloader did not finish successfully, it throws an Exception including the URL and the downloader's captured error as the cause.
Source
Thrown at arduino-core/src/cc/arduino/contributions/DownloadableContributionsDownloader.java:145
}
public void download(URL url, File tmpFile, Progress progress, String statusText, ProgressListener progressListener, boolean noResume, boolean allowCache) throws Exception {
final FileDownloader downloader = new FileDownloader(url, tmpFile, allowCache);
downloader.addObserver((o, arg) -> {
FileDownloader me = (FileDownloader) o;
String msg = "";
if (me.getDownloadSize() != null) {
long downloaded = (me.getInitialSize() + me.getDownloaded()) / 1000;
long total = (me.getInitialSize() + me.getDownloadSize()) / 1000;
msg = format(tr("Downloaded {0}kb of {1}kb."), downloaded, total);
}
progress.setStatus(statusText + " " + msg);
progress.setProgress(me.getProgress());
progressListener.onProgress(progress);
});
downloader.download(noResume);
if (!downloader.isCompleted()) {
throw new Exception(format(tr("Error downloading {0}"), url), downloader.getError());
}
}
public void downloadIndexAndSignature(MultiStepProgress progress, URL packageIndexUrl, ProgressListener progressListener, SignatureVerifier signatureVerifier) throws Exception {
// Extract the file name from the url
final String indexFileName = FilenameUtils.getName(packageIndexUrl.getPath());
final File packageIndex = BaseNoGui.indexer.getIndexFile(indexFileName);
final String statusText = tr("Downloading platforms index...");
// Create temp files
final File packageIndexTemp = File.createTempFile(indexFileName, ".tmp");
try {
// Download package index
download(packageIndexUrl, packageIndexTemp, progress, statusText, progressListener, true, true);
final URL signatureUrl = new URL(packageIndexUrl.toString() + ".sig");
if (verifyDomain(packageIndexUrl)) {View on GitHub (pinned to a0df6e0e83)
Solutions
- Inspect the cause (downloader.getError()) to find the real network/HTTP failure and address it (fix URL, proxy, credentials).
- Retry the download — transient network issues are the most common cause.
- Update the package index so the contribution's URL points to a still-hosted archive.
- Download the archive manually in a browser to confirm server availability, then clear staging and retry via the IDE.
Defensive patterns
Strategy: retry
Try / catch
try { downloader.download(c, progress, status, listener, false, true); } catch (Exception e) { Throwable cause = e.getCause(); log("Download failed for " + c.getUrl() + ": " + cause); backoffAndRetry(); } Prevention
- Keep the package index updated so URLs are current.
- Log and inspect the cause for the actual HTTP/network failure.
- Check proxy/TLS configuration for corporate networks.
When it happens
Trigger: download() is called and the underlying HTTP downloader finishes without completing the transfer (connection dropped, server error, no resume possible), so downloader.isCompleted() returns false and downloader.getError() is non-null.
Common situations: Server returning 404/403 for an outdated package URL; TLS or proxy failures; network timeouts on large archives; a mirror that does not support HTTP range requests when resuming.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- CRC doesn't match, file is corrupted. It may be a temporary
- Received invalid http status code from server: {resp}
- Can't download {0}: invalid filename or exinsting directory
- Unable to understand proxy settings
- Unable to fetch PAC file at {pac}. Response code is {respons
AI-assisted analysis of arduino/Arduino@a0df6e0e83 (2026-09-06).
Data as JSON: /api/errors/fda3eddc60fdd010.
Report an issue: GitHub.