tonhowtf/omniget · error · anyhow::Error

animacao do X nao encontrada na pagina

Error message

animacao do X nao encontrada na pagina

What it means

anim_frames() extracts SVG path 'd' attributes from an animation page on X to derive an animation key; it bails if no candidate paths were found. The txid generation depends on parsing this animation data from the served page.

Solutions

  1. Ensure a logged-in session is used so X serves the page with animation data.
  2. Dump the HTML and update the path-extraction selectors for current markup.
  3. Retry after checking the page request actually returned 200 with full content.
Defensive patterns

Strategy: retry

Try / catch

match TxIdGen::create(...).await {
    Ok(gen) => gen,
    Err(e) if e.to_string().contains("animacao do X nao encontrada") => {
        // refetch page once, then surface a clear 'session/page changed' error
        retry_once().await?
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling create() -> anim_frames() when the fetched page contains no parseable animation SVG paths — the page HTML differs from what the extractor expects (challenge page, logged-out page, or markup change).

Common situations: X redesign of the txid animation markup; page fetch returned an error/blocked response; logged-out session served different content.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/x/txid.rs:230

    let re_g = regex::Regex::new(r#"(?s)<g[^>]*>(.*?)</g>"#).unwrap();
    let re_path = regex::Regex::new(r#"<path[^>]*\sd="([^"]+)""#).unwrap();
    let mut ds: Vec<String> = Vec::new();
    for svg in re_svg.captures_iter(html) {
        let inner = &svg[1];
        let g = re_g
            .captures(inner)
            .map(|c| c[1].to_string())
            .unwrap_or_else(|| inner.to_string());
        let paths: Vec<String> = re_path
            .captures_iter(&g)
            .map(|c| c[1].trim().to_string())
            .collect();
        if let Some(d) = paths.get(1) {
            ds.push(d.clone());
        }
    }
    if ds.is_empty() {
        anyhow::bail!("animacao do X nao encontrada na pagina");
    }
    let idx = (vk.get(5).copied().unwrap_or(0) as usize) % ds.len();
    let d = &ds[idx];
    let body: String = d.chars().skip(9).collect();
    let re_num = regex::Regex::new(r"[^\d]+").unwrap();
    let mut rows = Vec::new();
    for part in body.split('C') {
        let nums: Vec<f64> = re_num
            .replace_all(part, " ")
            .split_whitespace()
            .filter_map(|x| x.parse().ok())
            .collect();
        rows.push(nums);
    }
    Ok(rows)
}

fn script_urls(html: &str) -> Vec<String> {

View on GitHub (pinned to 8600b91f42)