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

  1. Fix or remove `asset.minVersion` in the glTF JSON (it is optional; "version": "2.0" alone is sufficient)
  2. Set minVersion to a parseable value like "2.0"
  3. 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

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


AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30). Data as JSON: /api/errors/dac373f7293b0e26. Report an issue: GitHub.