DioxusLabs/dioxus · error

anchor slot

Error message

anchor slot

What it means

Internal invariant: unchecked_mounted_anchor_node was called for an anchor slot that has no mounted element. The unchecked variant assumes the caller verified presence; firing means a mounted element was read before creation or after removal.

Source

Thrown at packages/core/src/mount.rs:331

    pub(crate) fn mounted_anchor_node(
        &self,
        mount: MountId,
        anchor_idx: usize,
    ) -> Option<MountedElementId> {
        self.with_mount(mount, |mount| {
            mount.anchor_slot(anchor_idx).mounted_element()
        })
    }

    #[track_caller]
    pub(crate) fn unchecked_mounted_anchor_node(
        &self,
        mount: MountId,
        anchor_idx: usize,
    ) -> MountedElementId {
        self.mounted_anchor_node(mount, anchor_idx)
            .expect("anchor slot")
    }

    pub(crate) fn set_mounted_anchor_node(
        &self,
        mount: MountId,
        anchor_idx: usize,
        value: MountedElementId,
    ) {
        self.with_mount_mut(mount, |mount| {
            *mount.anchor_slot_mut(anchor_idx) = PackedMountedSlot::from_mounted_element(value);
        });
    }

    pub(crate) fn clear_mounted_anchor_node(&self, mount: MountId, anchor_idx: usize) {
        self.with_mount_mut(mount, |mount| {
            *mount.anchor_slot_mut(anchor_idx) = PackedMountedSlot::empty();
        });
    }

View on GitHub (pinned to 24f6a829df)

Solutions

  1. This is an internal invariant about anchor 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/mount.rs:331 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/54261f604634e7b8. Report an issue: GitHub.