Zackriya-Solutions/meetily · error · anyhow::Error

Download progress exceeds the catalog total

Error message

Download progress exceeds the catalog total

What it means

During a Parakeet model artifact download, the engine accumulates confirmed bytes per chunk. Before accepting each chunk it checks `next_confirmed_bytes > total_bytes`, where total_bytes comes from the download catalog's declared size for the artifact. This error means the HTTP body delivered more bytes than the catalog declared, so the download is aborted to prevent writing a corrupt/oversized file and to keep progress reporting sane.

Source

Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:1050

                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
                    ));
                }
                let next_confirmed_bytes = confirmed_bytes
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Progress overflow while downloading {}", artifact.filename))?;
                if next_confirmed_bytes > total_bytes {
                    return Err(anyhow!("Download progress exceeds the catalog total"));
                }

                writer
                    .write_all(&chunk)
                    .await
                    .map_err(|error| anyhow!("Failed to write {}: {}", artifact.filename, error))?;
                artifact_bytes = next_artifact_bytes;
                confirmed_bytes = next_confirmed_bytes;
                streamed_bytes = streamed_bytes
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Streamed byte count overflow"))?;
                bytes_since_report = bytes_since_report
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Progress byte count overflow"))?;

                let progress = Self::in_flight_progress(confirmed_bytes, total_bytes, 0.0);
                let elapsed = last_report.elapsed();
                if progress.percent > last_percent

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Refresh/redownload the model catalog so total_bytes matches what the server actually serves (stale manifest is the most common cause).
  2. Check that no proxy or interceptor (corporate proxy, VPN, antivirus HTTPS scanning) is altering the response body or Content-Length.
  3. Verify the URL in the catalog points to the exact artifact version; compare Content-Length on the URL with the manifest's exact_bytes via curl -I.
  4. Retry the download; transient CDN corruption is possible but repeated failures indicate a catalog/server mismatch.
  5. If you control the server, ensure it serves the file uncompressed and with a correct Content-Length header.

Example fix

// before: catalog declares stale size
// { "filename": "parakeet-int8.onnx", "exact_bytes": 812345678 }
// after: re-sync catalog so exact_bytes matches the served artifact
// { "filename": "parakeet-int8.onnx", "exact_bytes": 894512341 }
Defensive patterns

Strategy: validation

Validate before calling

// Before starting a download, verify the server's declared size matches the catalog
let resp = reqwest::head(&artifact.url).await?;
let content_length = resp.content_length().unwrap_or(0);
if content_length != artifact.exact_bytes {
    return Err(format!("Catalog size {} != server size {} for {}",
        artifact.exact_bytes, content_length, artifact.filename));
}

Prevention

When it happens

Trigger: Streaming a model artifact whose response body is longer than the artifact's declared total (e.g. total_bytes derived from the catalog/Content-Length) — the chunk loop in parakeet_engine.rs confirms bytes via checked_add and aborts as soon as the running total would exceed total_bytes.

Common situations: Server/proxy returns a different (larger) body than Content-Length (e.g. an HTML error page injected mid-stream, compressed responses counted differently, redirect bodies); a stale catalog entry pointing at a replaced model file; a mirror serving a different artifact version than the manifest describes.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12). Data as JSON: /api/errors/ffeda0bef42686a6. Report an issue: GitHub.