Zackriya-Solutions/meetily · error

Full response declared {} bytes, expected {}

Error message

Full response declared {} bytes, expected {}

What it means

Thrown by `validate_full_response` when a 200 response's declared Content-Length differs from the exact expected byte size of the Parakeet model. The downloader validates the size up-front to avoid saving a truncated or wrong file; a mismatch aborts the download.

Source

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

                value
                    .to_str()
                    .map_err(|error| anyhow!("Invalid Content-Length header encoding: {}", error))?
                    .parse()
                    .map_err(|error| anyhow!("Invalid Content-Length header: {}", error))
            })
            .transpose()
    }

    fn validate_full_response(response: &reqwest::Response, exact_bytes: u64) -> Result<()> {
        if response.status() != reqwest::StatusCode::OK {
            return Err(anyhow!(
                "Expected full 200 response, received {}",
                response.status()
            ));
        }
        if let Some(content_length) = Self::declared_content_length(response)? {
            if content_length != exact_bytes {
                return Err(anyhow!(
                    "Full response declared {} bytes, expected {}",
                    content_length,
                    exact_bytes
                ));
            }
        }
        Ok(())
    }

    fn validate_partial_response(
        response: &reqwest::Response,
        expected_start: u64,
        exact_bytes: u64,
    ) -> Result<()> {
        if response.status() != reqwest::StatusCode::PARTIAL_CONTENT {
            return Err(anyhow!(
                "Expected partial 206 response, received {}",
                response.status()

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Update the expected model URL or app version so the expected byte size matches the file actually served.
  2. Point the download at the official source instead of the stale mirror.
  3. Disable transparent compression/proxies for this request.
  4. Compare `curl -sI <url> | grep Content-Length` against the expected size to identify which side is stale.
Defensive patterns

Strategy: validation

Validate before calling

let expected: u64 = MODEL_EXPECTED_BYTES;
let resp = client.head(url).send().await?;
let cl = resp.headers().get("content-length").and_then(|v| v.to_str().ok()).and_then(|s| s.parse::<u64>().ok());
if cl != Some(expected) { eprintln!("mirror file size {:?} != expected {}; mirror is stale", cl, expected); }

Try / catch

match result {
    Err(e) if e.to_string().contains("Full response declared") => invalidate_partial_file_and_redownload(),
    other => other,
}

Prevention

When it happens

Trigger: Full GET of the model returns 200 but its Content-Length does not equal the expected `exact_bytes` for that model build — e.g. the mirror serves a different (older/newer) model version, or the server compresses/transforms the body.

Common situations: Out-of-date mirror hosting a different model revision; transparent gzip/deflate proxy altering the transfer; CDN serving a partial error page with 200 status; app expects a newer model version than the mirror has.

Related errors


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