[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
Open
[ci] Bug Fix: Fix intermittent EACCES in Windows CI browser tests by pinning Vitest browser port#8673etrepum wants to merge 2 commits into
etrepum wants to merge 2 commits into
Conversation
… 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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
potatowagon
reviewed
Jun 11, 2026
potatowagon
left a comment
Contributor
There was a problem hiding this comment.
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.portto 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(thebrowsertest 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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