{"record":{"id":"df74a61df158e2f1","repo":"Zackriya-Solutions/meetily","slug":"failed-to-write","errorCode":null,"errorMessage":"Failed to write {}: {}","messagePattern":"Failed to write (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":1056,"sourceCode":"                        anyhow!(\"Failed to preserve {} after overlong response: {}\", artifact.filename, error)\n                    })?;\n                    return Err(anyhow!(\n                        \"{} response exceeds its exact {} byte size\",\n                        artifact.filename,\n                        artifact.exact_bytes\n                    ));\n                }\n                let next_confirmed_bytes = confirmed_bytes\n                    .checked_add(chunk_bytes)\n                    .ok_or_else(|| anyhow!(\"Progress overflow while downloading {}\", artifact.filename))?;\n                if next_confirmed_bytes > total_bytes {\n                    return Err(anyhow!(\"Download progress exceeds the catalog total\"));\n                }\n\n                writer\n                    .write_all(&chunk)\n                    .await\n                    .map_err(|error| anyhow!(\"Failed to write {}: {}\", artifact.filename, error))?;\n                artifact_bytes = next_artifact_bytes;\n                confirmed_bytes = next_confirmed_bytes;\n                streamed_bytes = streamed_bytes\n                    .checked_add(chunk_bytes)\n                    .ok_or_else(|| anyhow!(\"Streamed byte count overflow\"))?;\n                bytes_since_report = bytes_since_report\n                    .checked_add(chunk_bytes)\n                    .ok_or_else(|| anyhow!(\"Progress byte count overflow\"))?;\n\n                let progress = Self::in_flight_progress(confirmed_bytes, total_bytes, 0.0);\n                let elapsed = last_report.elapsed();\n                if progress.percent > last_percent\n                    || elapsed >= Duration::from_millis(500)\n                    || artifact_bytes == artifact.exact_bytes\n                {\n                    let speed_mbps = if elapsed.as_secs_f64() > 0.0 {\n                        bytes_since_report as f64 / (1024.0 * 1024.0) / elapsed.as_secs_f64()\n                    } else {","sourceCodeStart":1038,"sourceCodeEnd":1074,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L1038-L1074","documentation":"The download stream writes each received chunk to the destination file with `writer.write_all(&chunk)` on a tokio async file. If the OS or disk refuses the write, the engine maps the io::Error into `Failed to write <filename>: <io error>` and aborts the download. It is a filesystem-level failure, not a network failure.","triggerScenarios":"`writer.write_all(&chunk).await` returns Err during the artifact chunk loop — the mapped anyhow error embeds the underlying OS error (ENOSPC, EACCES, EIO, etc.).","commonSituations":"Disk full while downloading a multi-hundred-MB model; no write permission to the models directory (~/Library/Application Support/Meetily/models or %APPDATA%\\Meetily\\models); antivirus/file-lock holding the partial file on Windows; disk hardware errors.","solutions":["Free disk space — Parakeet artifacts are large, and ENOSPC is the most common cause.","Check write permissions on the models directory and, if needed, `chmod`/take ownership or run the app under a user account with access.","Close programs locking the partial file (antivirus quarantine/scan, backup tools, another app instance) and delete the partial file, then retry.","Check disk health (S.M.A.R.T.) / dmesg for I/O errors if EIO appears in the message.","Retry the download after fixing the underlying filesystem issue."],"exampleFix":"// before: default models dir not writable in containerized/managed env\n// after: ensure the directory exists and is writable before download\nlet dir = models_dir();\nfs::create_dir_all(&dir).await?;\n// or on the caller side (shell): chmod u+w \"~/Library/Application Support/Meetily/models\"","handlingStrategy":"try-catch","validationCode":"// Pre-flight disk space and writability check before downloading\nlet free = fs2::free_space(&models_dir)?;\nif free < artifact.exact_bytes * 2 {\n    return Err(format!(\"Need {} bytes free, only {} available\", artifact.exact_bytes * 2, free));\n}\nlet probe = models_dir.join(\".write_probe\");\ntokio::fs::write(&probe, b\"ok\").await?;\ntokio::fs::remove_file(&probe).await?;","typeGuard":null,"tryCatchPattern":"match download_result {\n    Err(e) if e.to_string().contains(\"Failed to write\") => {\n        // inspect the embedded io::Error kind: StorageFull => free space,\n        // PermissionDenied => fix perms, else check disk health\n        eprintln!(\"Download aborted by filesystem error: {e}\");\n        cleanup_partial_file();\n    }\n    Err(e) => return Err(e),\n    Ok(()) => {}\n}","preventionTips":["Check free disk space before large model downloads.","Ensure the models directory exists and is writable at app startup.","Exclude the models directory from antivirus real-time scanning.","Download to a local disk, not cloud-synced or network folders."],"tags":["io","filesystem","download","parakeet","disk-space"],"backgroundTag":"file-write-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"}