DioxusLabs/dioxus · error
dynamic node should belong to an anchor
Error message
dynamic node should belong to an anchor
What it means
Internal mount-table invariant: a dynamic node index was not found in any dynamic anchor of the mounted vnode. Every dynamic slot must belong to exactly one anchor; firing indicates vnode/anchor bookkeeping drift.
Source
Thrown at packages/core/src/mount.rs:225
pub(crate) fn logical_parent(&self) -> Option<MountId> {
self.logical_parent
}
pub(crate) fn render_parent(&self) -> Option<MountedParent> {
self.render_parent
}
pub(crate) fn node(&self) -> &VNode {
&self.node
}
fn dynamic_node_anchor_index(&self, dyn_node_idx: usize) -> usize {
self.node
.dynamic_anchors()
.find(|anchor| anchor.nodes().any(|slot| slot.index() == dyn_node_idx))
.map(|anchor| anchor.anchor_index())
.expect("dynamic node should belong to an anchor")
}
fn dynamic_offset(&self) -> usize {
self.anchor_count as usize
}
fn dynamic_slot(&self, idx: usize) -> PackedMountedSlot {
self.slots[self.dynamic_offset() + idx]
}
fn dynamic_slot_mut(&mut self, idx: usize) -> &mut PackedMountedSlot {
let offset = self.dynamic_offset();
&mut self.slots[offset + idx]
}
fn anchor_slot(&self, idx: usize) -> PackedMountedSlot {
self.slots[idx]
}View on GitHub (pinned to 24f6a829df)
Solutions
- This is an internal invariant about dynamic node 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/mount.rs:225 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/6b44d59dfcaa6f8f.
Report an issue: GitHub.