{"record":{"id":"e295643fb9db5169","repo":"tonhowtf/omniget","slug":"connection-timed-out-check-your-internet-and-try-again","errorCode":null,"errorMessage":"Connection timed out. Check your internet and try again.","messagePattern":"Connection timed out\\. Check your internet and try again\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":4480,"sourceCode":"    if lower.contains(\"requested format\") && lower.contains(\"not available\") {\n        return anyhow!(\n            \"Requested format is not available. The download will retry with a compatible format.\"\n        );\n    }\n    if lower.contains(\"video unavailable\") || lower.contains(\"not available\") {\n        return anyhow!(\"Video unavailable or removed.\");\n    }\n    if lower.contains(\"private video\") {\n        return anyhow!(\"This video is private.\");\n    }\n    if lower.contains(\"copyright\") {\n        return anyhow!(\"Video blocked due to copyright.\");\n    }\n    if lower.contains(\"geo\") && lower.contains(\"block\") {\n        return anyhow!(\"Video restricted in your region.\");\n    }\n    if lower.contains(\"timed out\") || lower.contains(\"timeout\") {\n        return anyhow!(\"Connection timed out. Check your internet and try again.\");\n    }\n    if lower.contains(\"ffmpeg\") && (lower.contains(\"not found\") || lower.contains(\"no such file\")) {\n        return anyhow!(\"FFmpeg not found. Install FFmpeg to download this format.\");\n    }\n    if lower.contains(\"unsupported url\") || lower.contains(\"no suitable infojson\") {\n        return anyhow!(\"Unsupported URL. Check that the link is correct.\");\n    }\n    if lower.contains(\"unable to download\") && lower.contains(\"webpage\") {\n        return anyhow!(\"Failed to access the page. Check the link and your connection.\");\n    }\n    if lower.contains(\"is not a valid url\") || lower.contains(\"no video formats\") {\n        return anyhow!(\"No video formats found for this link.\");\n    }\n\n    let last_error_line = stderr\n        .lines()\n        .rev()\n        .find(|l| {","sourceCodeStart":4462,"sourceCodeEnd":4498,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L4462-L4498","documentation":"This error is produced by yt-dlp error classification in omniget-core. When yt-dlp's stderr contains 'timed out' or 'timeout', the wrapper converts it into a user-friendly anyhow error indicating a network timeout. It signals the yt-dlp subprocess could not reach the media server within the allowed time.","triggerScenarios":"Running a yt-dlp download/info extraction whose stderr matches 'timed out' or 'timeout' (case-insensitive) during classify; slow or unstable network, unreachable CDN, or proxy/firewall stalls during media fetch.","commonSituations":"Users behind corporate proxies or VPNs, weak mobile connections, throttled or blocked hosts (e.g. some CDNs in certain regions), or DNS resolution delays causing yt-dlp HTTP timeouts.","solutions":["Check basic internet connectivity and retry the download","Disable VPN/proxy or switch networks, then retry","Increase the socket timeout with yt-dlp's --socket-timeout flag","Retry later if the target host is rate-limiting or temporarily down"],"exampleFix":"// before\n// raw yt-dlp stderr surfaces a cryptic timeout trace\n// after\nif lower.contains(\"timed out\") || lower.contains(\"timeout\") {\n    return anyhow!(\"Connection timed out. Check your internet and try again.\");\n}","handlingStrategy":"retry","validationCode":"// quick connectivity probe before invoking yt-dlp\nif reqwest::get(\"https://www.google.com/generate_204\").await.is_err() {\n    eprintln!(\"No network access; aborting download\");\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"timed out\") => {\n        tokio::time::sleep(Duration::from_secs(5)).await;\n        retry_with_backoff(|| download(), 3).await\n    }\n    other => other,\n}","preventionTips":["Probe network reachability before starting large downloads","Set an explicit --socket-timeout for yt-dlp","Surface retry UI to the user instead of a dead end","Warn when a VPN/proxy is active"],"tags":["network","timeout","yt-dlp","download"],"backgroundTag":"request-timeout","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}