tonhowtf/omniget · error

No resolution available

Error message

No resolution available

What it means

download_video_with_fallback initializes last_err with this sentinel before iterating resolution variants (produced by get_resolution_variants). If the variants list is empty, or every variant download fails, the sentinel (or the last variant error) is returned — meaning no usable video resolution URL was found.

Solutions

  1. Print the variants list derived from the video URL to confirm get_resolution_variants found candidates.
  2. Verify the video URL is still valid (Reddit DASH URLs can expire); re-fetch media info and retry.
  3. Check network access to v.redd.it / reddit media CDN hosts and any proxy/firewall interference.
  4. Inspect the wrapped last_err chain for the underlying per-variant failure (HTTP status, timeout).

Example fix

// before
let mut last_err = anyhow!("No resolution available");
// after: include the URL and variant count for diagnosability
let variants = Self::get_resolution_variants(video_url);
if variants.is_empty() {
    return Err(anyhow!("No resolution variants derived from {}", video_url));
}
let mut last_err = anyhow!("No resolution available for {} ({} variants)", video_url, variants.len());
Defensive patterns

Strategy: fallback

Validate before calling

// ensure the URL has a DASH/video shape before download
if !video_url.contains("DASH") && !video_url.contains("v.redd.it") {
    eprintln!("Suspicious video URL, few/no variants expected: {}", video_url);
}

Try / catch

match native_download(opts).await {
    Err(e) if e.to_string().contains("No resolution available") => {
        eprintln!("All variants failed: {}", e.source().map(|s| s.to_string()).unwrap_or_default());
        refresh_media_info_and_retry_once();
    }
    other => other,
}

Prevention

When it happens

Trigger: native_download calls download_video_with_fallback with a video_url from which get_resolution_variants derives zero candidates, or all variant downloads fail with network/HTTP errors.

Common situations: DASH video URLs where fallback derivation fails, Reddit CDN blocking downloads (403), expired signed URLs, or posts whose video URL lacks the expected DASHPlaylist.mpd / DASH_ pattern.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/platforms/reddit.rs:213

                if let Some(base) = video_url.rfind("DASH_") {
                    let mut variant = video_url[..base].to_string();
                    variant.push_str(res);
                    variants.push(variant);
                }
            }
        }
        variants
    }

    async fn download_video_with_fallback(
        &self,
        video_url: &str,
        output: &std::path::Path,
        progress_tx: mpsc::Sender<ProgressUpdate>,
        cancel: Option<&tokio_util::sync::CancellationToken>,
    ) -> anyhow::Result<u64> {
        let variants = Self::get_resolution_variants(video_url);
        let mut last_err = anyhow!("No resolution available");

        for variant in &variants {
            if let Some(token) = cancel {
                if token.is_cancelled() {
                    return Err(anyhow!("Download cancelled"));
                }
            }
            match direct_downloader::download_direct(
                &self.client,
                variant,
                output,
                progress_tx.clone(),
                cancel,
            )
            .await
            {
                Ok(bytes) => return Ok(bytes),
                Err(e) => {

View on GitHub (pinned to 8600b91f42)