cloudflare / cloudflare/vinext
Flaky E2E: dev error overlay "server component HMR surfaces Vite build errors after a clean load"
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 406
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 120
Description
## Summary
The App Router dev error overlay E2E test `server component HMR surfaces Vite build errors after a clean load` (`tests/e2e/app-router/dev-error-overlay.spec.ts:359`) is flaky in CI. It has been marked `test.fixme` to unblock CI while the root cause is investigated.
## Failure
Observed in CI on PR #1810:
https://github.com/cloudflare/vinext/actions/runs/27089265749/job/79950083553
The final assertion intermittently fails:
```
expect(locator).toBeHidden() failed
Locator: getByTestId('vinext-dev-error-overlay')
Expected: hidden
Received: visible
Timeout: 10000ms
```
After writing the clean version of the HMR toggle file back, the dev error overlay (which had shown the "Build Error") is expected to become hidden within 10s, but it intermittently stays visible.
```ts
await writeFile(SERVER_HMR_TOGGLE_FILE, SERVER_HMR_TOGGLE_CLEAN);
await expect(page.getByTestId("vinext-dev-error-overlay")).toBeHidden({ timeout: 10_000 });
```
## Hypothesis
After a transform/build error, the recovery HMR update from the cleaned file does not reliably dismiss the build-error overlay within the timeout. Likely a race between the Vite build-error recovery event and the overlay's dismissal logic.
## Action
- [ ] Investigate the build-error recovery → overlay-dismiss path
- [ ] Make the recovery deterministic (or wait for the right signal in the test)
- [ ] Re-enable the test (remove `test.fixme`)
Contributor guide
Assessment
This issue has not been assessed yet.