{"record":{"id":"985af850a79ba10c","repo":"tonhowtf/omniget","slug":"yt-dlp-not-found-in-flatpak-sandbox","errorCode":null,"errorMessage":"yt-dlp not found in Flatpak sandbox","messagePattern":"yt-dlp not found in Flatpak sandbox","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":1757,"sourceCode":"        std::thread::Builder::new()\n            .name(\"js-runtime-check\".into())\n            .spawn(|| {\n                let rt = tokio::runtime::Builder::new_current_thread()\n                    .enable_all()\n                    .build()\n                    .expect(\"js-runtime runtime\");\n                rt.block_on(async {\n                    crate::core::dependencies::ensure_js_runtime().await;\n                });\n            })\n            .ok();\n        tracing::debug!(\"[perf] ensure_ytdlp took {:?}\", _timer_start.elapsed());\n        return Ok(path);\n    }\n\n    if crate::core::dependencies::is_flatpak() {\n        tracing::debug!(\"[perf] ensure_ytdlp took {:?}\", _timer_start.elapsed());\n        return Err(anyhow!(\"yt-dlp not found in Flatpak sandbox\"));\n    }\n\n    let path = download_ytdlp_binary().await?;\n    reset_ytdlp_cache();\n    std::thread::Builder::new()\n        .name(\"js-runtime-check\".into())\n        .spawn(|| {\n            let rt = tokio::runtime::Builder::new_current_thread()\n                .enable_all()\n                .build()\n                .expect(\"js-runtime runtime\");\n            rt.block_on(async {\n                crate::core::dependencies::ensure_js_runtime().await;\n            });\n        })\n        .ok();\n    tracing::debug!(\"[perf] ensure_ytdlp took {:?}\", _timer_start.elapsed());\n    Ok(path)","sourceCodeStart":1739,"sourceCodeEnd":1775,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L1739-L1775","documentation":"`ensure_ytdlp` looks for an existing yt-dlp binary and, if absent, downloads one. Under Flatpak, downloading to the managed path is not possible (sandbox restrictions), so when the binary is not found inside the sandbox the function errors immediately with this message instead of attempting a download. It tells the user yt-dlp must come from the Flatpak runtime or host system.","triggerScenarios":"Running inside a Flatpak sandbox where `crate::core::dependencies::is_flatpak()` is true and no usable yt-dlp binary was found on PATH or in the managed location.","commonSituations":"Flatpak install of the app without the `yt-dlp` runtime extension; host yt-dlp not visible in the sandbox due to missing filesystem/PATH permissions.","solutions":["Install the yt-dlp Flatpak extension or ensure the runtime provides yt-dlp.","Grant the sandbox access to a host yt-dlp binary (filesystem override for its directory) and make it visible on PATH.","Install/update yt-dlp on the host and ensure the Flatpak can see it (e.g. `flatpak override --filesystem=...`).","Update the Flatpak app itself so its bundled/runtime yt-dlp version is current."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let yt_dlp_available = which::which(\"yt-dlp\").is_ok();\nif is_flatpak() && !yt_dlp_available {\n    // prompt user to install the yt-dlp Flatpak extension before proceeding\n}","typeGuard":"fn flatpak_ytdlp_ready() -> bool {\n    crate::core::dependencies::is_flatpak() && which::which(\"yt-dlp\").is_ok()\n}","tryCatchPattern":"match ensure_ytdlp().await {\n    Err(e) if e.to_string().contains(\"Flatpak sandbox\") => {\n        // show install-the-extension guidance to the user\n    }\n    other => other?,\n}","preventionTips":["Install the yt-dlp Flatpak extension at install time.","Detect Flatpak early in app startup and surface dependency requirements.","Document host yt-dlp visibility requirements (PATH/filesystem overrides)."],"tags":["flatpak","sandbox","yt-dlp","missing-binary","linux"],"backgroundTag":"missing-dependency","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"}