Skip to content

Add graceful fallback when avatar GLB fails to load #12

Description

@Lucasmind

Priority: LOW

Problem

If the avatar GLB file fails to load (corrupted, missing, wrong format, lacking ARKit blend shapes), there's no graceful fallback. The avatar area remains blank with no user feedback.

Current Behavior

AvatarManager.js checks if (!this.head || !this.loaded) return before operations, but:

  • No error message is shown to the user
  • No validation that the GLB has required blend shapes
  • No placeholder avatar or text-only fallback

Suggested Fix

  1. Validate on load: Check that the GLB has required blend shapes for lip sync
  2. Show error: Display a clear message if avatar fails to load
  3. Fallback mode: Continue operating in "text-only" mode without avatar
    • Audio still plays via TTS
    • Subtitles still display
    • Status bar shows "Avatar unavailable"
async loadAvatar(url) {
  try {
    await this.head.showAvatar({ url }, onProgress);
    this.loaded = true;
  } catch (e) {
    console.error('Avatar load failed:', e);
    this.loaded = false;
    this.onError?.('Avatar failed to load. Running in text-only mode.');
  }
}

Files Affected

  • frontend/src/avatar/AvatarManager.js
  • frontend/src/ui/UIManager.js (display fallback state)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions