tonhowtf/omniget · error

download failed without specific error

Error message

download failed without specific error

What it means

download retries the yt-dlp/ffmpeg pipeline across fallback strategies, keeping the last error in last_err. If the loop exits with last_err == None — meaning no attempt was even recorded (strategy list empty or unreachable state) — this placeholder error is returned, since there is no underlying failure message to surface.

Solutions

  1. Inspect the download options that reach this loop and confirm at least one strategy is applicable.
  2. Add logging before the loop to record how many strategies were attempted; zero attempts points to an internal invariant bug — file an issue upstream.
  3. If it only appears after upgrading the library, check the changelog for changes to the strategy/fallback list and pin the previous version.

Example fix

// before
Err(last_err.unwrap_or_else(|| anyhow!("download failed without specific error")))
// after
Err(last_err.unwrap_or_else(|| {
    anyhow!("download failed without specific error (0 strategies attempted — check opts/strategy selection)")
}))
Defensive patterns

Strategy: try-catch

Try / catch

match platform.download(opts).await {
    Err(e) if e.to_string().contains("without specific error") => {
        eprintln!("internal: no download strategy was attempted; dump opts and report upstream");
        Err(anyhow!("download aborted before any attempt: {opts:?}"))
    }
    other => other,
}

Prevention

When it happens

Trigger: The retry/fallback loop in download terminates with Err(last_err.unwrap_or_else(...)) while last_err is None: no iteration produced an error, e.g. the fallback strategy list was empty or the loop body never executed.

Common situations: A configuration path that filters out every download strategy (e.g. HLS-only handling removed); internal refactor leaving the loop with zero attempts; caller passing options that disable all candidate strategies.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/965ced214769445d. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/platforms/generic_ytdlp.rs:521

                        || msg.contains("no video formats")
                        || msg.contains("no suitable format");
                    let has_more = idx + 1 < format_fallbacks.len();
                    if is_format_error && has_more && !opts.cancel_token.is_cancelled() {
                        tracing::warn!(
                            "[generic_ytdlp] format fallback {}/{} after error: {}",
                            idx + 1,
                            format_fallbacks.len() - 1,
                            e
                        );
                        last_err = Some(e);
                        continue;
                    }
                    return Err(e);
                }
            }
        }

        Err(last_err.unwrap_or_else(|| anyhow!("download failed without specific error")))
    }
}

/// Build the Referer for a raw HLS download, in priority order:
/// explicit referer from options → the page URL the stream was found on →
/// a known per-platform referer → the m3u8 URL's own origin.
/// Returns an empty string only for unparseable URLs, in which case the
/// downloader sends no Referer header at all.
fn build_hls_referer(
    explicit_referer: Option<&str>,
    page_url: Option<&str>,
    m3u8_url: &str,
) -> String {
    if let Some(r) = explicit_referer.map(str::trim).filter(|r| !r.is_empty()) {
        return r.to_string();
    }
    if let Some(p) = page_url.map(str::trim).filter(|p| !p.is_empty()) {
        return p.to_string();

View on GitHub (pinned to 8600b91f42)