BabylonJS/Babylon.js · error
Unknown FBX property type: '${typeCode}' at offset ${offset
Error message
Unknown FBX property type: '${typeCode}' at offset ${offset - 1} What it means
Binary FBX properties are prefixed by a single-character type code (y,n,i,l,f,d,b and array types f,d,l,i,b plus S,R). parseProperty switches on that code; any unrecognized character means the byte stream is misaligned or the file uses an unsupported/invalid type code, so parsing stops with the offending code and its offset.
Source
Thrown at packages/dev/loaders/src/FBX/parsers/fbxBinaryParser.ts:197
ensureRange(bytes, offset, 4, limit, "FBX raw property length");
const len = view.getUint32(offset, true);
ensureRange(bytes, offset + 4, len, limit, "FBX raw property data");
const value = bytes.slice(offset + 4, offset + 4 + len);
return { property: { type: "raw", value }, nextOffset: offset + 4 + len };
}
// Array types
case "f":
return parseArrayProperty(view, bytes, offset, "float32[]", 4, limit);
case "d":
return parseArrayProperty(view, bytes, offset, "float64[]", 8, limit);
case "i":
return parseArrayProperty(view, bytes, offset, "int32[]", 4, limit);
case "l":
return parseArrayProperty(view, bytes, offset, "int64[]", 8, limit);
case "b":
return parseArrayProperty(view, bytes, offset, "boolean[]", 1, limit);
default:
throw new Error(`Unknown FBX property type: '${typeCode}' at offset ${offset - 1}`);
}
}
function parseArrayProperty(view: DataView, bytes: Uint8Array, offset: number, type: FBXPropertyType, elementSize: number, limit: number): ParsedProperty {
ensureRange(bytes, offset, 12, limit, `FBX array property header for ${type}`);
const arrayLength = view.getUint32(offset, true);
const encoding = view.getUint32(offset + 4, true); // 0=raw, 1=zlib
const compressedLength = view.getUint32(offset + 8, true);
offset += 12;
const expectedByteLength = arrayLength * elementSize;
ensureRange(bytes, offset, compressedLength, limit, `FBX array property data for ${type}`);
let arrayData: Uint8Array;
if (encoding === 1) {
// zlib compressed
const compressed = bytes.subarray(offset, offset + compressedLength);
arrayData = inflateZlib(compressed, expectedByteLength);
} else {
View on GitHub (pinned to 0592b347b8)
Solutions
- Hexdump around `offset - 1` to see the actual byte and determine whether the cursor is misaligned
- Re-export the FBX with a standard tool (Autodesk FBX Converter, Blender) to get canonical type codes
- Check whether an earlier node/property threw or mis-sized, shifting all subsequent offsets
- Log each property type code in parse order to find the first misalignment point
Example fix
// before: continuing after a mis-sized property
// after: validate lengths as you parse
if (cursor + propSize > propertiesEnd) throw new Error("Property overruns node"); Defensive patterns
Strategy: try-catch
Validate before calling
// sniff plausible binary FBX and plausible version before parsing
const head = new Uint8Array(buffer, 0, 27);
const magicOk = String.fromCharCode(...head.slice(0, 20)) === "Kaydara FBX Binary ";
const versionOk = new DataView(buffer).getUint32(23, true) >= 6000;
if (!magicOk || !versionOk) throw new Error("Refusing to parse suspicious FBX"); Try / catch
try {
const doc = parseBinaryFBX(buffer);
} catch (e) {
if (/Unknown FBX property type/.test(e.message)) {
const m = e.message.match(/'(.+?)' at offset (\d+)/);
console.error(`Bad type code ${m?.[1]} at byte ${m?.[2]} — cursor likely misaligned or non-standard exporter`);
} else throw e;
} Prevention
- Convert files from obscure exporters through Autodesk FBX Converter/Blender before parsing
- Never continue parsing after a prior bound/length error — errors cascade into misalignment
- Validate exporter output against the FBX binary spec in CI if you generate FBX yourself
- Inspect the byte at offset-1 in a hexdump to confirm misalignment vs truly unknown type
When it happens
Trigger: parseProperty (via `result` inside parseNode's property loop) reads a type-code byte not in the supported set — caused by cursor misalignment from an earlier bad length, custom/unknown property types, or reading data bytes as type codes.
Common situations: Non-standard exporters writing unsupported type codes; earlier corruption shifting the cursor mid-node; hand-patched FBX binaries.
Related errors
- Not a valid binary FBX file
- Truncated binary FBX header
- Invalid FBX node end offset ${endOffset} at offset ${offset}
- Invalid FBX property list length for node '${name}' at offse
- Invalid FBX child node end offset ${child.endOffset} at offs
AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30).
Data as JSON: /api/errors/ae6867d9c9259e92.
Report an issue: GitHub.