DioxusLabs/dioxus · error
static root anchor
Error message
static root anchor
What it means
The root-level iterator's `next` resolves a static root node at a dynamic anchor's path and `expect`s the template to contain it. This panic fires when `static_node_at_path` finds nothing — an internal mismatch between anchor paths and template contents, not user error.
Source
Thrown at packages/core/src/diff/template.rs:231
if let Some((anchor_index, node)) = self.pending_static.take() {
let path = self.vnode.template().anchors()[anchor_index].static_path();
return Some(static_child(self.vnode, node, path, Some(anchor_index)));
}
while self.anchor_index < self.vnode.template().anchors().len() {
let anchor_index = self.anchor_index;
self.anchor_index += 1;
let anchor = DynamicAnchor::new(self.vnode, anchor_index);
if !anchor.is_root_level() {
continue;
}
let static_root = (!anchor.is_last_static_node() && anchor.static_path().is_root())
.then(|| {
self.vnode
.template()
.static_node_at_path(anchor.static_path())
.expect("static root anchor")
});
if anchor.nodes().len() > 0 {
self.pending_static = static_root.map(|node| (anchor_index, node));
return Some(VNodeChild::Dynamic(anchor));
}
let node = static_root.expect("zero-node root anchor must own a static node");
let path = self.vnode.template().anchors()[anchor_index].static_path();
return Some(static_child(self.vnode, node, path, Some(anchor_index)));
}
None
}
}
#[derive(Clone, Copy)]
struct ElementChildCursor<'a> {View on GitHub (pinned to 24f6a829df)
Solutions
- This is an internal invariant about static root anchors. Report it with a minimal reproduction to the Dioxus issue tracker.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at packages/core/src/diff/template.rs:231 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/99a7cdbb1b806372.
Report an issue: GitHub.