tonhowtf/omniget · error · anyhow::Error
gallery-dl nao tem binario para este sistema
Error message
gallery-dl nao tem binario para este sistema
What it means
Raised in download_gallerydl on any target OS other than Windows, Linux, or macOS. gallery-dl standalone executables are only published for those three platforms in the gdl-org/builds repo, so on other systems the function returns this error instead of attempting a download.
Solutions
- Run on Windows, Linux, or macOS, where prebuilt gallery-dl binaries exist
- On unsupported platforms install gallery-dl system-wide (pip install gallery-dl) and make it available on PATH instead of using the managed binary
- Contribute a fallback branch that downloads the Python package or builds from source for other targets
Example fix
// before
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
return Err(anyhow!("gallery-dl nao tem binario para este sistema"));
// after
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
{
// fall back to a system gallery-dl on PATH
if which::which("gallery-dl").is_ok() {
return Ok(which::which("gallery-dl").unwrap());
}
return Err(anyhow!("gallery-dl nao tem binario para este sistema"));
} Defensive patterns
Strategy: fallback
Validate before calling
// compile-time / runtime platform check before bootstrapping gallery-dl
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
fn gallerydl_supported() -> bool { false }
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
fn gallerydl_supported() -> bool { true } Type guard
fn is_supported_platform() -> bool {
matches!(
std::env::consts::OS.as_str(),
"windows" | "linux" | "macos"
)
} Try / catch
if !is_supported_platform() {
// use system gallery-dl instead of the managed binary
return which::which("gallery-dl")
.map_err(|_| anyhow!("gallery-dl nao tem binario para este sistema"));
} Prevention
- Gate gallery-dl bootstrap behind a supported-platform check at startup
- Install gallery-dl via pip/cargo as a system fallback on exotic platforms
- Document supported platforms (Windows/Linux/macOS) in setup docs
- Use cfg attributes to exclude the managed-download path from unsupported builds
When it happens
Trigger: Compiling/running Omniget's gallery-dl bootstrap on a cfg target that is not windows/linux/macos (e.g. FreeBSD, Android, wasm) — the #[cfg(not(any(...)))] branch is compiled in and returns immediately.
Common situations: Building for FreeBSD or OpenBSD; cross-compiling to an embedded/mobile target; running the core in a wasm/unsupported environment.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Download cancelled
- FFmpeg installed but failed to execute
- FFmpeg installed but failed to execute
- a Microsoft não publica ONNX Runtime pronto para este…
- não existe build oficial do ONNX Runtime para este sistema…
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/e065c67e60c13927.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/dependencies.rs:823
None
}
async fn download_gallerydl() -> anyhow::Result<PathBuf> {
let bin_dir = managed_bin_dir().ok_or_else(|| anyhow!("Could not determine data directory"))?;
std::fs::create_dir_all(&bin_dir)?;
let target = bin_dir.join(bin_name("gallery-dl"));
// Os executaveis standalone vivem no repo gdl-org/builds (Windows, Linux
// e macOS); o release do mikf/gallery-dl nao publica mais assets.
#[cfg(target_os = "windows")]
let url = "https://github.com/gdl-org/builds/releases/latest/download/gallery-dl_windows.exe";
#[cfg(target_os = "linux")]
let url = "https://github.com/gdl-org/builds/releases/latest/download/gallery-dl_linux";
#[cfg(target_os = "macos")]
let url = "https://github.com/gdl-org/builds/releases/latest/download/gallery-dl_macos";
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
return Err(anyhow!("gallery-dl nao tem binario para este sistema"));
let client = crate::core::http_client::apply_global_proxy(reqwest::Client::builder())
.timeout(std::time::Duration::from_secs(180))
.build()?;
let response = client.get(url).send().await?;
if !response.status().is_success() {
return Err(anyhow!(
"Failed to download gallery-dl: HTTP {}",
response.status()
));
}
let bytes = response.bytes().await?;
let data = bytes.to_vec();
let target_clone = target.clone();
tokio::task::spawn_blocking(move || -> anyhow::Result<()> {
std::fs::write(&target_clone, &data)?;View on GitHub (pinned to 8600b91f42)