Zackriya-Solutions/meetily · error · anyhow::Error
Download stream failed for {}: {}
Error message
Download stream failed for {}: {} What it means
During a Parakeet model artifact download, the HTTP body stream yielded an error mid-transfer (Ok(Some(Err(error))) from reqwest's bytes_stream). Before returning, the code flushes the partially-written file so already-downloaded bytes can be resumed later, then surfaces the stream error wrapped with the artifact filename. It means the connection carrying the model download broke.
Source
Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:1027
Err(_) => {
writer.flush().await.map_err(|error| {
anyhow!("Failed to preserve {} after timeout: {}", artifact.filename, error)
})?;
return Err(anyhow!(
"Download timeout for {}: no data received for 30 seconds",
artifact.filename
));
}
Ok(None) => break,
Ok(Some(Err(error))) => {
writer.flush().await.map_err(|flush_error| {
anyhow!(
"Failed to preserve {} after stream error: {}",
artifact.filename,
flush_error
)
})?;
return Err(anyhow!("Download stream failed for {}: {}", artifact.filename, error));
}
Ok(Some(Ok(chunk))) => chunk,
};
let chunk_bytes = chunk.len() as u64;
let next_artifact_bytes = artifact_bytes
.checked_add(chunk_bytes)
.ok_or_else(|| anyhow!("{} size overflow", artifact.filename))?;
if next_artifact_bytes > artifact.exact_bytes {
writer.flush().await.map_err(|error| {
anyhow!("Failed to preserve {} after overlong response: {}", artifact.filename, error)
})?;
return Err(anyhow!(
"{} response exceeds its exact {} byte size",
artifact.filename,
artifact.exact_bytes
));
}View on GitHub (pinned to a2cb62e827)
Solutions
- Retry the download — the code flushes and preserves partial bytes, so it can resume with a Range request
- Check network stability (disable VPN/proxy, switch to wired connection) and retry
- Verify the model server/CDN URL is reachable with curl and supports long-lived connections
- Increase retry attempts or download during a stable network window
Example fix
// before
return Err(anyhow!("Download stream failed for {}: {}", artifact.filename, error));
// after
// automatic resume: catch this error, retry send_download_request with Range: bytes={downloaded}-
if downloaded_bytes < artifact.exact_bytes {
return self.download_with_resume(attempt + 1).await; // bounded retries
} Defensive patterns
Strategy: retry
Validate before calling
// pre-flight connectivity check before starting the download
let resp = reqwest::get(&file_url).await?;
anyhow::ensure!(resp.status().is_success(), "model server unreachable: {}", resp.status()); Try / catch
match download_result {
Err(e) if e.to_string().contains("Download stream failed") => {
// partial bytes were flushed; retry with Range resume
retry_with_resume(max_attempts = 3, backoff = exponential)
}
Err(e) => return Err(e),
Ok(v) => Ok(v),
} Prevention
- Use wired/stable connections for multi-hundred-MB model downloads
- Avoid VPNs or flaky proxies during model downloads
- Expect 30s idle timeouts — don't suspend the machine mid-download
- Rely on the built-in resume support instead of restarting from scratch
When it happens
Trigger: The chunked response stream from the model server errors mid-body: connection reset/dropped, TLS handshake renegotiation failure, proxy terminated the connection, or reqwest hyper-level I/O error while reading a chunk in the download loop at parakeet_engine.rs:1019-1027.
Common situations: Unstable Wi-Fi or VPN drops during a large model download; server or CDN closes the connection (keep-alive timeout, load-balancer idle timeout); corporate proxy/firewall interrupting long-lived HTTPS streams; sleep/hibernate of the machine mid-download.
Related errors
- Download timeout - No data received for 30 seconds
- {}: {}
- Download timeout - No data received for 30 seconds
- {} stored {} bytes, expected exactly {} bytes
- Download confirmed {} bytes, expected {} bytes
AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12).
Data as JSON: /api/errors/2aa789926fd4bdd4.
Report an issue: GitHub.