{"record":{"id":"387dd9c2ab92364e","repo":"Zackriya-Solutions/meetily","slug":"failed-to-open-for-resume","errorCode":null,"errorMessage":"Failed to open {} for resume: {}","messagePattern":"Failed to open (.+?) for resume: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":983,"sourceCode":"                    status => {\n                        return Err(anyhow!(\n                            \"Download failed for {} with status {}\",\n                            artifact.filename,\n                            status\n                        ));\n                    }\n                },\n            };\n\n            if active_download.cancellation.is_cancelled() {\n                return Err(DownloadCancelled.into());\n            }\n            let file = if append {\n                fs::OpenOptions::new()\n                    .append(true)\n                    .open(&file_path)\n                    .await\n                    .map_err(|error| anyhow!(\"Failed to open {} for resume: {}\", artifact.filename, error))?\n            } else {\n                fs::OpenOptions::new()\n                    .create(true)\n                    .truncate(true)\n                    .write(true)\n                    .open(&file_path)\n                    .await\n                    .map_err(|error| anyhow!(\"Failed to replace {}: {}\", artifact.filename, error))?\n            };\n            let mut writer = BufWriter::with_capacity(8 * 1024 * 1024, file);\n            use futures_util::StreamExt;\n            let mut stream = response.bytes_stream();\n\n            loop {\n                let next_chunk = tokio::select! {\n                    biased;\n                    _ = active_download.cancellation.cancelled() => {\n                        writer.flush().await.map_err(|error| {","sourceCodeStart":965,"sourceCodeEnd":1001,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L965-L1001","documentation":"When resuming, the engine opens the existing partial file in append mode to continue writing the remainder. If opening fails (permissions, file locked, path vanished), the artifact download aborts with this error before any bytes are streamed.","triggerScenarios":"fs::OpenOptions::new().append(true).open(file_path) fails after the server validated the resume — e.g. the partial file's permissions changed, another process holds an exclusive lock, the file was deleted between metadata() and open(), or the volume went read-only.","commonSituations":"Antivirus/backup/indexing tools (or another Meetily instance) holding the partial file open on Windows; permissions changed mid-download; disk full or volume remounted read-only; file deleted by a cleanup script between the size check and the open.","solutions":["Close other processes holding the file (antivirus scans, backup tools, a second app instance) and retry.","Fix permissions on the partial file / model directory so the app can write.","Delete the partial file and re-download from scratch (bypasses the append path entirely).","Check free disk space and that the models volume is not read-only; remount or move the models directory."],"exampleFix":"// before: file locked by another process\nFailed to open model.int8.onnx for resume: Os { code: 32, kind: Other, message: \"The process cannot access the file\" }\n// after: remove locked partial and restart\nrm \"~/Library/Application Support/Meetily/models/parakeet/model.int8.onnx\"  # then retry download","handlingStrategy":"try-catch","validationCode":"// ensure the partial file is writable and not locked before resuming\nlet f = tokio::fs::OpenOptions::new().append(true).open(&partial_path).await;\nif let Err(e) = f {\n    eprintln!(\"partial not writable: {} — deleting and restarting\", e);\n    let _ = tokio::fs::remove_file(&partial_path).await;\n}","typeGuard":null,"tryCatchPattern":"match download_result {\n    Err(e) if e.to_string().contains(\"for resume\") => {\n        // locked or unwritable partial: delete it and re-download fresh\n        let _ = tokio::fs::remove_file(partial_path).await;\n        retry_download().await\n    }\n    other => other,\n}","preventionTips":["Ensure only one app instance downloads into a given model dir.","Exclude the models directory from AV/backup/indexer file locks.","Keep sufficient free disk space on the models volume.","On failure, delete the partial file — a fresh download avoids the append path."],"tags":["filesystem","io","resume","file-lock"],"backgroundTag":"file-open-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"}