{"record":{"id":"b5d147218635b94c","repo":"Zackriya-Solutions/meetily","slug":"model-has-error","errorCode":null,"errorMessage":"Model {} has error: {}","messagePattern":"Model (.+?) has error: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/whisper_engine/whisper_engine.rs","lineNumber":337,"sourceCode":"                *self.current_context.write().await = Some(ctx);\n                *self.current_model.write().await = Some(model_name.to_string());\n\n                // Enhanced acceleration status reporting\n                let acceleration_status = acceleration.status_label();\n\n                log::info!(\"Successfully loaded model: {} with {} (Performance Tier: {:?}, Beam Size: {}, Threads: {:?})\",\n                          model_name, acceleration_status, hardware_profile.performance_tier,\n                          adaptive_config.beam_size, adaptive_config.max_threads);\n                Ok(())\n            },\n            ModelStatus::Missing => {\n                Err(anyhow!(\"Model {} is not downloaded\", model_name))\n            },\n            ModelStatus::Downloading { .. } => {\n                Err(anyhow!(\"Model {} is currently downloading\", model_name))\n            },\n            ModelStatus::Error(ref err) => {\n                Err(anyhow!(\"Model {} has error: {}\", model_name, err))\n            },\n            ModelStatus::Corrupted { .. } => {\n                Err(anyhow!(\"Model {} is corrupted and cannot be loaded\", model_name))\n            }\n        }\n    }\n\n    pub async fn unload_model(&self) -> bool  {\n        let mut ctx_guard = self.current_context.write().await;\n        let unloaded = ctx_guard.take().is_some();\n        if unloaded {\n            log::info!(\"📉Whisper model unloaded\");\n        }\n\n        let mut model_name_guard = self.current_model.write().await;\n        model_name_guard.take();\n\n        unloaded","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/whisper_engine/whisper_engine.rs#L319-L355","documentation":"load_model matched ModelStatus::Error(err): a previous download attempt or file scan recorded a failure for this model (partial write, IO error, unreadable file) and stored the inner error string. Load is refused because the on-disk ggml artifact is known-bad. The embedded err text carries the root cause.","triggerScenarios":"A prior download_model failed mid-stream and set Error status; disk scan found the ggml file unreadable or the wrong size; antivirus quarantined the file after download; then load_model is called for that name.","commonSituations":"Interrupted downloads on unstable networks; disk-full during a large-v3 (~3GB) fetch; security software locking or removing .bin files; moving a models directory between machines with truncation.","solutions":["Read the embedded inner error message to identify the root cause before acting","Run download_model again for the same name — it overwrites the bad file from scratch","If re-download keeps failing, delete the ggml-<name>.bin file manually from the models dir, then download again","Check disk space and antivirus exclusions for the models directory"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const models = await invoke<ModelInfo[]>('get_whisper_models');\nconst m = models.find(x => x.name === modelName);\nif (m?.status === 'Error') {\n  // recover: overwrite the bad file\n  await invoke('download_model', { modelName });\n}\nawait invoke('load_whisper_model', { modelName });","typeGuard":"const isInErrorState = (m: ModelInfo | undefined): boolean => m?.status === 'Error';","tryCatchPattern":"try {\n  await invoke('load_whisper_model', { modelName });\n} catch (e) {\n  const msg = String(e);\n  if (msg.includes('has error')) {\n    log.warn(msg); // inner error names the root cause\n    await invoke('download_model', { modelName }); // fallback: re-download\n    await invoke('load_whisper_model', { modelName });\n  } else { throw e; }\n}","preventionTips":["Surface the embedded inner error string in the UI so users see the real cause (disk, network, AV)","Add antivirus exclusions for the models directory on Windows","After any failed download, immediately clean up or re-download before attempting a load"],"tags":["whisper","model-management","io","rust","tauri"],"backgroundTag":"corrupt-model-file","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}