{"record":{"id":"01893bff6ef10c06","repo":"tonhowtf/omniget","slug":"failed-to-access-the-page-check-the-link-and-your-connection","errorCode":null,"errorMessage":"Failed to access the page. Check the link and your connection.","messagePattern":"Failed to access the page\\. Check the link and your connection\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":4489,"sourceCode":"        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| {\n            let t = l.trim().to_lowercase();\n            t.starts_with(\"error:\") || t.starts_with(\"error \")\n        })\n        .unwrap_or(\"\")\n        .trim();\n\n    let msg = if !last_error_line.is_empty() {\n        last_error_line\n            .strip_prefix(\"ERROR: \")","sourceCodeStart":4471,"sourceCodeEnd":4507,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L4471-L4507","documentation":"Raised when yt-dlp's stderr contains both 'unable to download' and 'webpage', meaning yt-dlp could not fetch the page HTML itself. The wrapper reframes it as a page-access problem related to the link or the network.","triggerScenarios":"yt-dlp fails its initial HTTP request for the watch/page URL: HTTP errors, connection resets, bot checks/Cloudflare challenges, or geo/ISP blocks on the page itself.","commonSituations":"Sites behind Cloudflare bot protection, links behind paywalls requiring cookies, temporary site outages, or IP-level blocks after heavy scraping.","solutions":["Open the URL in a browser to confirm the page loads and the link is correct","Pass cookies with --cookies-from-browser or --cookies for auth-walled pages","Add --user-agent or proxy options if the site blocks the default client","Retry after a delay if the site is temporarily down or rate-limiting"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// probe the page with a plain HTTP request first\nlet resp = reqwest::get(url).await?;\nif !resp.status().is_success() {\n    eprintln!(\"Page not reachable ({}); fix link or use proxy/cookies\", resp.status());\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"Failed to access the page\") => {\n        retry_with_backoff(|| download(), 2).await\n    }\n    other => other,\n}","preventionTips":["Retry transient page-fetch failures with backoff","Configure cookies/user-agent for bot-protected sites","Support a proxy option for blocked networks","Detect Cloudflare challenges and warn the user"],"tags":["network","http","yt-dlp","page-access"],"backgroundTag":"http-request-failed","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"}