Skip to content
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

[do not merge]hide observer #75160

Draft
wants to merge 1 commit into
base: canary
Choose a base branch
from
Draft

[do not merge]hide observer #75160

wants to merge 1 commit into from

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Jan 21, 2025

No description provided.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. type: next labels Jan 21, 2025
@ijjk
Copy link
Member

ijjk commented Jan 21, 2025

Failing test suites

Commit: 8e67c70

pnpm test-start-turbo test/e2e/app-dir/app-prefetch/prefetching.stale-times.test.ts (turbopack)

  • app dir - prefetching (custom staleTime) > should not fetch again when a static page was prefetched when navigating to it twice
Expand output

● app dir - prefetching (custom staleTime) › should not fetch again when a static page was prefetched when navigating to it twice

expect(received).toBe(expected) // Object.is equality

Expected: 1
Received: 0

  66 |             request === '/static-page' || request.includes(NEXT_RSC_UNION_QUERY)
  67 |         ).length
> 68 |       ).toBe(1)
     |         ^
  69 |     })
  70 |
  71 |     await browser

  at toBe (e2e/app-dir/app-prefetch/prefetching.stale-times.test.ts:68:9)
  at fn (lib/next-test-utils.ts:806:20)
  at Object.<anonymous> (e2e/app-dir/app-prefetch/prefetching.stale-times.test.ts:62:5)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts (turbopack)

  • app dir client cache with parallel routes > prefetch={true} > should prefetch the full page
  • app dir client cache with parallel routes > prefetch={true} > should re-use the cache for the full page, only for 5 mins
Expand output

● app dir client cache with parallel routes › prefetch={true} › should prefetch the full page

TIMED OUT: success

fail

undefined

  731 |
  732 |   if (hardError) {
> 733 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  734 |   }
  735 |   return false
  736 | }

  at check (lib/next-test-utils.ts:733:11)
  at Object.<anonymous> (e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts:36:7)

● app dir client cache with parallel routes › prefetch={true} › should re-use the cache for the full page, only for 5 mins

expect(received).toBe(expected) // Object.is equality

Expected: "0.5230238785371755"
Received: "0.5544160073390587"

  70 |         .text()
  71 |
> 72 |       expect(number).toBe(randomNumber)
     |                      ^
  73 |
  74 |       await browser.eval(fastForwardTo, 5 * 60 * 1000)
  75 |

  at Object.toBe (e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts:72:22)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/link-ref-app/test/index.test.js

  • Invalid hrefs > production mode > should preload with forwardRef
  • Invalid hrefs > production mode > should preload with child ref with React.createRef
  • Invalid hrefs > production mode > should preload with child ref with function
  • Invalid hrefs > production mode > should preload with child ref with function that returns a cleanup function
Expand output

● Invalid hrefs › production mode › should preload with forwardRef

expect(received).toEqual(expected) // deep equality

Expected: ArrayContaining [StringContaining "/"]
Received: []

  51 |
  52 |   await retry(async () => {
> 53 |     expect(requests).toEqual(
     |                      ^
  54 |       expect.arrayContaining([expect.stringContaining('/')])
  55 |     )
  56 |   })

  at toEqual (integration/link-ref-app/test/index.test.js:53:22)
  at fn (lib/next-test-utils.ts:806:20)
  at didPrefetch (integration/link-ref-app/test/index.test.js:52:3)
  at Object.<anonymous> (integration/link-ref-app/test/index.test.js:116:9)

● Invalid hrefs › production mode › should preload with child ref with React.createRef

expect(received).toEqual(expected) // deep equality

Expected: ArrayContaining [StringContaining "/"]
Received: []

  51 |
  52 |   await retry(async () => {
> 53 |     expect(requests).toEqual(
     |                      ^
  54 |       expect.arrayContaining([expect.stringContaining('/')])
  55 |     )
  56 |   })

  at toEqual (integration/link-ref-app/test/index.test.js:53:22)
  at fn (lib/next-test-utils.ts:806:20)
  at didPrefetch (integration/link-ref-app/test/index.test.js:52:3)
  at Object.<anonymous> (integration/link-ref-app/test/index.test.js:120:9)

● Invalid hrefs › production mode › should preload with child ref with function

expect(received).toEqual(expected) // deep equality

