DioxusLabs/dioxus · error
visible fragment creation requires an insertion site
Error message
visible fragment creation requires an insertion site
What it means
Internal diffing invariant: transitioning a fragment slot from empty to non-empty requires an insertion site to place the new content at, but none could be resolved. Indicates the mounted tree and vnode shape disagree.
Source
Thrown at packages/core/src/diff/node.rs:268
.dom
.clear_mounted_fragment_children(mount, slot.index());
}
(true, false) => {
// Empty → non-empty: visible diffs stage new content at the
// slot insertion site. Hidden/no-writer diffs only materialize
// mount state, so there is no renderer placement to resolve.
let context = state.context();
let site = state
.has_writer()
.then(|| insertion_site_for_slot(mount, slot, state.dom, context));
let children =
state
.dom
.begin_mounted_fragment_children(mount, slot.index(), new.len());
state.create_children_at_site(
new,
parent,
|_| site.expect("visible fragment creation requires an insertion site"),
children,
);
state.dom.commit_mounted_fragment_children(children);
}
(false, true) => {
state
.dom
.remove_nodes(state.to.as_deref_mut(), old, &old_mounts);
state
.dom
.clear_mounted_fragment_children(mount, slot.index());
}
(false, false) => {
let context = state.context();
let fallback_site = state
.has_writer()
.then(|| insertion_site_for_slot(mount, slot, state.dom, context));
let children =View on GitHub (pinned to 24f6a829df)
Solutions
- This is an internal invariant about fragment 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:268 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/008a18ac5f65fd8b.
Report an issue: GitHub.