BabylonJS/Babylon.js · error · Error
Invalid minimum version:
Error message
Invalid minimum version:
What it means
Thrown when `asset.minVersion` is present in the glTF but cannot be parsed by _parseVersion. minVersion is optional but, if declared, must be a valid `<major>.<minor>` string. The loader parses it to compare against the glTF 2.0 requirement.
Source
Thrown at packages/dev/loaders/src/glTF/glTFFileLoader.pure.ts:1223
);
}
private _getLoader(loaderData: IGLTFLoaderData): IGLTFLoader {
const asset = (<any>loaderData.json).asset || {};
this._log(`Asset version: ${asset.version}`);
asset.minVersion && this._log(`Asset minimum version: ${asset.minVersion}`);
asset.generator && this._log(`Asset generator: ${asset.generator}`);
const version = GLTFFileLoader._parseVersion(asset.version);
if (!version) {
throw new Error("Invalid version: " + asset.version);
}
if (asset.minVersion !== undefined) {
const minVersion = GLTFFileLoader._parseVersion(asset.minVersion);
if (!minVersion) {
throw new Error("Invalid minimum version: " + asset.minVersion);
}
if (GLTFFileLoader._compareVersion(minVersion, { major: 2, minor: 0 }) > 0) {
throw new Error("Incompatible minimum version: " + asset.minVersion);
}
}
const createLoaders: { [key: number]: (parent: GLTFFileLoader) => IGLTFLoader } = {
1: GLTFFileLoader._CreateGLTF1Loader,
2: GLTFFileLoader._CreateGLTF2Loader,
};
const createLoader = createLoaders[version.major];
if (!createLoader) {
throw new Error("Unsupported version: " + asset.version);
}
return createLoader(this);
View on GitHub (pinned to 0592b347b8)
Solutions
- Fix or remove `asset.minVersion` in the glTF JSON (it is optional; "version": "2.0" alone is sufficient)
- Set minVersion to a parseable value like "2.0"
- Re-export with a compliant exporter and validate with glTF-Validator
Example fix
// before
"asset": { "version": "2.0", "minVersion": "2.x" }
// after
"asset": { "version": "2.0", "minVersion": "2.0" } Defensive patterns
Strategy: validation
Validate before calling
const mv = gltfJson?.asset?.minVersion;
if (mv !== undefined && !/^\d+\.\d+$/.test(String(mv))) {
throw new Error('asset.minVersion malformed: ' + mv);
} Type guard
function hasValidMinVersion(json: any): boolean {
const mv = json?.asset?.minVersion;
return mv === undefined || (typeof mv === 'string' && /^\d+\.\d+$/.test(mv));
} Try / catch
try {
await loader.loadAsync(url);
} catch (e) {
if (e.message?.startsWith('Invalid minimum version:')) {
console.error('Fix or drop asset.minVersion in the glTF:', e.message);
}
} Prevention
- Omit minVersion unless you specifically rely on it
- Run glTF-Validator on exported assets
- Normalize minVersion to "2.0" in your asset pipeline
When it happens
Trigger: Loading an asset whose `asset.minVersion` is a non-numeric or malformed string (e.g. "2.x", "", "beta") while the loader still accepts the main version.
Common situations: Authoring tools writing non-standard minVersion values; hand-edits introducing typos; files migrated between tools that disagree on minVersion formatting.
Related errors
- Invalid version:
- ${extensionContext}/attributes: Instance buffer accessors do
- Receive event should have a single configuration object, the
- Switch should have a single configuration object, the cases
- MultiGate should have a single configuration object, the num
AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30).
Data as JSON: /api/errors/dac373f7293b0e26.
Report an issue: GitHub.