{"record":{"id":"f38551693bc00369","repo":"tonhowtf/omniget","slug":"no-stderr-from-gallery-dl","errorCode":null,"errorMessage":"No stderr from gallery-dl","messagePattern":"No stderr from gallery-dl","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/gallerydl/mod.rs","lineNumber":247,"sourceCode":"                cmd.arg(\"--cookies\").arg(&cookie_file);\n            }\n        }\n\n        cmd.arg(\"--\").arg(&url);\n\n        cmd.kill_on_drop(true);\n        let mut child = cmd\n            .spawn()\n            .map_err(|e| anyhow!(\"Failed to start gallery-dl: {}\", e))?;\n\n        let stdout = child\n            .stdout\n            .take()\n            .ok_or_else(|| anyhow!(\"No stdout from gallery-dl\"))?;\n        let stderr_pipe = child\n            .stderr\n            .take()\n            .ok_or_else(|| anyhow!(\"No stderr from gallery-dl\"))?;\n\n        let started_at = SystemTime::now();\n\n        let progress_tx = progress.clone();\n        let reader_task = tokio::spawn(async move {\n            let mut lines = BufReader::new(stdout).lines();\n            let mut count: u64 = 0;\n            let mut last_emit = std::time::Instant::now();\n            while let Ok(Some(line)) = lines.next_line().await {\n                let trimmed = line.trim();\n                if trimmed.is_empty() || trimmed.starts_with('#') || trimmed.starts_with('[') {\n                    continue;\n                }\n                count += 1;\n                if last_emit.elapsed() >= std::time::Duration::from_millis(250) {\n                    let pct = ((count as f64 / (count as f64 + 4.0)) * 100.0).min(95.0);\n                    let _ = progress_tx.send(ProgressUpdate::percent(pct)).await;\n                    last_emit = std::time::Instant::now();","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/gallerydl/mod.rs#L229-L265","documentation":"A defensive guard in download(): child.stderr was None when taken, so the process has no piped stderr handle and error diagnostics from gallery-dl can never be captured. Like the stdout case, it indicates stdio was not set to piped before spawn — an internal setup error rather than a download failure.","triggerScenarios":"Thrown at src-tauri/src/platforms/gallerydl/mod.rs:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure stderr is piped when building the gallery-dl command","Update the app so stdio configuration is applied before spawn","Report the issue if it reproduces with a current version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}