tonhowtf/omniget · warning
yt-dlp is provided by the Flatpak runtime and cannot be…
Error message
yt-dlp is provided by the Flatpak runtime and cannot be updated from inside the app
What it means
`update_ytdlp` refuses to self-update when running inside a Flatpak sandbox. In Flatpak, yt-dlp comes from the runtime/extension, and replacing it from within the app would violate sandbox packaging, so the function returns this explanatory error and asks the user to update via Flatpak instead.
Solutions
- Update yt-dlp through the Flatpak runtime/extension (e.g. `flatpak update`).
- Update the app itself via `flatpak update <app-id>` so its yt-dlp dependency is refreshed.
- Hide or disable the in-app update button when running under Flatpak.
- If self-managing yt-dlp is required, install the non-Flatpak build of the app.
Example fix
// before
if is_flatpak() { update_ytdlp().await?; }
// after
if is_flatpak() { eprintln!("update yt-dlp via 'flatpak update'"); } else { update_ytdlp().await?; } Defensive patterns
Strategy: validation
Validate before calling
if crate::core::dependencies::is_flatpak() {
// skip in-app update; direct user to 'flatpak update'
} else {
update_ytdlp().await?;
} Type guard
fn can_self_update_ytdlp() -> bool {
!crate::core::dependencies::is_flatpak()
} Try / catch
match update_ytdlp().await {
Err(e) if e.to_string().contains("Flatpak runtime") => {
// inform user to run 'flatpak update' instead
}
other => other?,
} Prevention
- Gate the update UI on is_flatpak().
- Teach users that Flatpak installs are updated via flatpak.
- Check for updates at the Flatpak level in app startup.
When it happens
Trigger: Calling `update_ytdlp()` when `is_flatpak()` returns true, i.e. the app was installed as a Flatpak and the user (or UI) triggered the in-app update action.
Common situations: User clicks "Update yt-dlp" in a Flatpak install; an auto-update routine runs in a Flatpak environment; documentation mismatch where users expect in-app updates to work.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- yt-dlp not found in Flatpak sandbox
- FFmpeg is provided by the Flatpak runtime and cannot be…
- FFmpeg not found in Flatpak sandbox
- dentro do Flatpak o Spicetify nao consegue alterar o…
- yt-dlp not found in PATH or app data dir
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/cecf3d2d06cb6448.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/ytdlp.rs:1780
std::thread::Builder::new()
.name("js-runtime-check".into())
.spawn(|| {
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.expect("js-runtime runtime");
rt.block_on(async {
crate::core::dependencies::ensure_js_runtime().await;
});
})
.ok();
tracing::debug!("[perf] ensure_ytdlp took {:?}", _timer_start.elapsed());
Ok(path)
}
pub async fn update_ytdlp() -> anyhow::Result<PathBuf> {
if crate::core::dependencies::is_flatpak() {
return Err(anyhow!(
"yt-dlp is provided by the Flatpak runtime and cannot be updated from inside the app"
));
}
let path = download_ytdlp_binary().await?;
reset_ytdlp_cache();
Ok(path)
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum YtdlpChannel {
Stable,
Nightly,
}
fn ytdlp_channel() -> YtdlpChannel {
match std::env::var("OMNIGET_YTDLP_CHANNEL") {
Ok(v) if v.trim().eq_ignore_ascii_case("nightly") => YtdlpChannel::Nightly,
_ => YtdlpChannel::Stable,View on GitHub (pinned to 8600b91f42)