BabylonJS/Babylon.js · error · Error

Could not find signal in connection with unique id ${uniqueI

Error message

Could not find signal in connection with unique id ${uniqueId}

What it means

Thrown by GetSignalInConnectionByUniqueId when no signal input connection with the given uniqueId exists in the supplied block list. The parser iterates all blocks' signal inputs and throws if no match is found.

Source

Thrown at packages/dev/core/src/FlowGraph/flowGraphParser.ts:82

}

/**
 * Given a list of blocks, find an input signal connection that has a specific unique id
 * @param blocks a list of flow graph blocks
 * @param uniqueId the unique id of a connection
 * @returns the connection that has this unique id. throws an error if none was found
 */
export function GetSignalInConnectionByUniqueId(blocks: FlowGraphBlock[], uniqueId: string): FlowGraphSignalConnection {
    for (const block of blocks) {
        if (block instanceof FlowGraphExecutionBlock) {
            for (const signalIn of block.signalInputs) {
                if (signalIn.uniqueId === uniqueId) {
                    return signalIn;
                }
            }
        }
    }
    throw new Error("Could not find signal in connection with unique id " + uniqueId);
}

/**
 * Parses a serialized coordinator.
 * @param serializedObject the object to parse
 * @param options the options to use when parsing
 * @returns the parsed coordinator
 */
export async function ParseCoordinatorAsync(serializedObject: any, options: IFlowGraphCoordinatorParseOptions) {
    const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;
    const coordinator = new FlowGraphCoordinator({ scene: options.scene });

    ApplyCoordinatorSerializationSettings(serializedObject, coordinator);

    await options.scene.whenReadyAsync();
    // async-parse the flow graphs. This can be done in parallel
    await Promise.all(
        serializedObject._flowGraphs?.map(

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Pass the full block list so every signal input is searched
  2. Verify the uniqueId in the serialization corresponds to an existing signal input
  3. Re-serialize the graph with the current library version to refresh uniqueIds
  4. Check that you are not looking up an id that belongs to a signal output

Example fix

// before
const c = GetSignalInConnectionByUniqueId(blocks, signalOutputId); // wrong kind
// after
const c = GetSignalInConnectionByUniqueId(blocks, signalInputId);
Defensive patterns

Strategy: validation

Validate before calling

function findSignalIn(blocks: any[], uniqueId: string) {
  const conn = blocks
    .flatMap((b) => (b instanceof FlowGraphExecutionBlock ? b.signalInputs : []))
    .find((c) => c.uniqueId === uniqueId);
  if (!conn) throw new Error(`Unknown signal-in id: ${uniqueId}`);
  return conn;
}

Type guard

function hasSignalIn(blocks: { signalInputs?: { uniqueId: string }[] }[], uniqueId: string): boolean {
  return blocks.some((b) => b.signalInputs?.some((c) => c.uniqueId === uniqueId));
}

Try / catch

try {
  const conn = GetSignalInConnectionByUniqueId(blocks, id);
} catch (e) {
  if (String(e.message).startsWith('Could not find signal in connection')) {
    // id is not a signal input of any block in the list
  }
}

Prevention

When it happens

Trigger: Calling GetSignalInConnectionByUniqueId(blocks, uniqueId) where the id matches no signal input — e.g. the id is a signal output id, data connection id, or belongs to blocks not in the list.

Common situations: Wiring connections that target deleted/renamed signal inputs; deserializing graphs across library versions where signal input ids changed; passing a subset of blocks.

Related errors


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