{"record":{"id":"80af4904b78a9b7c","repo":"Zackriya-Solutions/meetily","slug":"parakeet-model-is-currently-downloading","errorCode":null,"errorMessage":"Parakeet model {} is currently downloading","messagePattern":"Parakeet model (.+?) is currently downloading","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":418,"sourceCode":"                let model = ParakeetModel::new(&model_info.path, quantized)\n                    .map_err(|e| anyhow!(\"Failed to load Parakeet model {}: {}\", model_name, e))?;\n\n                // Update current model and model name\n                *self.current_model.write().await = Some(model);\n                *self.current_model_name.write().await = Some(model_name.to_string());\n\n                log::info!(\n                    \"Successfully loaded Parakeet model: {} ({})\",\n                    model_name,\n                    if quantized { \"Int8 quantized\" } else { \"FP32\" }\n                );\n                Ok(())\n            }\n            ModelStatus::Missing => {\n                Err(anyhow!(\"Parakeet model {} is not downloaded\", model_name))\n            }\n            ModelStatus::Downloading { .. } => {\n                Err(anyhow!(\"Parakeet model {} is currently downloading\", model_name))\n            }\n            ModelStatus::Error(ref err) => {\n                Err(anyhow!(\"Parakeet model {} has error: {}\", model_name, err))\n            }\n            ModelStatus::Corrupted { .. } => {\n                Err(anyhow!(\"Parakeet model {} is corrupted and cannot be loaded\", model_name))\n            }\n        }\n    }\n\n    /// Unload the current model\n    pub async fn unload_model(&self) -> bool {\n        let mut model_guard = self.current_model.write().await;\n        let unloaded = model_guard.take().is_some();\n        if unloaded {\n            log::info!(\"Parakeet model unloaded\");\n        }\n","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L400-L436","documentation":"Returned by load_model when the model's status is ModelStatus::Downloading. The status map marks a model Downloading while download_model_detailed is streaming files, and discover_models also forces Downloading for names present in active_downloads, so the engine refuses to load a half-written model directory.","triggerScenarios":"Calling parakeet_load_model while a download for the same model is active (download started from the settings UI, a retry, or a second window); calling load right after triggering download without waiting for the completion event; a download task that is slow on large files (encoder ~652 MB) so the overlap window is minutes long.","commonSituations":"UI lets the user click \"Use model\" while the progress bar is still moving; double-invocation of the download command where one instance is still active; slow connection (v3 downloads come from meetily.towardsgeneralintelligence.com, v2 from huggingface.co) making users think the download finished.","solutions":["Wait for the download completion event emitted by parakeet_download_model, then retry the load","Poll parakeet_get_available_models until status is \"Available\" with a timeout before giving up","Disable the load/select button in the UI while a download is in progress"],"exampleFix":"// before\nawait invoke('parakeet_load_model', { modelName });\n\n// after - only load when not downloading\nconst info = (await invoke<any[]>('parakeet_get_available_models')).find(m => m.name === modelName);\nif (info && typeof info.status === 'object' && 'Downloading' in info.status) {\n  await new Promise(res => { /* resolve on download-complete event */ });\n}\nawait invoke('parakeet_load_model', { modelName });","handlingStrategy":"validation","validationCode":"// Refuse to load while a download is active for this model\nlet infos = engine.discover_models().await?;\nif let Some(m) = infos.iter().find(|m| m.name == name) {\n    if matches!(m.status, ModelStatus::Downloading { .. }) {\n        anyhow::bail!(\"download in flight; wait for completion\");\n    }\n}","typeGuard":"fn is_downloading(info: &ModelInfo) -> bool {\n    matches!(info.status, ModelStatus::Downloading { .. })\n}\n\n// TS side: struct variants arrive externally tagged, e.g. { Downloading: { progress: 42 } }\nfunction isDownloading(status: unknown): boolean {\n  return typeof status === 'object' && status !== null && 'Downloading' in status;\n}","tryCatchPattern":"try {\n  await invoke('parakeet_load_model', { modelName });\n} catch (e) {\n  if (String(e).includes('currently downloading')) {\n    // benign: attach to the running download's progress events and retry on completion\n  } else {\n    throw e;\n  }\n}","preventionTips":["Bind the Load/Use button's disabled state to Downloading status from the models list","Have exactly one component own download invocation; others subscribe to progress events","Wait for the download-complete event rather than guessing a duration"],"tags":["parakeet","download","model-management","concurrency"],"backgroundTag":"download-in-progress","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}