Zackriya-Solutions/meetily · warning · anyhow::Error
Download already in progress for model: {}
Error message
Download already in progress for model: {} What it means
Returned by download_model_detailed when model_name is already in the active_downloads set. The engine uses that set as a mutex-like guard (checked read-then-inserted write) so a second concurrent download for the same model is rejected instead of double-writing the same files.
Source
Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:555
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 Parakeet model with detailed progress (MB/speed/resume support)
pub async fn download_model_detailed(
&self,
model_name: &str,
progress_callback: Option<Box<dyn Fn(DownloadProgress) + Send>>,
) -> Result<()> {
log::info!("Starting download for Parakeet model: {}", model_name);
// Check if download is already in progress for this model
{
let active = self.active_downloads.read().await;
if active.contains(model_name) {
log::warn!("Download already in progress for Parakeet model: {}", model_name);
return Err(anyhow!("Download already in progress for model: {}", model_name));
}
}
// Add to active downloads
{
let mut active = self.active_downloads.write().await;
active.insert(model_name.to_string());
}
// Clear any previous cancellation flag for this model
{
let mut cancel_flag = self.cancel_download_flag.write().await;
*cancel_flag = None;
}
// Get model info
let model_info = {
let models = self.available_models.read().await;View on GitHub (pinned to 0281737d87)
Solutions
- Treat this error as benign in the UI: the first download is still running - attach to its progress events instead of surfacing an error
- Disable the download button while a model is in Downloading status (poll parakeet_get_available_models or track the invoke promise)
- Ensure single invocation from React (guard effects with a ref, avoid StrictMode double-calls reaching the command)
Example fix
// before
await invoke('parakeet_download_model', { modelName });
// after - ignore the 'already in progress' guard error
try {
await invoke('parakeet_download_model', { modelName });
} catch (e) {
if (!String(e).includes('already in progress')) throw e;
// first download still running - just resume listening to progress events
} Defensive patterns
Strategy: validation
Validate before calling
// Check for a running download before invoking another
let downloading = engine.discover_models().await?
.into_iter()
.any(|m| m.name == name && matches!(m.status, ModelStatus::Downloading { .. }));
if downloading {
// attach to progress events instead of starting a second download
} Type guard
// TS: { Downloading: { progress: n } } vs 'Available'/'Missing'
function isDownloading(status: unknown): boolean {
return typeof status === 'object' && status !== null && 'Downloading' in status;
} Try / catch
try {
await invoke('parakeet_download_model', { modelName });
} catch (e) {
if (String(e).includes('already in progress')) {
// not an error: the original download is still running - just show its progress
} else {
throw e;
}
} Prevention
- Disable the download button while the invoke promise is pending
- Guard React effects against double invocation (StrictMode) with a ref or status check
- Key download state on the model list's Downloading status, not local guesses
When it happens
Trigger: Invoking parakeet_download_model twice for the same model (double-click on the download button, React StrictMode double effect, or two components triggering the same command); a retry fired while the original attempt is still streaming the ~652 MB encoder file.
Common situations: No button disabling during download; frontend event listeners re-invoking on progress events; user impatient on a slow link clicking download repeatedly.
Related errors
- Parakeet model {} is not downloaded
- Parakeet model {} is currently downloading
- Download already in progress for model: {}
- Parakeet engine not initialized
- Parakeet engine not initialized
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/c51e33e3b5f824cc.
Report an issue: GitHub.