{"record":{"id":"18196f69045e4882","repo":"moeru-ai/airi","slug":"vrm-model-loading-failure","errorCode":null,"errorMessage":"VRM model loading failure!","messagePattern":"VRM model loading failure!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/stage-ui-three/src/components/Model/VRMModel.vue","lineNumber":741,"sourceCode":"            sceneSummary: createVrmSceneSummarySnapshot({ mixer: reusableInstance.mixer, vrm: reusableInstance.vrm }),\n            ts: performance.now(),\n          })\n        }\n        return\n      }\n    }\n\n    const _vrmInfo = await loadVrm(modelSrc.value, {\n      lookAt: true,\n      onProgress: progress => emit(\n        'loadingProgress',\n        Number((100 * progress.loaded / progress.total).toFixed(2)),\n      ),\n    })\n    if (!_vrmInfo || !_vrmInfo._vrm || !_vrmInfo._vrmGroup) {\n      if (isLoadRequestCurrent(requestId)) {\n        emitVrmLoadError(currentLoadReason, loadStartedAt, 'VRM model loading failure')\n        console.warn('VRM model loading failure!')\n        emit('error', new Error('VRM model loading failure'))\n      }\n      return\n    }\n    const {\n      _vrm,\n      _vrmGroup,\n    } = _vrmInfo\n    nextVrm = _vrm\n    nextVrmGroup = _vrmGroup\n\n    if (!isLoadRequestCurrent(requestId)) {\n      disposeDetachedVrm(nextVrm, nextVrmGroup)\n      return\n    }\n\n    runVrmLoadHooks({\n      cacheHit: false,","sourceCodeStart":723,"sourceCodeEnd":759,"githubUrl":"https://github.com/moeru-ai/airi/blob/677329427f32468c74b17f3ec47eeca4e05bec65/packages/stage-ui-three/src/components/Model/VRMModel.vue#L723-L759","documentation":"loadVrm resolved but the payload was unusable (_vrm or _vrmGroup missing) — typically a plain glTF/glb without the VRM extension, or a truncated/corrupt file. If the request is still current, emitVrmLoadError records the failure and the component emits an error event with 'VRM model loading failure'; if a newer load request superseded it (isLoadRequestCurrent false), the failure is dropped silently.","triggerScenarios":"Importing a plain .glb renamed to .vrm (no VRM extension in the glTF JSON); truncated or corrupt download; VRM version newer than the three-vrm runtime supports; wrong MIME from the hosting server.","commonSituations":"Users importing arbitrary glb files as avatars; interrupted downloads; models exported by newer VRoid/UniVRM versions.","solutions":["Confirm the file is a real VRM: plain glb/gltf files parse but resolve without _vrm","Re-download or re-export the model; truncated files commonly parse yet miss the VRM extension","Update the three-vrm runtime if the model uses a newer VRM spec","Handle the emitted error event in the UI with an actionable import message","Check the network response MIME and headers when loading from a remote URL"],"exampleFix":"// before\nconst _vrmInfo = await loadVrm(modelSrc.value, { lookAt: true, onProgress })\nif (!_vrmInfo || !_vrmInfo._vrm || !_vrmInfo._vrmGroup) {\n  emitVrmLoadError(currentLoadReason, loadStartedAt, 'VRM model loading failure')\n}\n\n// after: reject non-VRM gltf up front with a precise reason\nif (!/\\.vrm$/i.test(modelSrc.value)) {\n  if (isLoadRequestCurrent(requestId))\n    emitVrmLoadError(currentLoadReason, loadStartedAt, 'File is not a VRM model')\n  return\n}","handlingStrategy":"validation","validationCode":"if (!/\\.vrm$/i.test(modelSrc.value)) {\n  emit('error', new Error('File is not a VRM model'))\n  return\n}","typeGuard":"interface VrmLoadResult { _vrm: unknown, _vrmGroup: unknown }\n\nfunction isVrmLoadResult(info: unknown): info is VrmLoadResult {\n  return !!info && typeof info === 'object' && '_vrm' in info && '_vrmGroup' in info\n    && (info as VrmLoadResult)._vrm != null && (info as VrmLoadResult)._vrmGroup != null\n}","tryCatchPattern":"const _vrmInfo = await loadVrm(modelSrc.value, { lookAt: true, onProgress })\nif (!isVrmLoadResult(_vrmInfo)) {\n  if (isLoadRequestCurrent(requestId)) {\n    emitVrmLoadError(currentLoadReason, loadStartedAt, 'VRM model loading failure')\n    emit('error', new Error('VRM model loading failure'))\n  }\n  return\n}","preventionTips":["Validate VRM files at import time (check for the VRM glTF extension), not at render time","Re-download or re-export truncated models; loadVrm resolving without _vrm usually means a plain glb","Keep the three-vrm runtime compatible with the VRM version used by assets","Handle the emitted error event in the UI with actionable import messaging"],"tags":["vrm","three","model-load","gltf"],"backgroundTag":"vrm-parse-failed","analyzedSha":"677329427f32468c74b17f3ec47eeca4e05bec65","analyzedAt":"2026-08-18T17:29:58.153Z","contentChangedAt":"2026-08-18T17:29:58.153Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}