GraphiteEditor/Graphite · error
Not enough arguments provided to construct node
Error message
Not enough arguments provided to construct node
What it means
The async_node! macro generates a constructor closure that pops one argument per declared fn_params entry; when the runtime supplies fewer arguments than the node's signature declares, args.pop() returns None and this panic fires inside the generated closure.
Source
Thrown at node-graph/interpreted-executor/src/node_registry.rs:641
mod node_registry_macros {
macro_rules! async_node {
// TODO: we currently need to annotate the type here because the compiler would otherwise (correctly)
// TODO: assign a Pin<Box<dyn Future<Output=T>>> type to the node, which is not what we want for now.
//
// This `params` variant of the macro wraps the normal `fn_params` variant and is used as a shorthand for writing `T` instead of `() => T`
($path:ty, input: $input:ty, params: [$($type:ty),*]) => {
async_node!($path, input: $input, fn_params: [ $(() => $type),*])
};
($path:ty, input: $input:ty, fn_params: [$($arg:ty => $type:ty),*]) => {
async_node!(identifier: ProtoNodeIdentifier::new(stringify!($path)), $path, input: $input, fn_params: [$($arg => $type),*])
};
(identifier: $identifier:expr, $path:ty, input: $input:ty, fn_params: [$($arg:ty => $type:ty),*]) => {
(
$identifier,
|mut args| {
Box::pin(async move {
args.reverse();
let node = <$path>::new($(graphene_std::any::downcast_node::<$arg, $type>(args.pop().expect("Not enough arguments provided to construct node"))),*);
let any: DynAnyNode<$input, _, _> = graphene_std::any::DynAnyNode::new(node);
Box::new(any) as TypeErasedBox
})
},
{
let node = <$path>::new($(
graphene_std::any::PanicNode::<$arg, core::pin::Pin<Box<dyn core::future::Future<Output = $type> + Send>>>::new()
),*);
let params = vec![$(fn_type_fut!($arg, $type)),*];
let mut node_io = NodeIO::<'_, $input>::to_async_node_io(&node, params);
node_io.call_argument = concrete!(<$input as StaticType>::Static);
node_io
},
)
};
}
pub(crate) use async_node;View on GitHub (pinned to c507b35645)
Solutions
- Compare the node's fn_params list against the inputs actually connected for that node in the proto network
- Re-save or rebuild the document against the current node registry
- In tests, assert the argument count equals the node's NodeIO params length before invoking the executor
Defensive patterns
Strategy: validation
Validate before calling
// in tests, verify wiring matches the node signature before executing // let params = node_io.params.len(); // assert_eq!(provided_args, params, "argument count must match fn_params");
Prevention
- When changing a node's fn_params, bump and migrate document formats accordingly
- Run the node registry test suite after any signature change
- Never hand-wire proto networks without checking every declared param is fed
When it happens
Trigger: Executing a node whose proto-network inputs deliver fewer values than its fn_params list — an input that produced no argument, or a node whose signature gained parameters after the graph was serialized.
Common situations: Adding parameters to a node without updating saved graphs or test wiring; mixed versions of the node registry and documents; hand-built proto networks in tests.
Related errors
- Failed to create artboard node
- Solidify Stroke node should exist
- Merge node
- Node
- Boolean node does not exist
AI-assisted analysis of GraphiteEditor/Graphite@c507b35645 (2026-08-16).
Data as JSON: /api/errors/b01833f64abeb2d7.
Report an issue: GitHub.