Skip to content

VHS produces blank frames on Windows, canvas renderer fails in headless Chrome #721

@djdarcy

Description

@djdarcy

VHS on Windows produces blank or missing GIF frames. After a little debugging, I identified there were two issues:

  1. ttyd ConPTY failure on Windows 11: The bundled ttyd.win32.exe (MinGW cross-compiled) fails with CreateProcessW error 123 on Windows 11 25H2. No child process spawns, so there's nothing to render. Fixed upstream in tsl0922/ttyd#1501 / PR #1502. Pre-built MSVC binary available at djdarcy/ttyd-msvc.

  2. Canvas renderer unavailable in headless Chrome: Even with a working ttyd, CanvasToImage() returns empty data because WebGL isn't available in headless Chrome on Windows (particularly in RDP sessions and CI environments). The xterm.js canvas layers (xterm-text-layer, xterm-cursor-layer) exist but produce blank screenshots.

Fix:

  • Switch default renderer from canvas to dom in ttyd client options
  • Add SwiftShader/ANGLE browser flags as WebGL fallback
  • Detect missing canvas layers and fall back to .xterm-screen element screenshots

Working fork with fix: djdarcy/vhs-windows-fixes (branch fix/windows-ttyd-rendering)

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions