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

Upgrade React from 7283a213-20241206 to 79ddf5b5-20241210 #73804

Closed
wants to merge 8 commits into from

Conversation

@ijjk
Copy link
Member

ijjk commented Dec 11, 2024

Failing test suites

Commit: 77ee504

__NEXT_EXPERIMENTAL_PPR=true pnpm test-dev test/e2e/app-dir/dynamic-io/dynamic-io.server-action.test.ts (PPR)

  • dynamic-io > should not have dynamic IO errors when encoding bound args for inline server actions
Expand output

● dynamic-io › should not have dynamic IO errors when encoding bound args for inline server actions

expect(received).not.toMatch(expected)

Expected substring: not "Error: Route \"/server-action-inline\""
Received string:        "   Loading config from /tmp/next-install-2fc3bb8de4b4bd93591536fcd54f036e924a688c44962ca034f1e9fe57a47c03/next.config.js
 ⚠ `experimental.ppr` has been defaulted to `true` because `__NEXT_EXPERIMENTAL_PPR` was set to `true` during testing.
   Loading config from /tmp/next-install-2fc3bb8de4b4bd93591536fcd54f036e924a688c44962ca034f1e9fe57a47c03/next.config.js
 ⚠ `experimental.ppr` has been defaulted to `true` because `__NEXT_EXPERIMENTAL_PPR` was set to `true` during testing.
   ▲ Next.js 15.1.1-canary.6
   - Local:        http://localhost:43289
   - Network:      http://144.76.217.181:43289
   - Experiments (use with caution):
     · dynamicIO

 ✓ Starting...
   Loading config from /tmp/next-install-2fc3bb8de4b4bd93591536fcd54f036e924a688c44962ca034f1e9fe57a47c03/next.config.js
 ⚠ `experimental.ppr` has been defaulted to `true` because `__NEXT_EXPERIMENTAL_PPR` was set to `true` during testing.

   We detected TypeScript in your project and created a tsconfig.json file for you.
   Loading config from /tmp/next-install-2fc3bb8de4b4bd93591536fcd54f036e924a688c44962ca034f1e9fe57a47c03/next.config.js
 ⚠ `experimental.ppr` has been defaulted to `true` because `__NEXT_EXPERIMENTAL_PPR` was set to `true` during testing.
 ✓ Ready in 1695ms
 ○ Compiling /middleware ...
 ✓ Compiled /middleware in 679ms (98 modules)
 ○ Compiling /server-action ...
 ✓ Compiled /server-action in 3.3s (615 modules)
 GET /server-action 200 in 3713ms
 POST /server-action 200 in 76ms
 ✓ Compiled /server-action-inline in 427ms (635 modules)
