Skip to content

vp run <pkg>#test hangs with run.cache: true when test uses Vitest browser mode (Playwright + Chromium) #396

Description

@fengmk2

Describe the bug

When run.cache: true is set in the workspace root config, vp run <pkg>#test hangs indefinitely with no output if the package's test script invokes Vitest in browser mode with Playwright + headless Chromium. Running vp test directly inside the package (without going through the cached task runner) completes in under one second.

Reproduction

https://github.com/forehalo/vp-test-bug

git clone https://github.com/forehalo/vp-test-bug
cd vp-test-bug
pnpm install

# Hangs indefinitely, no output, until killed
vp run website#test

# Works, passes in ~1s
cd apps/website
vp test

Setting run.cache: false in the root vite.config.ts (or cache: false on the test task entry) makes vp run website#test complete cleanly.

System info

  • Platform: macOS (darwin 25.2.0, arm64)
  • vite-plus: 0.1.22
  • vp: v0.1.22
  • pnpm: 11.1.3
  • Node: >=22.12.0
  • playwright: 1.60.0

Only verified on macOS so far. The existing packages/cli/snap-tests/vitest-browser-mode snap test in vite-plus is disabled on win32/darwin/linux, suggesting the issue isn't platform-specific.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions