tonhowtf/omniget · error · anyhow::Error
indices de assinatura nao encontrados
Error message
indices de assinatura nao encontrados
What it means
indices() scans a script bundle for the regex (\w\[(\d{1,2})\],\s*16) that yields signature-index numbers used by TxIdGen; it bails when no matches are found. Without these indices the txid signature algorithm cannot be constructed.
Solutions
- Log the fetched script text and update the regex to the new pattern shape.
- Broaden the regex (e.g., allow more index digits or different whitespace/constant).
- Ensure the script content is fully decoded (UTF-8, decompressed) before scanning.
- Retry the fetch — a truncated or partial download can also yield no matches.
Defensive patterns
Strategy: retry
Try / catch
match TxIdGen::create(...).await {
Err(e) if e.to_string().contains("indices de assinatura") => {
// refetch bundles once; if it persists, flag regex drift for maintenance
retry_once().await?
}
other => other?,
} Prevention
- Add a periodic canary test that builds a TxIdGen so regex drift is caught early.
- Keep the index regex configurable so it can be updated without a code deploy.
- Ensure downloaded scripts are fully decoded before scanning.
When it happens
Trigger: Calling create() when the downloaded x-web script content contains no matches for the index regex — the bundle changed structure, the wrong script was fetched, or the regex constant set (16) changed.
Common situations: X shipped a new bundle where the array literal pattern differs (different constant, multi-digit index, different call shape); content was fetched but decompression/decoding failed; regex too narrow.
Related errors
- baixei os bundles do X mas nao achei operacoes GraphQL neles
- animacao do X nao encontrada na pagina
- frame da animacao incompleto
- Could not extract data from embed
- Could not extract pin ID
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/b633b74a78a88fd3.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/x/txid.rs:328
indices_re().find(&text).map(|m| join_url(&s, m.as_str()))
}));
}
for t in tasks {
if let Ok(Some(u)) = t.await {
url = Some(u);
break;
}
}
}
let url = url.ok_or_else(|| anyhow::anyhow!("chunk de assinatura do X nao encontrado"))?;
let text = page_text(http, &url, cookie).await?;
let re_idx = regex::Regex::new(r"\(\w\[(\d{1,2})\],\s*16\)").unwrap();
let items: Vec<usize> = re_idx
.captures_iter(&text)
.filter_map(|c| c[1].parse().ok())
.collect();
if items.is_empty() {
anyhow::bail!("indices de assinatura nao encontrados");
}
Ok(items)
}
impl TxIdGen {
/// Precisa da sessao logada: o X so entrega a pagina com os indices para
/// quem esta autenticado.
pub async fn create(http: &reqwest::Client, cookie: Option<&str>) -> anyhow::Result<Self> {
let html = page_text(http, "https://x.com/tesla", cookie).await?;
let vk = verification_bytes(&html)?;
let rows = anim_frames(&html, &vk)?;
let idx = indices(http, &html, cookie).await?;
let mut frame_time: i64 = 1;
for i in idx.iter().skip(1) {
frame_time *= (vk.get(*i).copied().unwrap_or(0) % 16) as i64;
}
let frame_time = ((frame_time as f64 / 10.0 + 0.5).floor() * 10.0) as i64;
let frame_idx = (vk.get(idx[0]).copied().unwrap_or(0) % 16) as usize;View on GitHub (pinned to 8600b91f42)