{"record":{"id":"4e6a56fa04933ba0","repo":"moeru-ai/airi","slug":"model-vue-expression-controller-initialisation-f","errorCode":null,"errorMessage":"[Model.vue] Expression controller initialisation failed:","messagePattern":"\\[Model\\.vue\\] Expression controller initialisation failed:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue","lineNumber":722,"sourceCode":"})\n\n// Watch for expression system toggle — nullify/restore SDK managers at runtime\nwatch(live2dExpressionEnabled, (enabled) => {\n  if (!model.value)\n    return\n  const im = model.value.internalModel\n  const mm = im.motionManager\n  if (enabled) {\n    if (mm.expressionManager) {\n      (mm as any).expressionManager = null\n    }\n    if (im.eyeBlink) {\n      (im as any).eyeBlink = null\n    }\n\n    internalModelRef.value = im\n    initExpressionController(im).catch((err) => {\n      console.warn('[Model.vue] Expression controller initialisation failed:', err)\n    })\n  }\n  else {\n    mm.expressionManager = savedExpressionManager.value\n    im.eyeBlink = savedEyeBlink.value\n    expressionController.dispose()\n    internalModelRef.value = undefined\n  }\n})\n\nwatch(focusAt, (value) => {\n  if (!model.value)\n    return\n  if (!props.eyeTracking)\n    return\n\n  model.value.focus(value.x, value.y)\n})","sourceCodeStart":704,"sourceCodeEnd":740,"githubUrl":"https://github.com/moeru-ai/airi/blob/677329427f32468c74b17f3ec47eeca4e05bec65/packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue#L704-L740","documentation":"The enable/disable watcher nulls the stock expressionManager (and eyeBlink) and calls initExpressionController(im); that promise rejected and was warned. Because the stock manager is already nulled at that point, expressions are dead until the feature is toggled off/on again or the model reloads. Motion and rendering are unaffected.","triggerScenarios":"Toggling the custom-expression feature on for a model with missing or broken exp3.json; same expression-load failures as the loadModel path but triggered from the watcher.","commonSituations":"User toggles the expression feature on a model known to have broken expression files; feature toggled during an ongoing model load.","solutions":["Toggle the feature off/on to retry initExpressionController","Same checks as the load path: validate exp3.json files and CORS","Reload the model if toggling does not re-arm","Accept degraded behavior: motions and rendering continue without custom expressions"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const mm = model.value?.internalModel?.motionManager\nif (!mm) return // no motion manager to swap expression managers on","typeGuard":null,"tryCatchPattern":"initExpressionController(im).catch((err) => {\n  console.warn('[Model.vue] Expression controller initialisation failed:', err)\n}) // stock expressionManager was already nulled; re-toggle to retry","preventionTips":["Before enabling the feature, confirm the model ships valid exp3.json files","Keep savedExpressionManager/savedEyeBlink so disable can restore stock behavior","Treat init failure as non-fatal: motions and rendering continue"],"tags":["live2d","expressions","watch-toggle"],"backgroundTag":"live2d-expression-load-failed","analyzedSha":"677329427f32468c74b17f3ec47eeca4e05bec65","analyzedAt":"2026-08-18T17:29:58.153Z","contentChangedAt":"2026-08-18T17:29:58.153Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}