Skip to content

RSC basic tests are flaky #2784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pieh opened this issue Mar 26, 2025 · 0 comments
Open

RSC basic tests are flaky #2784

pieh opened this issue Mar 26, 2025 · 0 comments
Labels
Next.js e2e test failure Errors identified through the Next.js repo e2e tests

Comments

@pieh
Copy link
Contributor

pieh commented Mar 26, 2025

We occasionally see this test https://github.com/vercel/next.js/blob/804aa35c71cc65cf3ddc29cdadcd29f06b368285/test/e2e/app-dir/rsc-basic/rsc-basic.test.ts#L198 failing with

● app dir - rsc basics › should be able to navigate between rsc routes

    request.allHeaders: Target page, context or browser has been closed

      168 |         page.on('request', (request) => {
      169 |           requestsCount++
    > 170 |           return request.allHeaders().then((headers) => {
          |                          ^
      171 |             if (
      172 |               headers['RSC'.toLowerCase()] === '1' &&
      173 |               // Prefetches also include `RSC`

      at Page.allHeaders (e2e/app-dir/rsc-basic/rsc-basic.test.ts:170:26)

Which is pretty confusing given that callstack point to listener setup in one of previous tests. Ideally this is somehow addressed in the individual test to cleanup after itself or maybe more broadly to have some global afterEach (or similar) to remove listeners that should be unrelated to future test runs

Data

The following is parsed automatically by the Next.js repo e2e test report generator.

test: app dir - rsc basics should be able to navigate between rsc routes
reason: Test setup from previous test in test suite doesn't unregister request listener

@pieh pieh added the Next.js e2e test failure Errors identified through the Next.js repo e2e tests label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next.js e2e test failure Errors identified through the Next.js repo e2e tests
Projects
None yet
Development

No branches or pull requests

1 participant