{"record":{"id":"94815f7fdb3355eb","repo":"Zackriya-Solutions/meetily","slug":"failed-to-read-metadata","errorCode":null,"errorMessage":"Failed to read {} metadata: {}","messagePattern":"Failed to read (.+?) metadata: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":417,"sourceCode":"            available_models.clear();\n            for model in &models {\n                available_models.insert(model.name.clone(), model.clone());\n            }\n            drop(available_models);\n            drop(active_downloads);\n\n            for (model_name, error) in validation_errors {\n                log::warn!(\"Model directory {} appears corrupted: {}\", model_name, error);\n            }\n            return Ok(models);\n        }\n    }\n\n    fn validate_model_directory(model_dir: &Path, artifacts: &[ArtifactSpec]) -> Result<()> {\n        for artifact in artifacts {\n            let path = model_dir.join(artifact.filename);\n            let metadata = std::fs::metadata(&path)\n                .map_err(|error| anyhow!(\"Failed to read {} metadata: {}\", artifact.filename, error))?;\n            if metadata.len() != artifact.exact_bytes {\n                return Err(anyhow!(\n                    \"{} has {} bytes, expected exactly {} bytes\",\n                    artifact.filename,\n                    metadata.len(),\n                    artifact.exact_bytes\n                ));\n            }\n        }\n\n        Ok(())\n    }\n\n    /// Load a Parakeet model\n    pub async fn load_model(&self, model_name: &str) -> Result<()> {\n        let model_info = {\n            let models = self.available_models.read().await;\n            models","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L399-L435","documentation":"Thrown by validate_model_directory when std::fs::metadata fails on an expected Parakeet model artifact inside the model directory. Typically the file is missing (the usual NotFound case), but it also covers permission and IO errors; the artifact filename and underlying io::Error are embedded in the message.","triggerScenarios":"Parakeet model load or post-download verification calls validate_model_directory, and an artifact listed in ArtifactSpec (e.g. encoder/decoder .onnx or vocab file) is absent from model_dir or unreadable — e.g. an interrupted download deleted/corrupted the directory, or the model_dir path points to the wrong folder.","commonSituations":"User manually deleted or moved files from the models directory (~/Library/Application Support/Meetily/models or %APPDATA%\\Meetily\\models); download partially completed without validation; antivirus quarantined the file; wrong model_dir passed to the loader; permissions changed after an app update.","solutions":["Check that the file named in the error exists at model_dir/<filename> and is readable","Re-download the model via the app so all spec artifacts are restored","Verify the configured model directory path matches the install location for your platform","Check file/folder permissions and antivirus quarantine logs","Run the download/verify step with RUST_LOG=debug to see which artifact failed first"],"exampleFix":"// before: pointing loader at a non-existent directory\nlet model_path = PathBuf::from(\"models/parakeet\");\n// after: resolve via Tauri path API and ensure directory exists\nlet model_path = app.path().app_data_dir()?.join(\"models\").join(model_name);\nstd::fs::create_dir_all(&model_path)?;","handlingStrategy":"validation","validationCode":"fn all_artifacts_present(model_dir: &Path, artifacts: &[(&str, u64)]) -> bool { artifacts.iter().all(|(f, _)| model_dir.join(f).metadata().map(|m| m.is_file()).unwrap_or(false)) }","typeGuard":"fn artifact_readable(model_dir: &Path, filename: &str) -> bool { std::fs::metadata(model_dir.join(filename)).map(|m| m.is_file()).unwrap_or(false) }","tryCatchPattern":"match load_parakeet_model(name) { Err(e) if e.to_string().contains(\"Failed to read\") && e.to_string().contains(\"metadata\") => { re_download_model(name).await?; load_parakeet_model(name).await }, other => other }","preventionTips":["Never manually delete or edit files inside the models directory","Re-download models through the app after failed/interrupted downloads","Verify the model directory path matches the platform default (app data dir/models)","Exclude the models directory from antivirus real-time scanning"],"tags":["filesystem","model-validation","io","parakeet"],"backgroundTag":"file-read-failed","analyzedSha":"a2cb62e827da7ef59f65064c97233efb2313878e","analyzedAt":"2026-09-12T11:12:14.152Z","contentChangedAt":"2026-09-12T11:12:14.152Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}