moeru-ai/airi · error
VRM model loading failure!
Error message
VRM model loading failure!
What it means
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.
Source
Thrown at packages/stage-ui-three/src/components/Model/VRMModel.vue:741
sceneSummary: createVrmSceneSummarySnapshot({ mixer: reusableInstance.mixer, vrm: reusableInstance.vrm }),
ts: performance.now(),
})
}
return
}
}
const _vrmInfo = await loadVrm(modelSrc.value, {
lookAt: true,
onProgress: progress => emit(
'loadingProgress',
Number((100 * progress.loaded / progress.total).toFixed(2)),
),
})
if (!_vrmInfo || !_vrmInfo._vrm || !_vrmInfo._vrmGroup) {
if (isLoadRequestCurrent(requestId)) {
emitVrmLoadError(currentLoadReason, loadStartedAt, 'VRM model loading failure')
console.warn('VRM model loading failure!')
emit('error', new Error('VRM model loading failure'))
}
return
}
const {
_vrm,
_vrmGroup,
} = _vrmInfo
nextVrm = _vrm
nextVrmGroup = _vrmGroup
if (!isLoadRequestCurrent(requestId)) {
disposeDetachedVrm(nextVrm, nextVrmGroup)
return
}
runVrmLoadHooks({
cacheHit: false,View on GitHub (pinned to 677329427f)
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
Example fix
// before
const _vrmInfo = await loadVrm(modelSrc.value, { lookAt: true, onProgress })
if (!_vrmInfo || !_vrmInfo._vrm || !_vrmInfo._vrmGroup) {
emitVrmLoadError(currentLoadReason, loadStartedAt, 'VRM model loading failure')
}
// after: reject non-VRM gltf up front with a precise reason
if (!/\.vrm$/i.test(modelSrc.value)) {
if (isLoadRequestCurrent(requestId))
emitVrmLoadError(currentLoadReason, loadStartedAt, 'File is not a VRM model')
return
} Defensive patterns
Strategy: validation
Validate before calling
if (!/\.vrm$/i.test(modelSrc.value)) {
emit('error', new Error('File is not a VRM model'))
return
} Type guard
interface VrmLoadResult { _vrm: unknown, _vrmGroup: unknown }
function isVrmLoadResult(info: unknown): info is VrmLoadResult {
return !!info && typeof info === 'object' && '_vrm' in info && '_vrmGroup' in info
&& (info as VrmLoadResult)._vrm != null && (info as VrmLoadResult)._vrmGroup != null
} Try / catch
const _vrmInfo = await loadVrm(modelSrc.value, { lookAt: true, onProgress })
if (!isVrmLoadResult(_vrmInfo)) {
if (isLoadRequestCurrent(requestId)) {
emitVrmLoadError(currentLoadReason, loadStartedAt, 'VRM model loading failure')
emit('error', new Error('VRM model loading failure'))
}
return
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Users importing arbitrary glb files as avatars; interrupted downloads; models exported by newer VRoid/UniVRM versions.
Related errors
- No VRM animations found in the .vrma file
- NO model src, cannot load VRM model.
- No VRM animation loaded
- Failed to set colorSpace on texture:
- Camera is not perspective camera, type error!
AI-assisted analysis of moeru-ai/airi@677329427f (2026-08-18).
Data as JSON: /api/errors/18196f69045e4882.
Report an issue: GitHub.