Skip to content

[ci] Bug Fix: Fix intermittent EACCES in Windows CI browser tests by pinning Vitest browser port#8673

Open
etrepum wants to merge 2 commits into
facebook:mainfrom
etrepum:claude/epic-knuth-5nj30k
Open

[ci] Bug Fix: Fix intermittent EACCES in Windows CI browser tests by pinning Vitest browser port#8673
etrepum wants to merge 2 commits into
facebook:mainfrom
etrepum:claude/epic-knuth-5nj30k

Conversation

@etrepum

@etrepum etrepum commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Description

Vitest's browser mode defaults its Vite server to port 63315, which is inside the ephemeral port range. Windows reserves randomized blocks of that range (Hyper-V/WinNAT excluded port ranges), so on windows-2022 runners the bind occasionally fails with 'listen EACCES: permission denied ::1:63315' (vitest-dev/vitest#9035). Vite only retries EADDRINUSE, not EACCES, so the run dies with an unhandled error.

Pin browser.api.port to 8315, below the ephemeral range, where Windows does not place exclusions. If the port is taken, Vite still falls back to the next free port.

Test plan

This change is isolated to test configuration

… browser port

Vitest's browser mode defaults its Vite server to port 63315, which is
inside the ephemeral port range. Windows reserves randomized blocks of
that range (Hyper-V/WinNAT excluded port ranges), so on windows-2022
runners the bind occasionally fails with 'listen EACCES: permission
denied ::1:63315' (vitest-dev/vitest#9035). Vite only retries
EADDRINUSE, not EACCES, so the run dies with an unhandled error.

Pin browser.api.port to 8315, below the ephemeral range, where Windows
does not place exclusions. If the port is taken, Vite still falls back
to the next free port.

https://claude.ai/code/session_01HzSsdRxMruSx8JgUbCL94K
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Jun 11, 2026 4:23am
lexical-playground Ready Ready Preview, Comment Jun 11, 2026 4:23am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 11, 2026

@potatowagon potatowagon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by Navi (Tater Thoughts Bobblehead) on behalf of @potatowagon.

LGTM ✅ — Minimal, well-targeted CI reliability fix.

What I checked:

  • Root cause understanding: Windows reserves randomized blocks of the ephemeral port range (49152–65535) for Hyper-V. Vitest's default browser server port 63315 falls squarely in that range. When Windows happens to reserve a block containing that port, listen() fails with EACCES — an intermittent, non-deterministic CI failure. References upstream issue vitest-dev/vitest#9035.
  • Fix correctness: Pinning api.port to 8315 (well below the ephemeral range) avoids the Hyper-V port reservation entirely. If 8315 happens to be busy, Vite's built-in fallback finds the next free port rather than failing — so this can't introduce a new failure mode.
  • Scope: Single-line config change in vitest.config.mts (the browser test workspace). Only affects the browser test server's listening port. No runtime code, no library changes, no API surface changes.
  • www backwards compatibility: N/A — this is a CI infrastructure change only. No library code touched.
  • CI: All checks green across all platforms (mac/linux/windows × chromium/firefox/webkit), unit tests, e2e, collab, integration, CLA, Vercel. Notably the Windows browser tests that this fix targets are passing.

Assessment: Straightforward infrastructure fix that eliminates an intermittent Windows CI flake. No risk. Ready to approve.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants