DioxusLabs/dioxus · error

mount

Error message

mount

What it means

`create_or_reuse_mount` expects a mount reference while creating/reusing a mount for a template node; this panic fires when the match produced no mount where one is required by the mount-management invariant — an internal VirtualDOM consistency failure.

Source

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

    pub(crate) fn create_or_reuse_mount(
        &self,
        dom: &mut VirtualDom,
        old_mount: Option<MountId>,
        render_parent: Option<MountId>,
        logical_parent: Option<MountId>,
        to: Option<&mut (dyn WriteMutations + '_)>,
    ) -> CreatedVNode {
        let reuse = old_mount.filter(|&mount| {
            dom.current_mounted_view(mount)
                .is_some_and(|old| old.template() == self.template())
        });
        match reuse {
            Some(mount) => self.recreate_with_mount(dom, mount, render_parent, logical_parent, to),
            None => {
                let created = self.create_mounted(dom, logical_parent, to);
                if let Some(old_mount) = old_mount {
                    dom.current_mounted_view(old_mount)
                        .expect("mount")
                        .remove_node(old_mount, dom, None);
                }
                created
            }
        }
    }

    fn finish_create(&self, mount: MountId, state: &mut DiffState<'_, '_, '_, '_>) -> CreatedVNode {
        debug_assert!(
            state.to.is_none() || state.dom.mount_should_render(mount),
            "background mounts must be created without renderer writes"
        );

        let nodes_created = self.create_root_children(mount, state);
        self.fill_nested_dynamic_slots(mount, state);

        state.dom.commit_mount(mount, self);
        CreatedVNode {

View on GitHub (pinned to 24f6a829df)

Solutions

  1. This is an internal invariant about node mounting. 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:722 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/d6253bf374f4097a. Report an issue: GitHub.