Skip to content

VTDT0002: Vitest UI Server Unreachable ​

Message ​

Vitest UI server did not become reachable at {url} within {timeout}ms.

Cause ​

After spawning vitest --ui, the launcher polls the Vitest UI URL until it serves the app, then swaps the dock entry to an iframe embedding it. Vitest 5 serves the UI only with the API token it prints on startup (UI started at …?token=…), so the launcher reads that token from the session output and polls the tokenized URL; Vitest's 403 auth page does not count as ready. This diagnostic is thrown when the UI is not served within the timeout — usually because Vitest failed to start (a config error, a missing dependency, or the process exiting early), or because the UI started at line never appeared in its output.

Example ​

Launching the Vitest UI in a project whose vitest.config.ts throws during load, so the UI server never begins listening.

Fix ​

Open the Vitest UI terminal session in the Terminals dock and read its output for the underlying startup error, resolve it, then launch again.

Source ​

  • packages/vitest/src/node/plugin.ts — serve.onReady polls the spawned server with waitForVitestUi() (from ui-url.ts) and throws this when the UI is not served past the timeout.

Released under the MIT License.