Error: Route \"/server-action-inline\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense
    at form (<anonymous>)

  at action (../app/server-action-inline/form.tsx:6:23)
      at Page [Server] (<anonymous>)
  at tree (../../../src/client/components/layout-router.tsx:317:2)
  at RedirectErrorBoundary (../../../src/client/components/redirect-boundary.tsx:43:4)
  at children (../../../src/client/components/redirect-boundary.tsx:74:35)
  at notFound (../../../src/client/components/http-access-fallback/error-boundary.tsx:154:2)
  at loading (../../../src/client/components/layout-router.tsx:423:2)
  at errorComponent (../../../src/client/components/error-boundary.tsx:183:2)
  at InnerScrollAndFocusHandler (../../../src/client/components/layout-router.tsx:175:0)
  at segmentPath (../../../src/client/components/layout-router.tsx:292:2)
  at TemplateContext (../../../src/client/components/render-from-template-context.tsx:7:30)
  at parallelRouterKey (../../../src/client/components/layout-router.tsx:476:2)
  at tree (../../../src/client/components/layout-router.tsx:317:2)
  at RedirectErrorBoundary (../../../src/client/components/redirect-boundary.tsx:43:4)
  at children (../../../src/client/components/redirect-boundary.tsx:74:35)
  at HTTPAccessFallbackErrorBoundary (../../../src/client/components/http-access-fallback/error-boundary.tsx:49:4)
  at notFound (../../../src/client/components/http-access-fallback/error-boundary.tsx:154:2)
  at loading (../../../src/client/components/layout-router.tsx:423:2)
  at errorComponent (../../../src/client/components/error-boundary.tsx:183:2)
  at InnerScrollAndFocusHandler (../../../src/client/components/layout-router.tsx:175:0)
  at segmentPath (../../../src/client/components/layout-router.tsx:292:2)
  at TemplateContext (../../../src/client/components/render-from-template-context.tsx:7:30)
  at parallelRouterKey (../../../src/client/components/layout-router.tsx:476:2)
      at main (<anonymous>)
      at body (<anonymous>)
      at html (<anonymous>)
      at Root [Server] (<anonymous>)
    4 | import { getSentinelValue } from '../getSentinelValue'
    5 |
  > 6 | export function Form({ action }) {
      |                       ^
    7 |   const [result, formAction] = useActionState(action, 'initial')
    8 |
    9 |   return (
   GET /server-action-inline 200 in 955ms
  Error: Route \"/server-action-inline\": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a \"use cache\" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense
      at form (<anonymous>)
  at action (../app/server-action-inline/form.tsx:6:23)
      at Page [Server] (<anonymous>)
  at tree (../../../src/client/components/layout-router.tsx:317:2)
  at RedirectErrorBoundary (../../../src/client/components/redirect-boundary.tsx:43:4)
  at children (../../../src/client/components/redirect-boundary.tsx:74:35)
  at notFound (../../../src/client/components/http-access-fallback/error-boundary.tsx:154:2)
  at loading (../../../src/client/components/layout-router.tsx:423:2)
  at errorComponent (../../../src/client/components/error-boundary.tsx:183:2)
  at InnerScrollAndFocusHandler (../../../src/client/components/layout-router.tsx:175:0)
  at segmentPath (../../../src/client/components/layout-router.tsx:292:2)
  at TemplateContext (../../../src/client/components/render-from-template-context.tsx:7:30)
  at parallelRouterKey (../../../src/client/components/layout-router.tsx:476:2)
  at tree (../../../src/client/components/layout-router.tsx:317:2)
  at RedirectErrorBoundary (../../../src/client/components/redirect-boundary.tsx:43:4)
  at children (../../../src/client/components/redirect-boundary.tsx:74:35)
  at HTTPAccessFallbackErrorBoundary (../../../src/client/components/http-access-fallback/error-boundary.tsx:49:4)
  at notFound (../../../src/client/components/http-access-fallback/error-boundary.tsx:154:2)
  at loading (../../../src/client/components/layout-router.tsx:423:2)
  at errorComponent (../../../src/client/components/error-boundary.tsx:183:2)
  at InnerScrollAndFocusHandler (../../../src/client/components/layout-router.tsx:175:0)
  at segmentPath (../../../src/client/components/layout-router.tsx:292:2)
  at TemplateContext (../../../src/client/components/render-from-template-context.tsx:7:30)
  at parallelRouterKey (../../../src/client/components/layout-router.tsx:476:2)
      at main (<anonymous>)
      at body (<anonymous>)
      at html (<anonymous>)
      at Root [Server] (<anonymous>)
    4 | import { getSentinelValue } from '../getSentinelValue'
    5 |
  > 6 | export function Form({ action }) {
      |                       ^
    7 |   const [result, formAction] = useActionState(action, 'initial')
    8 |
    9 |   return (
   POST /server-action-inline 200 in 278ms
  "
  at Object.toMatch (e2e/app-dir/dynamic-io/dynamic-io.server-action.test.ts:28:32)

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

__NEXT_EXPERIMENTAL_PPR=true pnpm test-dev test/e2e/app-dir/dynamic-io/dynamic-io.test.ts (PPR)

  • dynamic-io > should prerender pages that cached the whole page
Expand output

● dynamic-io › should prerender pages that cached the whole page

thrown: "Exceeded timeout of 120000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  245 |   })
  246 |
> 247 |   itSkipTurbopack(
      |   ^
  248 |     'should prerender pages that cached the whole page',
  249 |     async () => {
  250 |       const $ = await next.render$('/cases/full_cached', {})

  at itSkipTurbopack (e2e/app-dir/dynamic-io/dynamic-io.test.ts:247:3)
  at Object.describe (e2e/app-dir/dynamic-io/dynamic-io.test.ts:8:1)

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

__NEXT_EXPERIMENTAL_PPR=true pnpm test-dev test/e2e/app-dir/use-cache/use-cache.test.ts (PPR)

  • use-cache > should dedupe with react cache inside "use cache"
  • use-cache > should error when cookies/headers/draftMode is used inside "use cache"
Expand output

● use-cache › should dedupe with react cache inside "use cache"

page.goto: Timeout 60000ms exceeded.
Call log:
  - navigating to "http://localhost:42331/react-cache", waiting until "load"

  282 |     opts?.beforePageLoad?.(page)
  283 |
> 284 |     await page.goto(url, { waitUntil: 'load' })
      |                ^
  285 |   }
  286 |
  287 |   back(options) {

  at BrowserInterface.goto (lib/browsers/playwright.ts:284:16)
  at webdriver (lib/next-webdriver.ts:136:3)
  at Object.<anonymous> (e2e/app-dir/use-cache/use-cache.test.ts:93:21)

● use-cache › should error when cookies/headers/draftMode is used inside "use cache"

page.goto: Timeout 60000ms exceeded.
Call log:
  - navigating to "http://localhost:42331/errors", waiting until "load"

  282 |     opts?.beforePageLoad?.(page)
  283 |
> 284 |     await page.goto(url, { waitUntil: 'load' })
      |                ^
  285 |   }
  286 |
  287 |   back(options) {

  at BrowserInterface.goto (lib/browsers/playwright.ts:284:16)
  at webdriver (lib/next-webdriver.ts:136:3)
  at Object.<anonymous> (e2e/app-dir/use-cache/use-cache.test.ts:101:21)

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

pnpm test-dev test/e2e/app-dir/static-shell-debugging/static-shell-debugging.test.ts

  • static-shell-debugging > ppr = true, debugging = true > should only render the static shell
  • static-shell-debugging > ppr = true, debugging = true > should skip hydration to avoid blanking out the page
Expand output

● static-shell-debugging › ppr = true, debugging = true › should only render the static shell

thrown: "Exceeded timeout of 120000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  24 |
  25 |     if (context.debugging && context.ppr) {
> 26 |       it('should only render the static shell', async () => {
     |       ^
  27 |         const res = await next.fetch('/?__nextppronly=1')
  28 |         expect(res.status).toBe(200)
  29 |

  at it (e2e/app-dir/static-shell-debugging/static-shell-debugging.test.ts:26:7)
      at Array.forEach (<anonymous>)
  at e2e/app-dir/static-shell-debugging/static-shell-debugging.test.ts:7:4
  at Object.describe (e2e/app-dir/static-shell-debugging/static-shell-debugging.test.ts:3:1)

● static-shell-debugging › ppr = true, debugging = true › should skip hydration to avoid blanking out the page

page.goto: Timeout 60000ms exceeded.
Call log:
  - navigating to "http://localhost:33503/?__nextppronly=1", waiting until "load"

  282 |     opts?.beforePageLoad?.(page)
  283 |
> 284 |     await page.goto(url, { waitUntil: 'load' })
      |                ^
  285 |   }
  286 |
  287 |   back(options) {

  at BrowserInterface.goto (lib/browsers/playwright.ts:284:16)
  at webdriver (lib/next-webdriver.ts:136:3)
  at Object.<anonymous> (e2e/app-dir/static-shell-debugging/static-shell-debugging.test.ts:38:27)

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

pnpm test-start test/e2e/persistent-caching/persistent-caching.test.ts

  • persistent-caching > should allow to change files while stopped
Expand output

● persistent-caching › should allow to change files while stopped

thrown: "Exceeded timeout of 120000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  60 |   })
  61 |
> 62 |   it('should allow to change files while stopped', async () => {
     |   ^
  63 |     {
  64 |       const browser = await next.browser('/')
  65 |       expect(await browser.elementByCss('p').text()).toBe('hello world')

  at it (e2e/persistent-caching/persistent-caching.test.ts:62:3)
  at Object.describe (e2e/persistent-caching/persistent-caching.test.ts:4:1)

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

@ijjk
Copy link
Member

ijjk commented Dec 11, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General
vercel/next.js canary vercel/next.js update/react/79ddf5b5-20241210 Change
buildDuration 24.1s 21.9s N/A
buildDurationCached 19.9s 17.5s N/A
nodeModulesSize 410 MB 410 MB N/A
nextStartRea..uration (ms) 577ms 575ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js update/react/79ddf5b5-20241210 Change
1187-HASH.js gzip 50.9 kB 50.9 kB
8276.HASH.js gzip 169 B 168 B N/A
8377-HASH.js gzip 5.36 kB 5.36 kB N/A
bccd1874-HASH.js gzip 53 kB 52.9 kB N/A
framework-HASH.js gzip 57.5 kB 57.5 kB N/A
main-app-HASH.js gzip 232 B 235 B N/A
main-HASH.js gzip 34.1 kB 34 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 50.9 kB 50.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js update/react/79ddf5b5-20241210 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 update/react/79ddf5b5-20241210 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.49 kB 4.49 kB N/A
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.35 kB 2.34 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 update/react/79ddf5b5-20241210 Change
_buildManifest.js gzip 749 B 746 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js update/react/79ddf5b5-20241210 Change
index.html gzip 524 B 524 B
link.html gzip 539 B 538 B N/A
withRouter.html gzip 519 B 520 B N/A
Overall change 524 B 524 B
Edge SSR bundle Size
vercel/next.js canary vercel/next.js update/react/79ddf5b5-20241210 Change
edge-ssr.js gzip 128 kB 128 kB N/A
page.js gzip 204 kB 204 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary vercel/next.js update/react/79ddf5b5-20241210 Change
middleware-b..fest.js gzip 671 B 667 B N/A
middleware-r..fest.js gzip 155 B 156 B N/A
middleware.js gzip 31.2 kB 31.2 kB N/A
edge-runtime..pack.js gzip 844 B 844 B
Overall change 844 B 844 B
Next Runtimes Overall increase ⚠️
vercel/next.js canary vercel/next.js update/react/79ddf5b5-20241210 Change
523-experime...dev.js gzip 322 B 322 B
523.runtime.dev.js gzip 314 B 314 B
app-page-exp...dev.js gzip 323 kB 323 kB N/A
app-page-exp..prod.js gzip 127 kB 127 kB N/A
app-page-tur..prod.js gzip 140 kB 140 kB N/A
app-page-tur..prod.js gzip 135 kB 136 kB ⚠️ +353 B
app-page.run...dev.js gzip 314 kB 314 kB ⚠️ +525 B
app-page.run..prod.js gzip 123 kB 123 kB ⚠️ +182 B
app-route-ex...dev.js gzip 37.4 kB 37.4 kB
app-route-ex..prod.js gzip 25.5 kB 25.5 kB
app-route-tu..prod.js gzip 25.5 kB 25.5 kB
app-route-tu..prod.js gzip 25.3 kB 25.3 kB
app-route.ru...dev.js gzip 39 kB 39 kB N/A
app-route.ru..prod.js gzip 25.3 kB 25.3 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.7 kB 21.7 kB
pages.runtim...dev.js gzip 27.4 kB 27.4 kB
pages.runtim..prod.js gzip 21.7 kB 21.7 kB
server.runti..prod.js gzip 916 kB 916 kB N/A
Overall change 813 kB 814 kB ⚠️ +1.06 kB
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js update/react/79ddf5b5-20241210 Change
0.pack gzip 2.05 MB 2.05 MB ⚠️ +2.43 kB
index.pack gzip 72.1 kB 72.6 kB ⚠️ +467 B
Overall change 2.12 MB 2.13 MB ⚠️ +2.9 kB
Diff details
Diff for 1187-HASH.js

Diff too large to display

Diff for bccd1874-HASH.js
@@ -1,13 +1,13 @@
 "use strict";
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
-  [7629],
+  [1758],
   {
-    /***/ 641: /***/ (
+    /***/ 8699: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
     ) => {
-      /* provided dependency */ var process = __webpack_require__(6611);
+      /* provided dependency */ var process = __webpack_require__(9829);
       /**
        * @license React
        * react-dom-client.production.js
@@ -22,9 +22,9 @@
  Modernizr 3.0.0pre (Custom Build) | MIT
 */
 
-      var Scheduler = __webpack_require__(8684),
-        React = __webpack_require__(1446),
-        ReactDOM = __webpack_require__(8307);
+      var Scheduler = __webpack_require__(462),
+        React = __webpack_require__(228),
+        ReactDOM = __webpack_require__(9221);
       function formatProdErrorMessage(code) {
         var url = "https://react.dev/errors/" + code;
         if (1 < arguments.length) {
@@ -16111,14 +16111,14 @@
       };
       var isomorphicReactPackageVersion$jscomp$inline_1683 = React.version;
       if (
-        "19.0.0-rc-7283a213-20241206" !==
+        "19.0.0-rc-79ddf5b5-20241210" !==
         isomorphicReactPackageVersion$jscomp$inline_1683
       )
         throw Error(
           formatProdErrorMessage(
             527,
             isomorphicReactPackageVersion$jscomp$inline_1683,
-            "19.0.0-rc-7283a213-20241206"
+            "19.0.0-rc-79ddf5b5-20241210"
           )
         );
       ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16140,11 +16140,10 @@
       };
       var internals$jscomp$inline_2159 = {
         bundleType: 0,
-        version: "19.0.0-rc-7283a213-20241206",
+        version: "19.0.0-rc-79ddf5b5-20241210",
         rendererPackageName: "react-dom",
         currentDispatcherRef: ReactSharedInternals,
-        findFiberByHostInstance: getClosestInstanceFromNode,
-        reconcilerVersion: "19.0.0-rc-7283a213-20241206",
+        reconcilerVersion: "19.0.0-rc-79ddf5b5-20241210",
       };
       if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
         var hook$jscomp$inline_2160 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16252,7 +16251,7 @@
         listenToAllSupportedEvents(container);
         return new ReactDOMHydrationRoot(initialChildren);
       };
-      exports.version = "19.0.0-rc-7283a213-20241206";
+      exports.version = "19.0.0-rc-79ddf5b5-20241210";
 
       /***/
     },
Diff for main-HASH.js

Diff too large to display

Diff for app-page-exp..ntime.dev.js
failed to diff
Diff for app-page-exp..time.prod.js

Diff too large to display

Diff for app-page-tur..time.prod.js

Diff too large to display

Diff for app-page-tur..time.prod.js

Diff too large to display

Diff for app-page.runtime.dev.js
failed to diff
Diff for app-page.runtime.prod.js

Diff too large to display

Diff for server.runtime.prod.js
failed to diff
Commit: 77ee504

@eps1lon eps1lon force-pushed the update/react/79ddf5b5-20241210 branch from 9ca18b7 to 77ee504 Compare December 16, 2024 12:43
@ijjk ijjk added the tests label Dec 17, 2024
unstubbable added a commit to unstubbable/react that referenced this pull request Dec 18, 2024
Before calling `emitTimingChunk` inside of `forwardDebugInfo`, we must
not increment `request.pendingChunks`, as this is already done inside of
the `emitTimingChunk` function.

I don't have a unit test for this, but manually verified that this fixes
the hanging responses in vercel/next.js#73804.
@eps1lon
Copy link
Member

eps1lon commented Dec 18, 2024

Blocked on facebook/react#31833

@eps1lon eps1lon closed this Dec 18, 2024
unstubbable added a commit to facebook/react that referenced this pull request Dec 18, 2024
Before calling `emitTimingChunk` inside of `forwardDebugInfo`, we must
not increment `request.pendingChunks`, as this is already done inside of
the `emitTimingChunk` function.

I don't have a unit test for this, but manually verified that this fixes
the hanging responses in vercel/next.js#73804.
@github-actions github-actions bot added the locked label Jan 2, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants