{"record":{"id":"6333d3e1a54d56ca","repo":"tonhowtf/omniget","slug":"timeout-fetching-video-info-s","errorCode":null,"errorMessage":"Timeout fetching video info ({}s)","messagePattern":"Timeout fetching video info \\((.+?)s\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":2333,"sourceCode":"            .stdout(Stdio::piped())\n            .stderr(Stdio::piped())\n            .kill_on_drop(true)\n            .spawn()\n            .map_err(|e| anyhow!(\"Failed to run yt-dlp: {}\", e))?;\n        tracing::debug!(\n            \"[perf] get_video_info: yt-dlp process spawned at {:?} (attempt {})\",\n            _timer_start.elapsed(),\n            attempt + 1\n        );\n\n        let result = tokio::time::timeout(\n            std::time::Duration::from_secs(VIDEO_INFO_PROCESS_TIMEOUT_SECS),\n            child.wait_with_output(),\n        )\n        .await\n        .map_err(|_| {\n            tracing::debug!(\"[perf] get_video_info took {:?}\", _timer_start.elapsed());\n            anyhow!(\n                \"Timeout fetching video info ({}s)\",\n                VIDEO_INFO_PROCESS_TIMEOUT_SECS\n            )\n        })?\n        .map_err(|e| {\n            tracing::debug!(\"[perf] get_video_info took {:?}\", _timer_start.elapsed());\n            anyhow!(\"Failed to run yt-dlp: {}\", e)\n        })?;\n\n        tracing::debug!(\n            \"[perf] get_video_info: yt-dlp process exited at {:?} (attempt {})\",\n            _timer_start.elapsed(),\n            attempt + 1\n        );\n\n        if result.status.success() {\n            let json: serde_json::Value = serde_json::from_slice(&result.stdout)\n                .map_err(|e| anyhow!(\"yt-dlp returned invalid JSON: {}\", e))?;","sourceCodeStart":2315,"sourceCodeEnd":2351,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L2315-L2351","documentation":"get_video_info wraps child.wait_with_output() in tokio::time::timeout(VIDEO_INFO_PROCESS_TIMEOUT_SECS); when the timer elapses before yt-dlp finishes, the timeout future is dropped (kill_on_drop kills the process) and this error is returned. It means yt-dlp did not produce its JSON within the configured budget.","triggerScenarios":"Calling get_video_info on a URL where yt-dlp takes longer than VIDEO_INFO_PROCESS_TIMEOUT_SECS: very slow extractors, throttled networks, sites requiring slow JS challenges, or a hung yt-dlp process.","commonSituations":"Slow/blocked network to the video host; YouTube throttling or bot checks; proxy misconfiguration making upstream unreachable; timeout constant set too low for poor connectivity.","solutions":["Retry the fetch (the function already has an attempt loop); transient slowness often resolves","Increase VIDEO_INFO_PROCESS_TIMEOUT_SECS if your deployment regularly has high latency","Check network/proxy configuration and that yt-dlp is up to date (extractor breakage causes hangs)","Surface the timeout to the user with guidance to try again later or use a smaller playlist"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-check connectivity and that a probe run completes quickly\nlet probe = tokio::time::timeout(\n    std::time::Duration::from_secs(10),\n    ytdlp_command(ytdlp).arg(\"--version\").output(),\n).await;\nif probe.is_err() { return Err(\"yt-dlp is unresponsive; network or install problem\".into()); }","typeGuard":null,"tryCatchPattern":"match timeout(dur, get_video_info(url)).await {\n    Err(_) => { /* elapsed: surface retry UI, optionally bump VIDEO_INFO_PROCESS_TIMEOUT_SECS */ }\n    Ok(Err(e)) if e.to_string().contains(\"Timeout fetching video info\") => retry_with_backoff(url),\n    Ok(res) => res,\n}","preventionTips":["Keep VIDEO_INFO_PROCESS_TIMEOUT_SECS generous for slow networks","Implement user-visible retry with backoff for transient slowness","Keep yt-dlp updated so extractor hangs from site changes are minimized","Verify proxy/VPN settings; silent proxy failure often manifests as timeouts"],"tags":["rust","ytdlp","timeout","network"],"backgroundTag":"request-timeout","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}