DioxusLabs/dioxus · error
no live element with tag `{tag}` found in the oracle DOM
Error message
no live element with tag `{tag}` found in the oracle DOM What it means
element_id_by_tag searched the live oracle DOM for a unique element with the given tag and found none. Tests must make their target unambiguous; a missing element (wrong render or typo'd tag) reaches this panic arm in the match on hits.
Source
Thrown at packages/oracle/src/renderer.rs:1126
self.render(vdom)
}
/// Find the live [`ElementId`] of the unique element whose tag matches
/// `tag` (default namespace). Panics if zero or more than one element
/// matches - tests should make the target unambiguous (add an `id` attr
/// and use [`Self::element_id_by_attr`] instead when multiple elements
/// share a tag).
///
/// This is the entry point for firing synthetic events without naming a
/// specific `ElementId::from_raw(N)` literal in test code: look up the target
/// semantically (by tag or by attribute), then pass the returned id to
/// `vdom.runtime().handle_event(...)`.
pub fn element_id_by_tag(&self, tag: &str) -> ElementId {
let mut hits = Vec::new();
self.collect_element_ids_by_tag(self.arena.root, tag, &mut hits);
match hits.as_slice() {
[id] => *id,
[] => panic!("no live element with tag `{tag}` found in the oracle DOM"),
many => panic!(
"tag `{tag}` is ambiguous: {} matching elements (use element_id_by_attr to disambiguate)",
many.len(),
),
}
}
/// Find the live [`ElementId`] of the unique element whose attribute
/// `attr_name` (in the default namespace) has the value `attr_value`.
/// Panics if zero or more than one element matches.
pub fn element_id_by_attr(&self, attr_name: &str, attr_value: &str) -> ElementId {
let mut hits = Vec::new();
self.collect_element_ids_by_attr(self.arena.root, attr_name, attr_value, &mut hits);
match hits.as_slice() {
[id] => *id,
[] => panic!("no live element with `{attr_name}={attr_value}` found in the oracle DOM"),
many => panic!(
"`{attr_name}={attr_value}` is ambiguous: {} matching elements",View on GitHub (pinned to 24f6a829df)
Solutions
- No live element has that tag. Ensure the element is rendered and mounted before querying, and that the tag exists in the current DOM.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/oracle/src/renderer.rs:1126 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/0c86122efc4a956b.
Report an issue: GitHub.