{"record":{"id":"dac373f7293b0e26","repo":"BabylonJS/Babylon.js","slug":"invalid-minimum-version","errorCode":null,"errorMessage":"Invalid minimum version: ","messagePattern":"Invalid minimum version: ","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/dev/loaders/src/glTF/glTFFileLoader.pure.ts","lineNumber":1223,"sourceCode":"        );\r\n    }\r\n\r\n    private _getLoader(loaderData: IGLTFLoaderData): IGLTFLoader {\r\n        const asset = (<any>loaderData.json).asset || {};\r\n\r\n        this._log(`Asset version: ${asset.version}`);\r\n        asset.minVersion && this._log(`Asset minimum version: ${asset.minVersion}`);\r\n        asset.generator && this._log(`Asset generator: ${asset.generator}`);\r\n\r\n        const version = GLTFFileLoader._parseVersion(asset.version);\r\n        if (!version) {\r\n            throw new Error(\"Invalid version: \" + asset.version);\r\n        }\r\n\r\n        if (asset.minVersion !== undefined) {\r\n            const minVersion = GLTFFileLoader._parseVersion(asset.minVersion);\r\n            if (!minVersion) {\r\n                throw new Error(\"Invalid minimum version: \" + asset.minVersion);\r\n            }\r\n\r\n            if (GLTFFileLoader._compareVersion(minVersion, { major: 2, minor: 0 }) > 0) {\r\n                throw new Error(\"Incompatible minimum version: \" + asset.minVersion);\r\n            }\r\n        }\r\n\r\n        const createLoaders: { [key: number]: (parent: GLTFFileLoader) => IGLTFLoader } = {\r\n            1: GLTFFileLoader._CreateGLTF1Loader,\r\n            2: GLTFFileLoader._CreateGLTF2Loader,\r\n        };\r\n\r\n        const createLoader = createLoaders[version.major];\r\n        if (!createLoader) {\r\n            throw new Error(\"Unsupported version: \" + asset.version);\r\n        }\r\n\r\n        return createLoader(this);\r","sourceCodeStart":1205,"sourceCodeEnd":1241,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/loaders/src/glTF/glTFFileLoader.pure.ts#L1205-L1241","documentation":"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.","triggerScenarios":"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.","commonSituations":"Authoring tools writing non-standard minVersion values; hand-edits introducing typos; files migrated between tools that disagree on minVersion formatting.","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"],"exampleFix":"// before\n\"asset\": { \"version\": \"2.0\", \"minVersion\": \"2.x\" }\n// after\n\"asset\": { \"version\": \"2.0\", \"minVersion\": \"2.0\" }","handlingStrategy":"validation","validationCode":"const mv = gltfJson?.asset?.minVersion;\nif (mv !== undefined && !/^\\d+\\.\\d+$/.test(String(mv))) {\n  throw new Error('asset.minVersion malformed: ' + mv);\n}","typeGuard":"function hasValidMinVersion(json: any): boolean {\n  const mv = json?.asset?.minVersion;\n  return mv === undefined || (typeof mv === 'string' && /^\\d+\\.\\d+$/.test(mv));\n}","tryCatchPattern":"try {\n  await loader.loadAsync(url);\n} catch (e) {\n  if (e.message?.startsWith('Invalid minimum version:')) {\n    console.error('Fix or drop asset.minVersion in the glTF:', e.message);\n  }\n}","preventionTips":["Omit minVersion unless you specifically rely on it","Run glTF-Validator on exported assets","Normalize minVersion to \"2.0\" in your asset pipeline"],"tags":["gltf","validation","asset-metadata"],"backgroundTag":"gltf-invalid-version","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}