Zackriya-Solutions/meetily · error

Content-Range start exceeds end: {}

Error message

Content-Range start exceeds end: {}

What it means

A semantic validation in parse_content_range: after successful parsing, the start offset of the Content-Range byte range is greater than the end offset, which is impossible for a valid partial-content response. The server's resume response claims a reversed/inconsistent range.

Source

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

    }

    let (range, total) = value
        .split_once('/')
        .ok_or_else(|| anyhow!("Malformed Content-Range: {}", value))?;
    let (start, end) = range
        .split_once('-')
        .ok_or_else(|| anyhow!("Malformed Content-Range range: {}", value))?;
    let start = start
        .parse()
        .map_err(|e| anyhow!("Invalid Content-Range start: {}", e))?;
    let end = end
        .parse()
        .map_err(|e| anyhow!("Invalid Content-Range end: {}", e))?;
    let total = total
        .parse()
        .map_err(|e| anyhow!("Invalid Content-Range total: {}", e))?;
    if start > end {
        return Err(anyhow!("Content-Range start exceeds end: {}", value));
    }

    Ok(ContentRange::Range { start, end, total })
}

#[derive(Debug)]
pub enum ParakeetEngineError {
    ModelNotLoaded,
    ModelNotFound(String),
    TranscriptionFailed(String),
    DownloadFailed(String),
    IoError(std::io::Error),
    Other(String),
}

impl std::fmt::Display for ParakeetEngineError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Log the full Content-Range value (echoed in the error) to confirm the reversal
  2. Fix or replace the mirror/server emitting reversed ranges
  3. Delete the partial download file and restart the model download from scratch
  4. Send an explicit Range header from the client and verify the server echoes it correctly

Example fix

// before: trust server range blindly
// server sent: Content-Range: bytes 1023-0/2048 -> error
// after: clamp by re-requesting from the actual file size
let resume_from = std::fs::metadata(&partial_path)?.len();
request.header("Range", format!("bytes={}-", resume_from));
Defensive patterns

Strategy: retry

Validate before calling

fn range_is_ordered(v: &str) -> bool { v.trim().trim_start_matches("bytes ").split('/').next().and_then(|r| r.split_once('-')).map_or(false, |(s, e)| s.trim().parse::<u64>().ok().zip(e.trim().parse::<u64>().ok()).map_or(false, |(s, e)| s <= e)) }

Try / catch

match parse_content_range(v) { Err(e) if e.to_string().contains("exceeds end") => { log::warn!("server sent reversed range, restarting download"); delete_partial_file(); start_full_download() }, other => other }

Prevention

When it happens

Trigger: A 206 response header like 'bytes 1023-0/2048' reaches validate_partial_response while resuming a Parakeet model download, or a buggy server echoes the requested range in the wrong order.

Common situations: Server bugs in range handling; proxies rewriting Range requests incorrectly; custom mirror implementations that compute offsets with swapped arguments.

Understand the failure class

Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.

Related errors


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