BabylonJS/Babylon.js · error
Could not deserialize input block, unknown input type
Error message
Could not deserialize input block, unknown input type
What it means
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.
Source
Thrown at packages/dev/smartFilters/src/blockFoundation/inputBlock.deserializer.ts:71
break;
case ConnectionPointType.Color4:
{
inputBlock = new InputBlock(smartFilter, serializedBlock.name, ConnectionPointType.Color4, blockData.value);
}
break;
case ConnectionPointType.Vector2:
{
inputBlock = new InputBlock(smartFilter, serializedBlock.name, ConnectionPointType.Vector2, blockData.value);
}
break;
}
if (inputBlock) {
inputBlock.appMetadata = blockData.appMetadata;
return inputBlock;
}
throw new Error("Could not deserialize input block, unknown input type");
}
View on GitHub (pinned to 0592b347b8)
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.
Example fix
// before
{ "name": "myInput", "blockType": "InputBlock", "data": { "inputType": "Vector3", "value": [0,0,0] } }
// after (downgrade to a supported type or upgrade the library)
{ "name": "myInput", "blockType": "InputBlock", "data": { "inputType": "Vector2", "value": [0,0] } } Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = new Set(["Boolean", "Float", "Texture", "Color3", "Color4", "Vector2"]);
if (block.blockType === "InputBlock" && !SUPPORTED.has(block.data?.inputType)) {
throw new Error(`Unsupported inputType: ${block.data?.inputType}`);
} Type guard
function isSupportedInputType(t: unknown): t is ConnectionPointType {
return typeof t === "string" && Object.values(ConnectionPointType).includes(t as ConnectionPointType);
} Try / catch
try {
await SmartFilter.DeserializeAsync(...);
} catch (e) {
if (e.message.includes("unknown input type")) {
// surface which inputType failed and prompt for library upgrade
} else throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- SmartAssetSerializer: Invalid asset map — expected an object
- Unable to deserialize NavMesh.
- Unable to deserialize TileCache.
- Could not find signal input with name ${name} in block ${cla
- Could not find signal output with name ${name} in block ${cl
AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30).
Data as JSON: /api/errors/c5caf2bb777ca8ba.
Report an issue: GitHub.