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

Download failed with status: {}

Error message

Download failed with status: {}

What it means

The HTTP request to the HuggingFace URL completed but returned a non-success status, which is embedded in the message (e.g. 404 Not Found, 429 Too Many Requests, 401/403). The engine removes the model from active_downloads before returning, so a retry is not blocked. The URL shape is ggerganov/whisper.cpp/resolve/main/ggml-<model>.bin.

Source

Thrown at frontend/src-tauri/src/whisper_engine/whisper_engine.rs:978

            let mut models = self.available_models.write().await;
            if let Some(model_info) = models.get_mut(model_name) {
                model_info.status = ModelStatus::Downloading { progress: 0 };
            }
        }
        
        log::info!("Creating HTTP client and starting request...");
        let client = Client::new();
        
        log::info!("Sending GET request to: {}", model_url);
        let response = client.get(model_url).send().await
            .map_err(|e| anyhow!("Failed to start download: {}", e))?;
        
        log::info!("Received response with status: {}", response.status());
        if !response.status().is_success() {
            // Remove from active downloads on error
            let mut active = self.active_downloads.write().await;
            active.remove(model_name);
            return Err(anyhow!("Download failed with status: {}", response.status()));
        }
        
        let total_size = response.content_length().unwrap_or(0);
        log::info!("Response successful, content length: {} bytes ({:.1} MB)", total_size, total_size as f64 / (1024.0 * 1024.0));
        
        if total_size == 0 {
            log::warn!("Content length is 0 or unknown - download may not show accurate progress");
        }
        
        let mut file = fs::File::create(&file_path).await
            .map_err(|e| anyhow!("Failed to create file: {}", e))?;
        
        log::info!("File created successfully at: {}", file_path.display());
        
        // Stream download with real progress reporting
        log::info!("Starting streaming download...");
        log::info!("Expected size: {:.1} MB", total_size as f64 / (1024.0 * 1024.0));

View on GitHub (pinned to 0281737d87)

Solutions

  1. Open the exact URL from the log line in a browser or curl to see the real status body
  2. 404: the model key maps to a dead URL — pin a working revision (?download=true or a commit-pinned resolve URL) or update the URL map
  3. 429/5xx: wait and retry with backoff; the download restarts cleanly from byte 0
  4. 401/403: check proxy/firewall rules and any HF token requirements for the repo
Defensive patterns

Strategy: retry

Validate before calling

// Rust: preflight the URL so a 404 surfaces before the UI enters downloading state
let resp = client.head(model_url).send().await?;
if !resp.status().is_success() {
    return Err(anyhow!("Model URL unreachable ({}): {}", resp.status(), model_url));
}

Try / catch

match engine.download_model(name, None).await {
  Err(e) if String::from(&e).contains("429") || String::from(&e).contains("5") => {
      tokio::time::sleep(Duration::from_secs(30)).await; // rate limit / 5xx: back off and retry
      engine.download_model(name, None).await
  }
  other => other,
}

Prevention

When it happens

Trigger: Upstream removed or renamed the ggml file (404); HuggingFace rate limiting after repeated large downloads (429); auth-gated or region-blocked CDN node (401/403); transient 5xx from the CDN.

Common situations: HF repositories reorganizing files; CI or multi-machine setups hammering the same model URL; corporate egress proxies returning 403; LFS bandwidth quotas on the upstream repo.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16). Data as JSON: /api/errors/5e29050774b9f665. Report an issue: GitHub.