Expected: ArrayContaining [StringContaining "/"]
Received: []

  51 |
  52 |   await retry(async () => {
> 53 |     expect(requests).toEqual(
     |                      ^
  54 |       expect.arrayContaining([expect.stringContaining('/')])
  55 |     )
  56 |   })

  at toEqual (integration/link-ref-app/test/index.test.js:53:22)
  at fn (lib/next-test-utils.ts:806:20)
  at didPrefetch (integration/link-ref-app/test/index.test.js:52:3)
  at Object.<anonymous> (integration/link-ref-app/test/index.test.js:124:9)

● Invalid hrefs › production mode › should preload with child ref with function that returns a cleanup function

expect(received).toEqual(expected) // deep equality

Expected: ArrayContaining [StringContaining "/"]
Received: []

  51 |
  52 |   await retry(async () => {
> 53 |     expect(requests).toEqual(
     |                      ^
  54 |       expect.arrayContaining([expect.stringContaining('/')])
  55 |     )
  56 |   })

  at toEqual (integration/link-ref-app/test/index.test.js:53:22)
  at fn (lib/next-test-utils.ts:806:20)
  at didPrefetch (integration/link-ref-app/test/index.test.js:52:3)
  at Object.<anonymous> (integration/link-ref-app/test/index.test.js:128:9)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/app-client-cache/client-cache.experimental.test.ts (turbopack)

  • app dir client cache semantics (experimental staleTimes) > dynamic: 0 > prefetch={true} > should re-use the cache for 5 minutes (default "static" time)
  • app dir client cache semantics (experimental staleTimes) > static: 180 > prefetch={true} > should use the custom static override time (3 minutes)
  • app dir client cache semantics (experimental staleTimes) > static: 180 > prefetch={undefined} - default > should re-use the loading boundary for the custom static override time (3 minutes)
Expand output

● app dir client cache semantics (experimental staleTimes) › dynamic: 0 › prefetch={true} › should re-use the cache for 5 minutes (default "static" time)

expect(received).toBe(expected) // Object.is equality

Expected: "0.08504399129221918"
Received: "0.35868064189643567"

  90 |           .text()
  91 |
> 92 |         expect(initialRandomNumber).toBe(newRandomNumber)
     |                                     ^
  93 |
  94 |         await browser.eval(fastForwardTo, 30 * 1000) // fast forward 30 seconds
  95 |

  at Object.toBe (e2e/app-dir/app-client-cache/client-cache.experimental.test.ts:92:37)

● app dir client cache semantics (experimental staleTimes) › static: 180 › prefetch={true} › should use the custom static override time (3 minutes)

expect(received).toBe(expected) // Object.is equality

Expected: "0.5541841866984467"
Received: "0.48049486355446414"

  280 |           .text()
  281 |
> 282 |         expect(initialRandomNumber).toBe(newRandomNumber)
      |                                     ^
  283 |
  284 |         await browser.eval(fastForwardTo, 30 * 1000) // fast forward 30 seconds
  285 |

  at Object.toBe (e2e/app-dir/app-client-cache/client-cache.experimental.test.ts:282:37)

● app dir client cache semantics (experimental staleTimes) › static: 180 › prefetch={undefined} - default › should re-use the loading boundary for the custom static override time (3 minutes)

expect(received).toBe(expected) // Object.is equality

Expected: "0.49522192763335693"
Received: "0.45751499056539346"

  328 |           .text()
  329 |
> 330 |         expect(loadingRandomNumber).toBe(newLoadingNumber)
      |                                     ^
  331 |
  332 |         await browser.elementByCss('[href="/"]').click()
  333 |

  at Object.toBe (e2e/app-dir/app-client-cache/client-cache.experimental.test.ts:330:37)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts (turbopack)

  • segment cache (basic tests) > navigate before any data has loaded into the prefetch cache
  • segment cache (basic tests) > navigate with prefetched data
  • segment cache (basic tests) > navigate to page with lazily-generated (not at build time) static param
  • segment cache (basic tests) > prefetch interception route
  • segment cache (basic tests) > skips dynamic request if prefetched data is fully static
  • segment cache (basic tests) > skips static layouts during partially static navigation
Expand output

● segment cache (basic tests) › navigate before any data has loaded into the prefetch cache

