{"record":{"id":"c5caf2bb777ca8ba","repo":"BabylonJS/Babylon.js","slug":"could-not-deserialize-input-block-unknown-input-t","errorCode":null,"errorMessage":"Could not deserialize input block, unknown input type","messagePattern":"Could not deserialize input block, unknown input type","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/dev/smartFilters/src/blockFoundation/inputBlock.deserializer.ts","lineNumber":71,"sourceCode":"            break;\r\n        case ConnectionPointType.Color4:\r\n            {\r\n                inputBlock = new InputBlock(smartFilter, serializedBlock.name, ConnectionPointType.Color4, blockData.value);\r\n            }\r\n            break;\r\n        case ConnectionPointType.Vector2:\r\n            {\r\n                inputBlock = new InputBlock(smartFilter, serializedBlock.name, ConnectionPointType.Vector2, blockData.value);\r\n            }\r\n            break;\r\n    }\r\n    if (inputBlock) {\r\n        inputBlock.appMetadata = blockData.appMetadata;\r\n\r\n        return inputBlock;\r\n    }\r\n\r\n    throw new Error(\"Could not deserialize input block, unknown input type\");\r\n}\r\n","sourceCodeStart":53,"sourceCodeEnd":73,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/smartFilters/src/blockFoundation/inputBlock.deserializer.ts#L53-L73","documentation":"InputBlockDeserializer rebuilds an InputBlock by switching on serializedBlock.data.inputType against the supported ConnectionPointType values (Boolean, Float, Texture, Color3, Color4, Vector2). If the inputType string in the serialized JSON matches none of these cases, inputBlock remains undefined and this error is thrown. It guards the V1 deserialization pipeline against corrupt or forward-incompatible data.","triggerScenarios":"Calling SmartFilter deserialization on JSON whose data.inputType is misspelled, empty, or was produced by a newer version supporting a ConnectionPointType (e.g. Vector3/Matrix) this version does not know.","commonSituations":"Loading a saved filter created in a newer Babylon.js/smartFilters version; hand-edited or corrupted .json filter files; a schema migration that renamed inputType values.","solutions":["Check the data.inputType string in the serialized JSON against the supported ConnectionPointType values.","Upgrade @babylonjs/smartFilters (and core) to a version that supports the input type in the file.","Re-export/re-save the filter from a version that writes compatible inputType values, or fix the JSON manually."],"exampleFix":"// before\n{ \"name\": \"myInput\", \"blockType\": \"InputBlock\", \"data\": { \"inputType\": \"Vector3\", \"value\": [0,0,0] } }\n// after (downgrade to a supported type or upgrade the library)\n{ \"name\": \"myInput\", \"blockType\": \"InputBlock\", \"data\": { \"inputType\": \"Vector2\", \"value\": [0,0] } }","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set([\"Boolean\", \"Float\", \"Texture\", \"Color3\", \"Color4\", \"Vector2\"]);\nif (block.blockType === \"InputBlock\" && !SUPPORTED.has(block.data?.inputType)) {\n  throw new Error(`Unsupported inputType: ${block.data?.inputType}`);\n}","typeGuard":"function isSupportedInputType(t: unknown): t is ConnectionPointType {\n  return typeof t === \"string\" && Object.values(ConnectionPointType).includes(t as ConnectionPointType);\n}","tryCatchPattern":"try {\n  await SmartFilter.DeserializeAsync(...);\n} catch (e) {\n  if (e.message.includes(\"unknown input type\")) {\n    // surface which inputType failed and prompt for library upgrade\n  } else throw e;\n}","preventionTips":["Pin and upgrade the smartFilters/core packages together when loading filters from other versions.","Validate serialized filter JSON against the V1 schema before deserializing.","Never hand-edit inputType strings; re-export filters from the editor instead."],"tags":["serialization","deserialization","schema-validation-failed"],"backgroundTag":"unknown-enum-value","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}