Zackriya-Solutions/meetily · error · anyhow::Error
Download confirmed {} bytes, expected {} bytes
Error message
Download confirmed {} bytes, expected {} bytes What it means
End-of-download total verification. The engine accumulates confirmed_bytes as each artifact is verified and compares the total against total_bytes before declaring the download complete. A mismatch means the overall downloaded set diverges from the expected manifest total, even if individual per-file checks passed.
Source
Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:1115
if active_download.cancellation.is_cancelled() {
return Err(DownloadCancelled.into());
}
let stored_bytes = fs::metadata(&file_path)
.await
.map_err(|error| anyhow!("Failed to read {} after download: {}", artifact.filename, error))?
.len();
if stored_bytes != artifact.exact_bytes {
return Err(anyhow!(
"{} stored {} bytes, expected exactly {} bytes",
artifact.filename,
stored_bytes,
artifact.exact_bytes
));
}
}
if confirmed_bytes != total_bytes {
return Err(anyhow!(
"Download confirmed {} bytes, expected {} bytes",
confirmed_bytes,
total_bytes
));
}
let elapsed = download_started.elapsed().as_secs_f64();
let speed_mbps = if elapsed > 0.0 {
streamed_bytes as f64 / (1024.0 * 1024.0) / elapsed
} else {
0.0
};
Ok((
DownloadProgress::new(total_bytes, total_bytes, speed_mbps),
progress_callback,
))
}
async fn finish_download(View on GitHub (pinned to a2cb62e827)
Solutions
- Delete the partially downloaded model directory and restart the full download from scratch.
- Check manifest consistency: confirm total_bytes equals the sum of each artifact's exact_bytes.
- Retry on a stable network connection; use a wired connection or different network if on flaky Wi-Fi.
- Update the app so the embedded manifest matches the current server-side model files.
Example fix
// before
if confirmed_bytes != total_bytes {
return Err(anyhow!("Download confirmed {} bytes, expected {} bytes", confirmed_bytes, total_bytes));
}
// after (derive total from artifacts to keep invariant)
let total_bytes: u64 = artifacts.iter().map(|a| a.exact_bytes).sum();
if confirmed_bytes != total_bytes {
return Err(anyhow!("Download confirmed {} bytes, expected {} bytes", confirmed_bytes, total_bytes));
} Defensive patterns
Strategy: validation
Validate before calling
// Assert manifest invariant before downloading let sum: u64 = artifacts.iter().map(|a| a.exact_bytes).sum(); assert_eq!(sum, total_bytes, "manifest total_bytes must equal sum of artifact sizes");
Try / catch
// Rust
if let Err(e) = download_model(name).await {
if e.to_string().contains("Download confirmed") {
clean_partial_download(name)?;
download_model(name).await?; // one full retry from scratch
} else { return Err(e); }
} Prevention
- Keep total_bytes derived from per-artifact exact_bytes instead of hardcoding it.
- Restart multi-artifact downloads from scratch rather than resuming partial state.
- Download over reliable networks; avoid pausing/resuming downloads mid-transfer.
- Log per-artifact confirmed sizes so a total mismatch can be localized quickly.
When it happens
Trigger: After all artifact checks in the download loop, the accumulated confirmed_bytes differs from the expected total_bytes — e.g., a partially completed multi-part download, an artifact skipped early, or manifest total_bytes not matching the sum of the individual artifact sizes.
Common situations: A model manifest (total_bytes) out of sync with its per-artifact sizes after a server-side update; a download resumed from a partial state missing an artifact; an earlier non-fatal warning path skipping a file while the total stayed unchanged.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- {} stored {} bytes, expected exactly {} bytes
- Download timeout - No data received for 30 seconds
- {}: {}
- Download timeout - No data received for 30 seconds
- Full response declared {} bytes, expected {}
AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12).
Data as JSON: /api/errors/bad78b65ce95f5f5.
Report an issue: GitHub.