DioxusLabs/dioxus · error

render parent slot should exist in the committed parent vnod

Error message

render parent slot should exist in the committed parent vnode

What it means

Internal placement invariant: a child mount's slot index was not found in the committed parent vnode's fragment children. The new vnode's fragment shape no longer matches the committed mount table data.

Source

Thrown at packages/core/src/diff/placement.rs:200

        InsertionSite::append_to(ElementId::ROOT)
    }

    /// Resolve a child mount's site inside a specific committed parent.
    ///
    /// Invariant: if this returns `Some`, `mount` is positioned by `render_parent`.
    fn resolve_child_in_parent(
        &self,
        mount: MountId,
        render_parent: MountedParent,
    ) -> Option<InsertionSite> {
        let parent_mount = render_parent.parent();
        // Render-parent slots are committed-mount-table data. During a parent diff, the new vnode
        // may already have a different fragment shape, but the fragment child mount list is not
        // replaced until that parent diff commits.
        self.with_parent_vnode(parent_mount, ParentVersion::Old, |parent_vnode| {
            let slot = render_parent
                .slot(parent_vnode)
                .expect("render parent slot should exist in the committed parent vnode");
            match (
                render_parent.kind(),
                &parent_vnode.dynamic_node_values()[slot.index()],
            ) {
                (
                    MountedParentKind::FragmentChild { child_index },
                    DynamicNode::Fragment(children),
                ) => {
                    let child_mounts = self.dom.mounted_fragment_children_exact(
                        parent_mount,
                        slot.index(),
                        children.len(),
                    );
                    self.resolve_fragment_child_site(children, &child_mounts, child_index, mount)
                        .or_else(|| Some(self.resolve_slot(parent_mount, slot)))
                }
                (MountedParentKind::ComponentRoot, DynamicNode::Component(_)) => {
                    Some(self.resolve_slot(parent_mount, slot))

View on GitHub (pinned to 24f6a829df)

Solutions

  1. This is an internal invariant about render parent slots. 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/placement.rs:200 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/4083079618ff4140. Report an issue: GitHub.