BabylonJS/Babylon.js · error

Error parsing node configuration

Error message

Error parsing node configuration

What it means

Thrown in _parseNodeConfiguration when an entry in a node's `configuration` object resolves to a falsy value (null/undefined/empty). Each configuration key must carry a value descriptor; an empty entry cannot be converted into block config and aborts node parsing.

Source

Thrown at packages/dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.ts:283

            uniqueId: RandomGUID(),
            className,
            dataInputs: [],
            dataOutputs: [],
            signalInputs: [],
            signalOutputs: [],
            config: {},
            type,
            metadata: {},
        };
    }

    private _parseNodeConfiguration(node: IKHRInteractivity_Node, block: ISerializedFlowGraphBlock, nodeMapping: IGLTFToFlowGraphMapping, blockType: FlowGraphBlockNames | string) {
        const gltfConfiguration = node.configuration;
        if (gltfConfiguration) {
            for (const key in gltfConfiguration) {
                const gltfProperty = gltfConfiguration[key];
                if (!gltfProperty) {
                    throw new Error("Error parsing node configuration");
                }

                const propertyMapping = nodeMapping.configuration?.[key];
                const belongsToBlock = propertyMapping && propertyMapping.toBlock ? propertyMapping.toBlock === blockType : nodeMapping.blocks.indexOf(blockType) === 0;
                if (belongsToBlock) {
                    let value = propertyMapping?.defaultValue;
                    if (gltfProperty?.value) {
                        value = gltfProperty.value;
                    }

                    if (!propertyMapping?.isArray) {
                        if (value.length !== 1) {
                            Logger.Warn(`Invalid non-array value length: ${value.length}`);
                        }

                        value = value[0];
                    }

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Remove the empty/null key from the node's `configuration` object
  2. Provide a proper value descriptor { "type": <index>, "value": [...] } for the key
  3. Check which node failed via surrounding logs and fix that node in the asset
  4. Re-export the asset with a current exporter

Example fix

// before
"configuration": { "speed": null }
// after
"configuration": { "speed": { "type": 0, "value": [1] } }
Defensive patterns

Strategy: validation

Validate before calling

for (const node of graph.nodes ?? []) {
  for (const [key, cfg] of Object.entries(node.configuration ?? {})) {
    if (!cfg) throw new Error(`Node configuration '${key}' is null/empty`);
  }
}

Type guard

function hasValidConfiguration(node: IKHRInteractivity_Node): boolean {
  return !node.configuration || Object.values(node.configuration).every((c) => c != null);
}

Try / catch

try {
  const parser = new InteractivityGraphToFlowGraphParser(graph, gltf);
} catch (e) {
  if (e.message === 'Error parsing node configuration') {
    console.warn('Empty node configuration entry; stripping empty configs and retrying');
    graph.nodes?.forEach((n) => {
      for (const k of Object.keys(n.configuration ?? {})) {
        if (!n.configuration![k]) delete n.configuration![k];
      }
    });
    return new InteractivityGraphToFlowGraphParser(graph, gltf);
  }
  throw e;
}

Prevention

When it happens

Trigger: A node's `configuration` object contains a key mapped to null, undefined, or an empty descriptor (e.g. { "a": null }) while _parseNodes iterates configuration keys for each block of the node.

Common situations: Hand-edited glTF; tool-generated configs where a value was stripped but the key kept; JSON merge patches introducing nulls; exporter bugs emitting empty configuration entries.

Related errors


AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30). Data as JSON: /api/errors/e87e603da232f0ee. Report an issue: GitHub.