Timed out waiting for a request to be initiated.

  24 |       async () => {
  25 |         // Reveal the link to trigger a prefetch, but block the responses.
> 26 |         const link = await act(async () => {
     |                            ^
  27 |           const reveal = await browser.elementByCss('input[type="checkbox"]')
  28 |           await reveal.click()
  29 |           return await browser.elementByCss('a')

  at act (e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts:26:28)
  at scope (e2e/app-dir/segment-cache/router-act.ts:204:33)
  at Object.<anonymous> (e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts:23:5)

● segment cache (basic tests) › navigate with prefetched data

Timed out waiting for a request to be initiated.

  65 |
  66 |     // Reveal the link to trigger a prefetch, but block the responses.
> 67 |     const link = await act(async () => {
     |                        ^
  68 |       const reveal = await browser.elementByCss('input[type="checkbox"]')
  69 |       await reveal.click()
  70 |       return await browser.elementByCss('a')

  at Object.act (e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts:67:24)

● segment cache (basic tests) › navigate to page with lazily-generated (not at build time) static param

Timed out waiting for a request to be initiated.

  105 |     // Reveal the link to trigger a prefetch.
  106 |     const reveal = await browser.elementByCss('input[type="checkbox"]')
> 107 |     const link = await act(
      |                        ^
  108 |       async () => {
  109 |         await reveal.click()
  110 |         return await browser.elementByCss('a')

  at Object.act (e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts:107:24)

● segment cache (basic tests) › prefetch interception route

Timed out waiting for a request to be initiated.

  142 |     // Reveal the link to trigger a prefetch.
  143 |     const reveal = await browser.elementByCss('input[type="checkbox"]')
> 144 |     const link = await act(
      |                        ^
  145 |       async () => {
  146 |         await reveal.click()
  147 |         return await browser.elementByCss('a')

  at Object.act (e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts:144:24)

● segment cache (basic tests) › skips dynamic request if prefetched data is fully static

Timed out waiting for a request to be initiated.

  174 |     // Reveal the link to trigger a prefetch.
  175 |     const reveal = await browser.elementByCss('input[type="checkbox"]')
> 176 |     const link = await act(
      |                        ^
  177 |       async () => {
  178 |         await reveal.click()
  179 |         return await browser.elementByCss('a[href="/fully-static/target-page"]')

  at Object.act (e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts:176:24)

● segment cache (basic tests) › skips static layouts during partially static navigation

Timed out waiting for a request to be initiated.

  208 |     // Reveal the link to trigger a prefetch.
  209 |     const reveal = await browser.elementByCss('input[type="checkbox"]')
> 210 |     const link = await act(
      |                        ^
  211 |       async () => {
  212 |         await reveal.click()
  213 |         return await browser.elementByCss(

  at Object.act (e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts:210:24)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/segment-cache/revalidation/segment-cache-revalidation.test.ts (turbopack)

  • segment cache (revalidation) > evict client cache when Server Action calls revalidatePath
  • segment cache (revalidation) > evict client cache when Server Action calls revalidateTag
Expand output

● segment cache (revalidation) › evict client cache when Server Action calls revalidatePath

Timed out waiting for a request to be initiated.

  64 |
  65 |     // Reveal the link the target page to trigger a prefetch
> 66 |     await act(
     |           ^
  67 |       async () => {
  68 |         await linkVisibilityToggle.click()
  69 |       },

  at Object.act (e2e/app-dir/segment-cache/revalidation/segment-cache-revalidation.test.ts:66:11)

● segment cache (revalidation) › evict client cache when Server Action calls revalidateTag

Timed out waiting for a request to be initiated.

  125 |
  126 |     // Reveal the link the target page to trigger a prefetch
> 127 |     await act(
      |           ^
  128 |       async () => {
  129 |         await linkVisibilityToggle.click()
  130 |       },

  at Object.act (e2e/app-dir/segment-cache/revalidation/segment-cache-revalidation.test.ts:127:11)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts (turbopack)

  • segment cache prefetch scheduling > increases the priority of a viewport-initiated prefetch on hover
  • segment cache prefetch scheduling > even on mouseexit, any link that was previously hovered is prioritized over links that were never hovered at all
  • segment cache prefetch scheduling > cancels a viewport-initiated prefetch if the link leaves the viewport before it finishes
  • segment cache prefetch scheduling > reschedules a link's prefetch when it re-enters the viewport
Expand output

● segment cache prefetch scheduling › increases the priority of a viewport-initiated prefetch on hover

Timed out waiting for a request to be initiated.

  28 |         // trees, but it won't start prefetching any segment data yet until the
  29 |         // trees have loaded.
> 30 |         await act(async () => {
     |               ^
  31 |           await checkbox.click()
  32 |         }, 'block')
  33 |

  at act (e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts:30:15)
  at scope (e2e/app-dir/segment-cache/router-act.ts:204:33)
  at Object.<anonymous> (e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts:24:5)

● segment cache prefetch scheduling › even on mouseexit, any link that was previously hovered is prioritized over links that were never hovered at all

Timed out waiting for a request to be initiated.

  71 |           // trees, but it won't start prefetching any segment data yet until the
  72 |           // trees have loaded.
> 73 |           await act(async () => {
     |                 ^
  74 |             await checkbox.click()
  75 |           }, 'block')
  76 |

  at act (e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts:73:17)
  at scope (e2e/app-dir/segment-cache/router-act.ts:204:33)
  at Object.<anonymous> (e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts:67:7)

● segment cache prefetch scheduling › cancels a viewport-initiated prefetch if the link leaves the viewport before it finishes

Timed out waiting for a request to be initiated.

  127 |           // network bandwidth. This test demonstrates that those prefetches
  128 |           // will be canceled on viewport exit, too.
> 129 |           await act(async () => {
      |                 ^
  130 |             await checkbox.click()
  131 |           }, 'block')
  132 |

  at act (e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts:129:17)
  at scope (e2e/app-dir/segment-cache/router-act.ts:204:33)
  at Object.<anonymous> (e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts:121:7)

● segment cache prefetch scheduling › reschedules a link's prefetch when it re-enters the viewport

Timed out waiting for a request to be initiated.

  166 |         // network bandwidth. This test demonstrates that those prefetches
  167 |         // will be canceled on viewport exit, too.
> 168 |         await act(async () => {
      |               ^
  169 |           await checkbox.click()
  170 |         }, 'block')
  171 |

  at act (e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts:168:15)
  at scope (e2e/app-dir/segment-cache/router-act.ts:204:33)
  at Object.<anonymous> (e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts:160:5)

Read more about building and testing Next.js in contributing.md.

pnpm test-start test/e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts

  • segment cache (incremental opt in) > prefetches a shared layout on a PPR-enabled route that was previously omitted from a non-PPR-enabled route
  • segment cache (incremental opt in) > when a link is prefetched with , no dynamic request is made on navigation
  • segment cache (incremental opt in) > when prefetching with prefetch=true, refetches cache entries that only contain partial data
  • segment cache (incremental opt in) > when prefetching with prefetch=true, refetches partial cache entries even if there's already a pending PPR request
  • segment cache (incremental opt in) > multiple prefetches to same link are deduped > page with PPR enabled
  • segment cache (incremental opt in) > multiple prefetches to same link are deduped > page with PPR enabled, and has a dynamic param
  • segment cache (incremental opt in) > multiple prefetches to same link are deduped > page with PPR disabled
  • segment cache (incremental opt in) > multiple prefetches to same link are deduped > page with PPR disabled, and has a loading boundary
Expand output

● segment cache (incremental opt in) › multiple prefetches to same link are deduped › page with PPR enabled

Timed out waiting for a request to be initiated.

  62 |
  63 |     // Click the checkbox to reveal the link and trigger a prefetch
> 64 |     await act(async () => {
     |           ^
  65 |       await checkbox.click()
  66 |       await browser.elementByCss(`a[href="${linkHref}"]`)
  67 |     })

  at act (e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts:64:11)

● segment cache (incremental opt in) › multiple prefetches to same link are deduped › page with PPR enabled, and has a dynamic param

Timed out waiting for a request to be initiated.

  62 |
  63 |     // Click the checkbox to reveal the link and trigger a prefetch
> 64 |     await act(async () => {
     |           ^
  65 |       await checkbox.click()
  66 |       await browser.elementByCss(`a[href="${linkHref}"]`)
  67 |     })

  at act (e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts:64:11)

● segment cache (incremental opt in) › multiple prefetches to same link are deduped › page with PPR disabled

Timed out waiting for a request to be initiated.

  62 |
  63 |     // Click the checkbox to reveal the link and trigger a prefetch
> 64 |     await act(async () => {
     |           ^
  65 |       await checkbox.click()
  66 |       await browser.elementByCss(`a[href="${linkHref}"]`)
  67 |     })

  at act (e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts:64:11)

● segment cache (incremental opt in) › multiple prefetches to same link are deduped › page with PPR disabled, and has a loading boundary

Timed out waiting for a request to be initiated.

  62 |
  63 |     // Click the checkbox to reveal the link and trigger a prefetch
> 64 |     await act(async () => {
     |           ^
  65 |       await checkbox.click()
  66 |       await browser.elementByCss(`a[href="${linkHref}"]`)
  67 |     })

  at act (e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts:64:11)

● segment cache (incremental opt in) › prefetches a shared layout on a PPR-enabled route that was previously omitted from a non-PPR-enabled route

Timed out waiting for a request to be initiated.

  108 |       // include the /shared-layout/ segment, because it's inside the
  109 |       // loading boundary.
> 110 |       await act(async () => {
      |             ^
  111 |         const checkbox = await browser.elementById('ppr-disabled')
  112 |         await checkbox.click()
  113 |       })

  at Object.act (e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts:110:13)

● segment cache (incremental opt in) › when a link is prefetched with , no dynamic request is made on navigation

Timed out waiting for a request to be initiated.

  144 |       })
  145 |
> 146 |       await act(
      |             ^
  147 |         async () => {
  148 |           const checkbox = await browser.elementById(
  149 |             'ppr-enabled-prefetch-true'

  at Object.act (e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts:146:13)

● segment cache (incremental opt in) › when prefetching with prefetch=true, refetches cache entries that only contain partial data

Timed out waiting for a request to be initiated.

  184 |
  185 |       // Prefetch a link with PPR
> 186 |       await act(
      |             ^
  187 |         async () => {
  188 |           const checkbox = await browser.elementById('ppr-enabled')
  189 |           await checkbox.click()

  at Object.act (e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts:186:13)

● segment cache (incremental opt in) › when prefetching with prefetch=true, refetches partial cache entries even if there's already a pending PPR request

Timed out waiting for a request to be initiated.

  247 |       // include the /shared-layout/ segment, because it's inside the
  248 |       // loading boundary.
> 249 |       await act(
      |             ^
  250 |         async () => {
  251 |           const checkbox = await browser.elementById('ppr-disabled')
  252 |           await checkbox.click()

  at Object.act (e2e/app-dir/segment-cache/incremental-opt-in/segment-cache-incremental-opt-in.test.ts:249:13)

Read more about building and testing Next.js in contributing.md.

__NEXT_EXPERIMENTAL_PPR=true pnpm test-start test/e2e/app-dir/segment-cache/memory-pressure/segment-cache-memory-pressure.test.ts (PPR)

  • segment cache memory pressure > evicts least recently used prefetch data once cache size exceeds limit
Expand output

● segment cache memory pressure › evicts least recently used prefetch data once cache size exceeds limit

Timed out waiting for a request to be initiated.

  29 |
  30 |     // Switch to tab 1 to kick off a prefetch for a link to Page 0.
> 31 |     await act(
     |           ^
  32 |       async () => {
  33 |         await switchToTab1.click()
  34 |       },

  at Object.act (e2e/app-dir/segment-cache/memory-pressure/segment-cache-memory-pressure.test.ts:31:11)

Read more about building and testing Next.js in contributing.md.

pnpm test-start test/e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts

  • parallel-routes-revalidation > server action revalidation > should not trigger a refresh for the page that is being redirected to
Expand output

● parallel-routes-revalidation › server action revalidation › should not trigger a refresh for the page that is being redirected to

expect(received).toBe(expected) // Object.is equality

Expected: 4
Received: 0

  453 |
  454 |         if (isNextStart) {
> 455 |           expect(prefetchRequests.length).toBe(4)
      |                                           ^
  456 |         }
  457 |       })
  458 |     })

  at toBe (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:455:43)
  at fn (lib/next-test-utils.ts:806:20)
  at Object.<anonymous> (e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts:449:7)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/app-client-cache/client-cache.defaults.test.ts (turbopack)

  • app dir client cache semantics (default semantics) > prefetch={true} > should prefetch the full page
  • app dir client cache semantics (default semantics) > prefetch={true} > should re-use the cache for the full page, only for 5 mins
  • app dir client cache semantics (default semantics) > prefetch={true} > should prefetch again after 5 mins if the link is visible again
  • app dir client cache semantics (default semantics) > prefetch={undefined} - default > should prefetch partially a dynamic page
Expand output

● app dir client cache semantics (default semantics) › prefetch={true} › should prefetch the full page

TIMED OUT: success

fail

undefined

  731 |
  732 |   if (hardError) {
> 733 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  734 |   }
  735 |   return false
  736 | }

  at check (lib/next-test-utils.ts:733:11)
  at Object.<anonymous> (e2e/app-dir/app-client-cache/client-cache.defaults.test.ts:53:9)

● app dir client cache semantics (default semantics) › prefetch={true} › should re-use the cache for the full page, only for 5 mins

expect(received).toBe(expected) // Object.is equality

Expected: "0.7734853936772277"
Received: "0.5089311694114085"

  86 |           .text()
  87 |
> 88 |         expect(number).toBe(randomNumber)
     |                        ^
  89 |
  90 |         await browser.eval(fastForwardTo, 5 * 60 * 1000)
  91 |

  at Object.toBe (e2e/app-dir/app-client-cache/client-cache.defaults.test.ts:88:24)

● app dir client cache semantics (default semantics) › prefetch={true} › should prefetch again after 5 mins if the link is visible again

TIMED OUT: success

fail

undefined

  731 |
  732 |   if (hardError) {
> 733 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  734 |   }
  735 |   return false
  736 | }

  at check (lib/next-test-utils.ts:733:11)
  at Object.<anonymous> (e2e/app-dir/app-client-cache/client-cache.defaults.test.ts:107:9)

● app dir client cache semantics (default semantics) › prefetch={undefined} - default › should prefetch partially a dynamic page

TIMED OUT: success

fail

undefined

  731 |
  732 |   if (hardError) {
> 733 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  734 |   }
  735 |   return false
  736 | }

  at check (lib/next-test-utils.ts:733:11)
  at Object.<anonymous> (e2e/app-dir/app-client-cache/client-cache.defaults.test.ts:217:9)

Read more about building and testing Next.js in contributing.md.

__NEXT_EXPERIMENTAL_PPR=true pnpm test-start test/e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts (PPR)

  • searchparams-reuse-loading > should re-use loading from "full" prefetch for param-full URL when navigating to param-less route
  • searchparams-reuse-loading > should re-use loading from "full" prefetch for param-less URL when navigating to param-full route
  • searchparams-reuse-loading > should re-use loading from "full" prefetch for param-full URL when navigating to param-full route
  • searchparams-reuse-loading > With Middleware > should correctly return different RSC data for full prefetches with different searchParam values
  • searchparams-reuse-loading > Without Middleware > should correctly return different RSC data for full prefetches with different searchParam values
Expand output

● searchparams-reuse-loading › Without Middleware › should correctly return different RSC data for full prefetches with different searchParam values

page.waitForSelector: Timeout 60000ms exceeded.
Call log:
  - waiting for locator('#loading')

  423 |     return this.chain(() => {
  424 |       return page
> 425 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  426 |         .then(async (el) => {
  427 |           // it seems selenium waits longer and tests rely on this behavior
  428 |           // so we wait for the load event fire before returning

  at waitForSelector (lib/browsers/playwright.ts:425:10)
  at BrowserInterface.chain (lib/browsers/base.ts:17:23)
  at BrowserInterface.chain [as waitForElementByCss] (lib/browsers/playwright.ts:423:17)
  at BrowserInterface.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:343:17)
  at BrowserInterface.elementByCss [as elementById] (lib/browsers/playwright.ts:347:17)
  at Object.elementById (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:156:30)
  at Proxy.chain (lib/browsers/base.ts:17:23)
  at Proxy.chain (lib/browsers/playwright.ts:355:17)
  at Object.text (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:156:53)

● searchparams-reuse-loading › With Middleware › should correctly return different RSC data for full prefetches with different searchParam values

page.waitForSelector: Timeout 60000ms exceeded.
Call log:
  - waiting for locator('#loading')

  423 |     return this.chain(() => {
  424 |       return page
> 425 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  426 |         .then(async (el) => {
  427 |           // it seems selenium waits longer and tests rely on this behavior
  428 |           // so we wait for the load event fire before returning

  at waitForSelector (lib/browsers/playwright.ts:425:10)
  at BrowserInterface.chain (lib/browsers/base.ts:17:23)
  at BrowserInterface.chain [as waitForElementByCss] (lib/browsers/playwright.ts:423:17)
  at BrowserInterface.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:343:17)
  at BrowserInterface.elementByCss [as elementById] (lib/browsers/playwright.ts:347:17)
  at Object.elementById (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:156:30)
  at Proxy.chain (lib/browsers/base.ts:17:23)
  at Proxy.chain (lib/browsers/playwright.ts:355:17)
  at Object.text (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:156:53)

● searchparams-reuse-loading › should re-use loading from "full" prefetch for param-full URL when navigating to param-less route

page.waitForSelector: Timeout 60000ms exceeded.
Call log:
  - waiting for locator('#loading')

  423 |     return this.chain(() => {
  424 |       return page
> 425 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  426 |         .then(async (el) => {
  427 |           // it seems selenium waits longer and tests rely on this behavior
  428 |           // so we wait for the load event fire before returning

  at waitForSelector (lib/browsers/playwright.ts:425:10)
  at BrowserInterface.chain (lib/browsers/base.ts:17:23)
  at BrowserInterface.chain [as waitForElementByCss] (lib/browsers/playwright.ts:423:17)
  at BrowserInterface.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:343:17)
  at BrowserInterface.elementByCss [as elementById] (lib/browsers/playwright.ts:347:17)
  at Object.elementById (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:267:28)
  at Proxy.chain (lib/browsers/base.ts:17:23)
  at Proxy.chain (lib/browsers/playwright.ts:355:17)
  at Object.text (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:267:51)

● searchparams-reuse-loading › should re-use loading from "full" prefetch for param-less URL when navigating to param-full route

page.waitForSelector: Timeout 60000ms exceeded.
Call log:
  - waiting for locator('#loading')

  423 |     return this.chain(() => {
  424 |       return page
> 425 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  426 |         .then(async (el) => {
  427 |           // it seems selenium waits longer and tests rely on this behavior
  428 |           // so we wait for the load event fire before returning

  at waitForSelector (lib/browsers/playwright.ts:425:10)
  at BrowserInterface.chain (lib/browsers/base.ts:17:23)
  at BrowserInterface.chain [as waitForElementByCss] (lib/browsers/playwright.ts:423:17)
  at BrowserInterface.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:343:17)
  at BrowserInterface.elementByCss [as elementById] (lib/browsers/playwright.ts:347:17)
  at Object.elementById (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:353:28)
  at Proxy.chain (lib/browsers/base.ts:17:23)
  at Proxy.chain (lib/browsers/playwright.ts:355:17)
  at Object.text (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:353:51)

● searchparams-reuse-loading › should re-use loading from "full" prefetch for param-full URL when navigating to param-full route

page.waitForSelector: Timeout 60000ms exceeded.
Call log:
  - waiting for locator('#loading')

  423 |     return this.chain(() => {
  424 |       return page
> 425 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  426 |         .then(async (el) => {
  427 |           // it seems selenium waits longer and tests rely on this behavior
  428 |           // so we wait for the load event fire before returning

  at waitForSelector (lib/browsers/playwright.ts:425:10)
  at BrowserInterface.chain (lib/browsers/base.ts:17:23)
  at BrowserInterface.chain [as waitForElementByCss] (lib/browsers/playwright.ts:423:17)
  at BrowserInterface.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:343:17)
  at BrowserInterface.elementByCss [as elementById] (lib/browsers/playwright.ts:347:17)
  at Object.elementById (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:439:28)
  at Proxy.chain (lib/browsers/base.ts:17:23)
  at Proxy.chain (lib/browsers/playwright.ts:355:17)
  at Object.text (e2e/app-dir/searchparams-reuse-loading/searchparams-reuse-loading.test.ts:439:51)

Read more about building and testing Next.js in contributing.md.

@ijjk
Copy link
Member

ijjk commented Jan 21, 2025

Stats from current PR

Default Build (Increase detected ⚠️)
General
vercel/next.js canary vercel/next.js test/hide-observer Change
buildDuration 18.6s 15.7s N/A
buildDurationCached 14.7s 12.5s N/A
nodeModulesSize 418 MB 418 MB N/A
nextStartRea..uration (ms) 400ms 399ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js test/hide-observer Change
5306-HASH.js gzip 54 kB 53.9 kB N/A
8276.HASH.js gzip 169 B 168 B N/A
8377-HASH.js gzip 5.46 kB 5.46 kB N/A
bccd1874-HASH.js gzip 52.9 kB 52.9 kB
framework-HASH.js gzip 57.5 kB 57.5 kB N/A
main-app-HASH.js gzip 240 B 242 B N/A
main-HASH.js gzip 34.4 kB 34.4 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 52.9 kB 52.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js test/hide-observer Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Overall change 39.4 kB 39.4 kB
Client Pages
vercel/next.js canary vercel/next.js test/hide-observer Change
_app-HASH.js gzip 193 B 193 B
_error-HASH.js gzip 193 B 193 B
amp-HASH.js gzip 512 B 510 B N/A
css-HASH.js gzip 343 B 342 B N/A
dynamic-HASH.js gzip 1.84 kB 1.84 kB
edge-ssr-HASH.js gzip 265 B 265 B
head-HASH.js gzip 363 B 362 B N/A
hooks-HASH.js gzip 393 B 392 B N/A
image-HASH.js gzip 4.59 kB 4.58 kB N/A
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.35 kB 2.35 kB N/A
routerDirect..HASH.js gzip 328 B 328 B
script-HASH.js gzip 397 B 397 B
withRouter-HASH.js gzip 323 B 326 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 3.59 kB 3.59 kB
Client Build Manifests
vercel/next.js canary vercel/next.js test/hide-observer Change
_buildManifest.js gzip 748 B 747 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js test/hide-observer Change
index.html gzip 523 B 523 B
link.html gzip 538 B 538 B
withRouter.html gzip 519 B 520 B N/A
Overall change 1.06 kB 1.06 kB
Edge SSR bundle Size
vercel/next.js canary vercel/next.js test/hide-observer Change
edge-ssr.js gzip 129 kB 129 kB N/A
page.js gzip 208 kB 208 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary vercel/next.js test/hide-observer Change
middleware-b..fest.js gzip 668 B 665 B N/A
middleware-r..fest.js gzip 155 B 156 B N/A
middleware.js gzip 31.3 kB 31.3 kB N/A
edge-runtime..pack.js gzip 844 B 844 B
Overall change 844 B 844 B
Next Runtimes
vercel/next.js canary vercel/next.js test/hide-observer Change
274-experime...dev.js gzip 322 B 322 B
274.runtime.dev.js gzip 314 B 314 B
app-page-exp...dev.js gzip 375 kB 375 kB
app-page-exp..prod.js gzip 130 kB 130 kB
app-page-tur..prod.js gzip 143 kB 143 kB
app-page-tur..prod.js gzip 139 kB 139 kB
app-page.run...dev.js gzip 363 kB 363 kB
app-page.run..prod.js gzip 126 kB 126 kB
app-route-ex...dev.js gzip 37.6 kB 37.6 kB
app-route-ex..prod.js gzip 25.6 kB 25.6 kB
app-route-tu..prod.js gzip 25.6 kB 25.6 kB
app-route-tu..prod.js gzip 25.4 kB 25.4 kB
app-route.ru...dev.js gzip 39.2 kB 39.2 kB
app-route.ru..prod.js gzip 25.4 kB 25.4 kB
pages-api-tu..prod.js gzip 9.69 kB 9.69 kB
pages-api.ru...dev.js gzip 11.6 kB 11.6 kB
pages-api.ru..prod.js gzip 9.68 kB 9.68 kB
pages-turbo...prod.js gzip 21.9 kB 21.9 kB
pages.runtim...dev.js gzip 27.7 kB 27.7 kB
pages.runtim..prod.js gzip 21.9 kB 21.9 kB
server.runti..prod.js gzip 916 kB 916 kB
Overall change 2.47 MB 2.47 MB
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js test/hide-observer Change
0.pack gzip 2.1 MB 2.09 MB N/A
index.pack gzip 74.3 kB 74.9 kB ⚠️ +575 B
Overall change 74.3 kB 74.9 kB ⚠️ +575 B
Diff details
Diff for main-HASH.js

Diff too large to display

Commit: 8e67c70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants