{"record":{"id":"c72a8db804635c72","repo":"BabylonJS/Babylon.js","slug":"could-not-find-signal-in-connection-with-unique-id","errorCode":null,"errorMessage":"Could not find signal in connection with unique id ${uniqueId}","messagePattern":"Could not find signal in connection with unique id (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/dev/core/src/FlowGraph/flowGraphParser.ts","lineNumber":82,"sourceCode":"}\n\n/**\n * Given a list of blocks, find an input signal connection that has a specific unique id\n * @param blocks a list of flow graph blocks\n * @param uniqueId the unique id of a connection\n * @returns the connection that has this unique id. throws an error if none was found\n */\nexport function GetSignalInConnectionByUniqueId(blocks: FlowGraphBlock[], uniqueId: string): FlowGraphSignalConnection {\n    for (const block of blocks) {\n        if (block instanceof FlowGraphExecutionBlock) {\n            for (const signalIn of block.signalInputs) {\n                if (signalIn.uniqueId === uniqueId) {\n                    return signalIn;\n                }\n            }\n        }\n    }\n    throw new Error(\"Could not find signal in connection with unique id \" + uniqueId);\n}\n\n/**\n * Parses a serialized coordinator.\n * @param serializedObject the object to parse\n * @param options the options to use when parsing\n * @returns the parsed coordinator\n */\nexport async function ParseCoordinatorAsync(serializedObject: any, options: IFlowGraphCoordinatorParseOptions) {\n    const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n    const coordinator = new FlowGraphCoordinator({ scene: options.scene });\n\n    ApplyCoordinatorSerializationSettings(serializedObject, coordinator);\n\n    await options.scene.whenReadyAsync();\n    // async-parse the flow graphs. This can be done in parallel\n    await Promise.all(\n        serializedObject._flowGraphs?.map(","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/core/src/FlowGraph/flowGraphParser.ts#L64-L100","documentation":"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.","triggerScenarios":"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.","commonSituations":"Wiring connections that target deleted/renamed signal inputs; deserializing graphs across library versions where signal input ids changed; passing a subset of blocks.","solutions":["Pass the full block list so every signal input is searched","Verify the uniqueId in the serialization corresponds to an existing signal input","Re-serialize the graph with the current library version to refresh uniqueIds","Check that you are not looking up an id that belongs to a signal output"],"exampleFix":"// before\nconst c = GetSignalInConnectionByUniqueId(blocks, signalOutputId); // wrong kind\n// after\nconst c = GetSignalInConnectionByUniqueId(blocks, signalInputId);","handlingStrategy":"validation","validationCode":"function findSignalIn(blocks: any[], uniqueId: string) {\n  const conn = blocks\n    .flatMap((b) => (b instanceof FlowGraphExecutionBlock ? b.signalInputs : []))\n    .find((c) => c.uniqueId === uniqueId);\n  if (!conn) throw new Error(`Unknown signal-in id: ${uniqueId}`);\n  return conn;\n}","typeGuard":"function hasSignalIn(blocks: { signalInputs?: { uniqueId: string }[] }[], uniqueId: string): boolean {\n  return blocks.some((b) => b.signalInputs?.some((c) => c.uniqueId === uniqueId));\n}","tryCatchPattern":"try {\n  const conn = GetSignalInConnectionByUniqueId(blocks, id);\n} catch (e) {\n  if (String(e.message).startsWith('Could not find signal in connection')) {\n    // id is not a signal input of any block in the list\n  }\n}","preventionTips":["Pass the complete block list to connection lookups","Confirm the id kind (signal input vs output vs data) before lookup","Refresh ids by re-serializing after library upgrades"],"tags":["flow-graph","babylonjs","lookup-failed","uniqueid"],"backgroundTag":"unknown-identifier-lookup","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}