Zackriya-Solutions/meetily · warning

Download already in progress

Error message

Download already in progress

What it means

download_model_detailed checks the active_downloads set and rejects a second concurrent download of the same model. This is a deliberate guard, not a failure: the first download keeps streaming and keeps emitting progress callbacks.

Source

Thrown at frontend/src-tauri/src/summary/summary_engine/model_manager.rs:363

                Box::new(move |p: DownloadProgress| cb(p.percent)) as Box<dyn Fn(DownloadProgress) + Send>
            });
        self.download_model_detailed(model_name, detailed_callback).await
    }

    /// Download a model with detailed progress (MB, speed, etc.)
    pub async fn download_model_detailed(
        &self,
        model_name: &str,
        progress_callback: Option<Box<dyn Fn(DownloadProgress) + Send>>,
    ) -> Result<()> {
        log::info!("Starting download for model: {}", model_name);

        // Check if already downloading
        {
            let active = self.active_downloads.read().await;
            if active.contains(model_name) {
                log::warn!("Download already in progress for model: {}", model_name);
                return Err(anyhow!("Download already in progress"));
            }
        }

        // Get model definition
        let model_def = get_model_by_name(model_name)
            .ok_or_else(|| anyhow!("Unknown model: {}", model_name))?;

        // Add to active downloads
        {
            let mut active = self.active_downloads.write().await;
            active.insert(model_name.to_string());
        }

        // Clear cancellation flag
        {
            let mut cancel_flag = self.cancel_download_flag.write().await;
            *cancel_flag = None;
        }

View on GitHub (pinned to 0281737d87)

Solutions

  1. Treat this as benign: ignore it and subscribe to the existing download's progress events
  2. Disable the download button while the model reports a downloading status
  3. On the caller side, check model status from list-models before invoking download
Defensive patterns

Strategy: try-catch

Validate before calling

// Caller-side guard: only start when not already downloading
let models = manager.list_models().await;
if models.iter().any(|m| m.name == name && m.is_downloading()) {
    return Ok(()); // existing download already reports progress
}

Try / catch

match manager.download_model_detailed(name, cb).await {
    Err(e) if e.to_string() == "Download already in progress" => Ok(()), // benign: first download continues
    other => other,
}

Prevention

When it happens

Trigger: Double-invoking download for the same model name before the first completes: double-clicked Download button, two components (settings and onboarding) starting the download, or a retry timer firing while the original attempt is still active.

Common situations: Frontend not disabling the button after the first invoke; a re-render spawning a duplicate Tauri command call; stall-detection logic that re-invokes on slow progress.

Related errors


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