DioxusLabs/dioxus · error

root text

Error message

root text

What it means

Internal invariant: a root-level child used as a text edge was expected to be resolvable as a static text node but had no valid anchor. Indicates malformed template root children during element lookup.

Source

Thrown at packages/core/src/diff/node.rs:379

        &self,
        child: VNodeChild<'_>,
        mount: MountId,
        target_id: crate::RenderTargetId,
        dom: &VirtualDom,
        edge: ElementEdge,
    ) -> Option<ElementId> {
        match child {
            VNodeChild::Dynamic(anchor) => {
                self.dynamic_anchor_edge_element(anchor, mount, dom, target_id, edge)
            }
            VNodeChild::Element(element) => self.find_static_anchor_in_target(
                element.anchor_index().expect("root element"),
                mount,
                target_id,
                dom,
            ),
            VNodeChild::Text(text) => self.find_static_anchor_in_target(
                text.anchor_index().expect("root text"),
                mount,
                target_id,
                dom,
            ),
        }
    }

    fn dynamic_anchor_edge_element(
        &self,
        anchor: DynamicAnchor<'_>,
        mount: MountId,
        dom: &VirtualDom,
        target_id: crate::RenderTargetId,
        edge: ElementEdge,
    ) -> Option<ElementId> {
        let scan = EdgeScan::live(target_id);
        match edge {
            ElementEdge::First => anchor.nodes().find_map(|slot| {

View on GitHub (pinned to 24f6a829df)

Solutions

  1. This is an internal invariant about root text node creation. 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/node.rs:379 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/00bebe9c827cc063. Report an issue: GitHub.