GraphiteEditor/Graphite · critical
Failed to create artboard node
Error message
Failed to create artboard node
What it means
Panic when document_node_definitions::resolve_network_node_type("Artboard") returns None. This function looks the identifier up in the DOCUMENT_NODE_TYPES registry compiled into the editor from the node definitions list. The message fires while creating an artboard for newly imported content (e.g., pasting an image with no declared canvas), so a missing 'Artboard' entry in the registry means the build's node definitions are incomplete or out of sync with the calling code.
Source
Thrown at editor/src/messages/portfolio/document/document_message_handler.rs:1659
// Get bounding box of all layers (always needed to confirm there is content)
let bounds = self.network_interface.document_bounds_document_space(false);
let Some(bounds) = bounds else { return };
// When artboard_canvas is provided (SVG file-open flow), use the declared canvas origin and dimensions;
// no content-shift Transform node needed since the SVG was already placed at its natural coordinates.
let (artboard_location, artboard_dimensions, content_shift) = if let Some((origin, dimensions)) = artboard_canvas {
(origin.as_dvec2(), dimensions.as_dvec2(), DVec2::ZERO)
} else {
// No declared canvas (image or clipboard paste): derive location and dimensions from the content bounding box.
let location = if place_artboard_at_origin { DVec2::ZERO } else { bounds[0].round() };
(location, (bounds[1] - bounds[0]).round(), -bounds[0].round())
};
// Create an artboard and set its dimensions to the bounding box size and location
let node_id = NodeId::new();
let node_layer_id = LayerNodeIdentifier::new_unchecked(node_id);
let new_artboard_node = document_node_definitions::resolve_network_node_type("Artboard")
.expect("Failed to create artboard node")
.default_node_template();
responses.add(NodeGraphMessage::InsertNode {
node_id,
node_template: Box::new(new_artboard_node),
});
let needs_content_transform = !content_shift.abs_diff_eq(DVec2::ZERO, 1e-6);
// With a content Transform node: shift by the layer indent plus the node width. Without: use just the layer indent.
responses.add(NodeGraphMessage::ShiftNodePosition {
node_id,
x: if needs_content_transform { LAYER_INDENT_OFFSET + NODE_CHAIN_WIDTH } else { LAYER_INDENT_OFFSET },
y: -3,
});
responses.add(GraphOperationMessage::ResizeArtboard {
layer: LayerNodeIdentifier::new_unchecked(node_id),
location: artboard_location,
dimensions: artboard_dimensions,
});
View on GitHub (pinned to c507b35645)
Solutions
- Search document_node_definitions.rs for the node registered under identifier "Artboard" and restore/rename it back
- cargo clean and rebuild the whole workspace together so the registry and callers are consistent
- If the node was intentionally removed/renamed, update this call site to the new identifier
- Check any feature flags that conditionally exclude node definitions from the registry
Example fix
// before
let new_artboard_node = document_node_definitions::resolve_network_node_type("Artboard")
.expect("Failed to create artboard node")
.default_node_template();
// after
let Some(artboard_definition) = document_node_definitions::resolve_network_node_type("Artboard") else {
tracing::error!("Artboard node type missing from the document node registry");
return;
};
let new_artboard_node = artboard_definition.default_node_template(); Defensive patterns
Strategy: validation
Validate before calling
// At startup or in tests, assert the registry actually contains the nodes the handlers depend on
#[test]
fn artboard_node_registered() {
assert!(document_node_definitions::resolve_network_node_type("Artboard").is_some(),
"'Artboard' node missing from DOCUMENT_NODE_TYPES; definitions and callers are out of sync");
} Type guard
fn artboard_definition() -> Option<&'static document_node_definitions::DocumentNodeDefinition> {
document_node_definitions::resolve_network_node_type("Artboard")
} Prevention
- Add a regression test asserting required node identifiers ('Artboard', etc.) resolve after any registry refactor
- Rebuild the whole workspace together after changing node definitions to avoid version skew
- Centralize node identifier strings as constants shared between definitions and call sites
When it happens
Trigger: Building the workspace with crates at mismatched versions so the editor references a node the registry crate does not contain; the Artboard node definition being renamed, feature-gated, or removed in a fork; stale incremental build artifacts after definitions changed.
Common situations: Refactors that rename the node identifier string without updating this call site; custom builds that prune standard node definitions; cargo builds after switching branches where node-graph crates changed; forks that disable the Artboard node.
Related errors
- Ungrouped folder must have a parent
- Node
- #[editor_commands] takes no arguments
- the #[editor_commands] module may not have other attributes
- Solidify Stroke node should exist
AI-assisted analysis of GraphiteEditor/Graphite@c507b35645 (2026-08-16).
Data as JSON: /api/errors/0a45af70186b4dc2.
Report an issue: GitHub.