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

Fix server action edge redirect with middleware rewrite #67148

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Jun 24, 2024

What

Add isEdgeRendering check condition for rewrite logic in edge adpator

Fixes #66837
Closes NEXT-3545

Why

From headers x-middleware-rewrite, it's still relative url /rewrite, reconstructing the url will lead to crash as it doesn't contain host.

@@ -300,7 +299,7 @@ export async function adapter(
* a data URL if the request was a data request.
*/
const rewrite = response?.headers.get('x-middleware-rewrite')
if (response && rewrite) {
if (response && rewrite && !isEdgeRendering) {
Copy link
Member Author

@huozhi huozhi Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aligning with redirect logic here using !isEdgeRendering.

I think we might able to delete these re-construction here later as web/adapater should always for edge runtime? but this time keep the fix simple cc @ijjk @ztanner

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is only necessary because we use this adapter in

where we don't know yet what runtime we have.

So I guess we just abstracted too early and templates/middleware.ts should use a different adapter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked the __BUILD_MANIFEST is not avialble in middleware, I guess that's what it was trying to do there. Probably can give a different flag later to identify which is middleware and which are other normal edge functions

@ijjk
Copy link
Member

ijjk commented Jun 24, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
buildDuration 19.2s 16.2s N/A
buildDurationCached 9.1s 7.8s N/A
nodeModulesSize 359 MB 359 MB ⚠️ +220 B
nextStartRea..uration (ms) 440ms 432ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
3377.HASH.js gzip 168 B 168 B
6561-HASH.js gzip 36 kB 36 kB N/A
7908-HASH.js gzip 5.06 kB 5.07 kB N/A
7ba1ee62-HASH.js gzip 51.7 kB 51.7 kB N/A
framework-HASH.js gzip 56.7 kB 56.7 kB N/A
main-app-HASH.js gzip 221 B 217 B N/A
main-HASH.js gzip 32.2 kB 32.2 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 168 B 168 B
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
_app-HASH.js gzip 192 B 192 B
_error-HASH.js gzip 192 B 191 B N/A
amp-HASH.js gzip 511 B 511 B
css-HASH.js gzip 340 B 342 B N/A
dynamic-HASH.js gzip 2.53 kB 2.52 kB N/A
edge-ssr-HASH.js gzip 265 B 266 B N/A
head-HASH.js gzip 361 B 363 B N/A
hooks-HASH.js gzip 389 B 389 B
image-HASH.js gzip 4.27 kB 4.27 kB N/A
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.69 kB 2.69 kB N/A
routerDirect..HASH.js gzip 327 B 324 B N/A
script-HASH.js gzip 395 B 394 B N/A
withRouter-HASH.js gzip 322 B 321 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 1.47 kB 1.47 kB
Client Build Manifests
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
_buildManifest.js gzip 485 B 482 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
index.html gzip 522 B 522 B
link.html gzip 536 B 537 B N/A
withRouter.html gzip 519 B 519 B
Overall change 1.04 kB 1.04 kB
Edge SSR bundle Size
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
edge-ssr.js gzip 127 kB 127 kB N/A
page.js gzip 167 kB 167 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
middleware-b..fest.js gzip 660 B 658 B N/A
middleware-r..fest.js gzip 155 B 154 B N/A
middleware.js gzip 29.5 kB 29.5 kB N/A
edge-runtime..pack.js gzip 1.03 kB 1.03 kB
Overall change 1.03 kB 1.03 kB
Next Runtimes
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
app-page-exp...dev.js gzip 184 kB 184 kB
app-page-exp..prod.js gzip 112 kB 112 kB
app-page-tur..prod.js gzip 123 kB 123 kB
app-page-tur..prod.js gzip 119 kB 119 kB
app-page.run...dev.js gzip 178 kB 178 kB
app-page.run..prod.js gzip 109 kB 109 kB
app-route-ex...dev.js gzip 23.4 kB 23.4 kB
app-route-ex..prod.js gzip 18.8 kB 18.8 kB
app-route-tu..prod.js gzip 18.8 kB 18.8 kB
app-route-tu..prod.js gzip 18.6 kB 18.6 kB
app-route.ru...dev.js gzip 24.6 kB 24.6 kB
app-route.ru..prod.js gzip 18.6 kB 18.6 kB
pages-api-tu..prod.js gzip 9.55 kB 9.55 kB
pages-api.ru...dev.js gzip 9.82 kB 9.82 kB
pages-api.ru..prod.js gzip 9.55 kB 9.55 kB
pages-turbo...prod.js gzip 21.6 kB 21.6 kB
pages.runtim...dev.js gzip 22.1 kB 22.1 kB
pages.runtim..prod.js gzip 21.6 kB 21.6 kB
server.runti..prod.js gzip 51.7 kB 51.7 kB
Overall change 1.09 MB 1.09 MB
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js fix/middleware-rewrite-sa-redirect Change
0.pack gzip 1.67 MB 1.67 MB N/A
index.pack gzip 129 kB 129 kB ⚠️ +587 B
Overall change 129 kB 129 kB ⚠️ +587 B
Diff details
Diff for page.js
@@ -15,7 +15,7 @@
       /***/
     },
 
-    /***/ 2575: /***/ (
+    /***/ 713: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -30,7 +30,7 @@
         default: () => /* binding */ nHandler,
       });
 
-      // NAMESPACE OBJECT: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsSGIUlb%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // NAMESPACE OBJECT: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsSGIUlb%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       var page_next_edge_ssr_entry_namespaceObject = {};
       __webpack_require__.r(page_next_edge_ssr_entry_namespaceObject);
       __webpack_require__.d(page_next_edge_ssr_entry_namespaceObject, {
@@ -70,35 +70,35 @@
         tree: () => tree,
       });
 
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/web/globals.js
-      var globals = __webpack_require__(1567);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
-      var adapter = __webpack_require__(8537);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 87 modules
-      var render = __webpack_require__(8611);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 3 modules
-      var incremental_cache = __webpack_require__(5097);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/app-render/app-render.js + 51 modules
-      var app_render = __webpack_require__(5762);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
-      var module_compiled = __webpack_require__(676);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/route-kind.js
-      var route_kind = __webpack_require__(5902);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/client/components/error-boundary.js
-      var error_boundary = __webpack_require__(9916);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/app-render/entry-base.js + 10 modules
-      var entry_base = __webpack_require__(5348); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsSGIUlb%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/web/globals.js
+      var globals = __webpack_require__(2030);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
+      var adapter = __webpack_require__(7857);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 87 modules
+      var render = __webpack_require__(6983);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 3 modules
+      var incremental_cache = __webpack_require__(7604);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/app-render/app-render.js + 51 modules
+      var app_render = __webpack_require__(9488);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
+      var module_compiled = __webpack_require__(2909);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/route-kind.js
+      var route_kind = __webpack_require__(4964);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/client/components/error-boundary.js
+      var error_boundary = __webpack_require__(4618);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/app-render/entry-base.js + 10 modules
+      var entry_base = __webpack_require__(3648); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsSGIUlb%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       const component0 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 7815)
+          __webpack_require__.bind(__webpack_require__, 6409)
         );
       const component1 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 1252)
+          __webpack_require__.bind(__webpack_require__, 6570)
         );
       const page2 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 3396)
+          __webpack_require__.bind(__webpack_require__, 4714)
         );
 
       // We inject the tree and pages here so that we can use them in the route
@@ -164,12 +164,12 @@
       });
 
       //# sourceMappingURL=app-page.js.map
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/lib/page-types.js
-      var page_types = __webpack_require__(1866);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/app-render/encryption-utils.js
-      var encryption_utils = __webpack_require__(1863);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/esm/server/app-render/action-utils.js
-      var action_utils = __webpack_require__(5372); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAwLCJjb25maWdPcmlnaW4iOiJuZXh0LmNvbmZpZy5qcyIsInVzZUZpbGVTeXN0ZW1QdWJsaWNSb3V0ZXMiOnRydWUsImdlbmVyYXRlRXRhZ3MiOnRydWUsInBhZ2VFeHRlbnNpb25zIjpbInRzeCIsInRzIiwianN4IiwianMiXSwicG93ZXJlZEJ5SGVhZGVyIjp0cnVlLCJjb21wcmVzcyI6dHJ1ZSwiaW1hZ2VzIjp7ImRldmljZVNpemVzIjpbNjQwLDc1MCw4MjgsMTA4MCwxMjAwLDE5MjAsMjA0OCwzODQwXSwiaW1hZ2VTaXplcyI6WzE2LDMyLDQ4LDY0LDk2LDEyOCwyNTYsMzg0XSwicGF0aCI6Ii9fbmV4dC9pbWFnZSIsImxvYWRlciI6ImRlZmF1bHQiLCJsb2FkZXJ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areConfig":"e30="}!
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/lib/page-types.js
+      var page_types = __webpack_require__(2055);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/app-render/encryption-utils.js
+      var encryption_utils = __webpack_require__(9032);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/esm/server/app-render/action-utils.js
+      var action_utils = __webpack_require__(3314); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAwLCJjb25maWdPcmlnaW4iOi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HJpdmF0ZS1uZXh0LWFwcC1kaXIlMkZhcHAtZWRnZS1zc3IlMkZwYWdlLmpzJmFwcERpcj0lMkZ0bXAlMkZuZXh0LXN0YXRzU0dJVWxiJTJGc3RhdHMtYXBwJTJGYXBwJmFwcFBhdGhzPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZUV4dGVuc2lvbnM9dHN4JnBhZ2VFeHRlbnNpb25zPXRzJnBhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JnByZWZlcnJlZFJlZ2lvbj0mbWlkZGxld2FyZUNvbmZpZz1lMzAlM0Qh","sriEnabled":false,"middlewareConfig":"e30="}!
       var _self___RSC_MANIFEST;
 
       const incrementalCacheHandler = null;
@@ -428,47 +428,47 @@
       /***/
     },
 
-    /***/ 1147: /***/ (
+    /***/ 2116: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4877)
+        __webpack_require__.bind(__webpack_require__, 3475)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3594)
+        __webpack_require__.bind(__webpack_require__, 4242)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9991)
+        __webpack_require__.bind(__webpack_require__, 2792)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9492)
+        __webpack_require__.bind(__webpack_require__, 3877)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3467)
+        __webpack_require__.bind(__webpack_require__, 1138)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 6075)
+        __webpack_require__.bind(__webpack_require__, 8752)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4001)
+        __webpack_require__.bind(__webpack_require__, 4199)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 5091)
+        __webpack_require__.bind(__webpack_require__, 394)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4442)
+        __webpack_require__.bind(__webpack_require__, 3202)
       );
 
       /***/
     },
 
-    /***/ 5126: /***/ () => {
+    /***/ 6035: /***/ () => {
       /***/
     },
 
-    /***/ 3396: /***/ (
+    /***/ 4714: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -488,7 +488,7 @@
       /***/
     },
 
-    /***/ 7815: /***/ (
+    /***/ 6409: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -500,7 +500,7 @@
         /* harmony export */
       });
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(3189);
+        __webpack_require__(4382);
 
       function RootLayout({ children }) {
         return /*#__PURE__*/ (0,
@@ -519,7 +519,7 @@
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
-    /******/ __webpack_require__.O(0, [877, 192], () => __webpack_exec__(2575));
+    /******/ __webpack_require__.O(0, [223, 182], () => __webpack_exec__(713));
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ (_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)[
       "middleware_app/app-edge-ssr/page"
Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js

Diff too large to display

Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [8358],
   {
-    /***/ 774: /***/ (
+    /***/ 3834: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(482);
+          return __webpack_require__(5458);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 9611: /***/ (module, exports, __webpack_require__) => {
+    /***/ 375: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -40,15 +40,15 @@
         __webpack_require__(3537)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(6973)
+        __webpack_require__(6393)
       );
-      const _getimgprops = __webpack_require__(4823);
-      const _imageconfig = __webpack_require__(2356);
-      const _imageconfigcontextsharedruntime = __webpack_require__(8081);
-      const _warnonce = __webpack_require__(2683);
-      const _routercontextsharedruntime = __webpack_require__(852);
+      const _getimgprops = __webpack_require__(5446);
+      const _imageconfig = __webpack_require__(6510);
+      const _imageconfigcontextsharedruntime = __webpack_require__(2630);
+      const _warnonce = __webpack_require__(169);
+      const _routercontextsharedruntime = __webpack_require__(4584);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(1634)
+        __webpack_require__(4947)
       );
       // This is replaced by webpack define plugin
       const configEnv = {
@@ -376,7 +376,7 @@
       /***/
     },
 
-    /***/ 4823: /***/ (
+    /***/ 5446: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -392,9 +392,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(2683);
-      const _imageblursvg = __webpack_require__(4199);
-      const _imageconfig = __webpack_require__(2356);
+      const _warnonce = __webpack_require__(169);
+      const _imageblursvg = __webpack_require__(5411);
+      const _imageconfig = __webpack_require__(6510);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -769,7 +769,7 @@
       /***/
     },
 
-    /***/ 4199: /***/ (__unused_webpack_module, exports) => {
+    /***/ 5411: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -824,7 +824,7 @@
       /***/
     },
 
-    /***/ 1104: /***/ (
+    /***/ 2870: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -851,10 +851,10 @@
         },
       });
       const _interop_require_default = __webpack_require__(1478);
-      const _getimgprops = __webpack_require__(4823);
-      const _imagecomponent = __webpack_require__(9611);
+      const _getimgprops = __webpack_require__(5446);
+      const _imagecomponent = __webpack_require__(375);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(1634)
+        __webpack_require__(4947)
       );
       function getImageProps(imgProps) {
         const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -886,7 +886,7 @@
       /***/
     },
 
-    /***/ 1634: /***/ (__unused_webpack_module, exports) => {
+    /***/ 4947: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -921,7 +921,7 @@
       /***/
     },
 
-    /***/ 482: /***/ (
+    /***/ 5458: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -938,8 +938,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/[email protected]/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(898);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_vrduafyijdumnv5m4yyxi35vzu/node_modules/next/image.js
-      var next_image = __webpack_require__(4064);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-6230622a1a-20240610_react_66pum5zqjmu66dbgsbrnmwmucy/node_modules/next/image.js
+      var next_image = __webpack_require__(3515);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
       /* harmony default export */ const nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -969,12 +969,12 @@
       /***/
     },
 
-    /***/ 4064: /***/ (
+    /***/ 3515: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(1104);
+      module.exports = __webpack_require__(2870);
 
       /***/
     },
@@ -984,7 +984,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
-      __webpack_exec__(774)
+      __webpack_exec__(3834)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Commit: 05b3f7d

@ijjk
Copy link
Member

ijjk commented Jun 24, 2024

Failing test suites

Commit: 6061936

TURBOPACK=1 pnpm test-start test/e2e/skip-trailing-slash-redirect/index.test.ts (turbopack)

  • skip-trailing-slash-redirect > should correct skip URL normalizing in middleware
Expand output

● skip-trailing-slash-redirect › should correct skip URL normalizing in middleware

TypeError: Cannot read properties of null (reading 'endsWith')

  301 |       { redirect: 'manual', headers: { 'x-nextjs-data': '1' } }
  302 |     )
> 303 |     expect(res.headers.get('x-nextjs-rewrite').endsWith('/another/')).toBe(true)
      |                            ^
  304 |
  305 |     res = await fetchViaHTTP(
  306 |       next.url,

  at Object.<anonymous> (e2e/skip-trailing-slash-redirect/index.test.ts:303:28)

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

pnpm test-start test/e2e/middleware-trailing-slash/test/index.test.ts

  • Middleware Runtime trailing slash > should have correct query values for rewrite to ssg page
  • Middleware Runtime trailing slash > should have correct dynamic route params for middleware rewrite to dynamic route
  • Middleware Runtime trailing slash > should have correct route params for chained rewrite from middleware to config rewrite
Expand output

● Middleware Runtime trailing slash › should have correct query values for rewrite to ssg page

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

- Expected  - 1
+ Received  + 0

  Object {
-   "from": "middleware",
    "slug": "hello",
  }

  181 |       await check(() => browser.elementByCss('body').text(), /\/to-ssg/)
  182 |
> 183 |       expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({
      |                                                                       ^
  184 |         from: 'middleware',
  185 |         slug: 'hello',
  186 |       })

  at Object.toEqual (e2e/middleware-trailing-slash/test/index.test.ts:183:71)

● Middleware Runtime trailing slash › should have correct dynamic route params for middleware rewrite to dynamic route

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

- Expected  - 4
+ Received  + 1

- Object {
-   "slug": "from-middleware",
-   "some": "middleware",
- }
+ Object {}

  246 |       await browser.waitForElementByCss('#blog')
  247 |
> 248 |       expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({
      |                                                                       ^
  249 |         slug: 'from-middleware',
  250 |         some: 'middleware',
  251 |       })

  at Object.toEqual (e2e/middleware-trailing-slash/test/index.test.ts:248:71)

● Middleware Runtime trailing slash › should have correct route params for chained rewrite from middleware to config rewrite

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

- Expected  - 5
+ Received  + 1

- Object {
-   "hello": "config",
-   "slug": "middleware-rewrite",
-   "some": "middleware",
- }
+ Object {}

  275 |       await browser.waitForElementByCss('#blog')
  276 |
> 277 |       expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({
      |                                                                       ^
  278 |         slug: 'middleware-rewrite',
  279 |         hello: 'config',
  280 |         some: 'middleware',

  at Object.toEqual (e2e/middleware-trailing-slash/test/index.test.ts:277:71)

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

pnpm test-dev test/development/middleware-errors/index.test.ts

  • middleware - development errors > when there is a compilation error after boot > logs the error correctly
Expand output

● middleware - development errors › when there is a compilation error after boot › logs the error correctly

TIMED OUT: success

undefined

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

Expected: 2
Received: 3

  699 |
  700 |   if (hardError) {
> 701 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  702 |   }
  703 |   return false
  704 | }

  at check (lib/next-test-utils.ts:701:11)
  at Object.<anonymous> (development/middleware-errors/index.test.ts:294:7)

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

TURBOPACK=1 pnpm test-start test/e2e/middleware-redirects/test/index.test.ts (turbopack)

  • Middleware Redirect > does not include the locale in redirects by default
  • Middleware Redirect > should redirect to data urls with data requests and internal redirects
  • Middleware Redirect > should redirect to external urls with data requests and external redirects
  • Middleware Redirect > should redirect
  • Middleware Redirect > should redirect cleanly with the original url param
  • Middleware Redirect > should redirect multiple times
  • Middleware Redirect > should redirect (infinite-loop)
  • Middleware Redirect > should redirect to api route with locale
  • Middleware Redirect > should redirect with a fragment
  • Middleware Redirect > /fr should redirect
  • Middleware Redirect > /fr should redirect cleanly with the original url param
  • Middleware Redirect > /fr should redirect multiple times
  • Middleware Redirect > /fr should redirect (infinite-loop)
  • Middleware Redirect > /fr should redirect to api route with locale
  • Middleware Redirect > /fr should redirect with a fragment
Expand output

● Middleware Redirect › does not include the locale in redirects by default

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

Expected: false
Received: undefined

  35 |         redirect: 'manual',
  36 |       })
> 37 |       expect(res.headers.get('location')?.endsWith('/default/about')).toEqual(
     |                                                                       ^
  38 |         false
  39 |       )
  40 |     })

  at Object.toEqual (e2e/middleware-redirects/test/index.test.ts:37:71)

● Middleware Redirect › should redirect to data urls with data requests and internal redirects

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

Expected: true
Received: undefined

  52 |           .get('x-nextjs-redirect')
  53 |           ?.endsWith(`/es/new-home?override=internal`)
> 54 |       ).toEqual(true)
     |         ^
  55 |       expect(res.headers.get('location')).toEqual(null)
  56 |     })
  57 |

  at Object.toEqual (e2e/middleware-redirects/test/index.test.ts:54:9)

● Middleware Redirect › should redirect to external urls with data requests and external redirects

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

Expected: "https://example.vercel.sh/"
Received: null

  64 |       )
  65 |
> 66 |       expect(res.headers.get('x-nextjs-redirect')).toEqual(
     |                                                    ^
  67 |         'https://example.vercel.sh/'
  68 |       )
  69 |       expect(res.headers.get('location')).toEqual(null)

  at Object.toEqual (e2e/middleware-redirects/test/index.test.ts:66:52)

● Middleware Redirect › should redirect

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

Expected: "/new-home"
Received: "/old-home"

  89 |       const browser = await webdriver(next.url, `${locale}/old-home`)
  90 |       try {
> 91 |         expect(await browser.eval(`window.location.pathname`)).toBe(
     |                                                                ^
  92 |           `${locale}/new-home`
  93 |         )
  94 |       } finally {

  at Object.toBe (e2e/middleware-redirects/test/index.test.ts:91:64)

● Middleware Redirect › should redirect cleanly with the original url param

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

Expected: "/new-home"
Received: "/blank-page?foo=bar"

  120 |             `window.location.href.replace(window.location.origin, '')`
  121 |           )
> 122 |         ).toBe(`${locale}/new-home`)
      |           ^
  123 |       } finally {
  124 |         await browser.close()
  125 |       }

  at Object.toBe (e2e/middleware-redirects/test/index.test.ts:122:11)

● Middleware Redirect › should redirect multiple times

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

Expected: "/new-home"
Received: "/redirect-me-alot"

  130 |       const browser = await webdriver(next.url, `${locale}/redirect-me-alot`)
  131 |       try {
> 132 |         expect(await browser.eval(`window.location.pathname`)).toBe(
      |                                                                ^
  133 |           `${locale}/new-home`
  134 |         )
  135 |       } finally {

  at Object.toBe (e2e/middleware-redirects/test/index.test.ts:132:64)

● Middleware Redirect › should redirect (infinite-loop)

expect(received).rejects.toThrow()

Received promise resolved instead of rejected
Resolved to value: {"size": 0, "timeout": 0, Symbol(Body internals): {"body": {"_chunkSize": 16384, "_defaultFlushFlag": 2, "_defaultFullFlushFlag": 3, "_events": {"close": [Function bound onceWrapper], "error": [[Function onerror], [Function anonymous]], "finish": [Function bound onceWrapper], "prefinish": [Function prefinish], "unpipe": [Function onunpipe]}, "_eventsCount": 5, "_finishFlushFlag": 2, "_handle": {"availInBefore": 10, "availOutBefore": 16384, "buffer": {"data": [31, 139, 8, 0, 0, 0, 0, 0, 0, 3], "type": "Buffer"}, "cb": [Function anonymous], "flushFlag": 2, "inOff": 0, "onerror": [Function zlibOnError], Symbol(owner_symbol): [Circular]}, "_info": undefined, "_level": -1, "_maxListeners": undefined, "_maxOutputLength": 4294967296, "_outBuffer": {"data": [240, 147, 5, 249, 20, 127, 0, 0, 64, 211, …], "type": "Buffer"}, "_outOffset": 0, "_readableState": {"autoDestroy": true, "awaitDrainWriters": null, "buffer": {"head": null, "length": 0, "tail": null}, "closeEmitted": false, "closed": false, "constructed": true, "dataEmitted": false, "decoder": null, "defaultEncoding": "utf8", "destroyed": false, "emitClose": true, "emittedReadable": false, "encoding": null, "endEmitted": false, "ended": false, "errorEmitted": false, "errored": null, "flowing": null, "highWaterMark": 16384, "length": 0, "multiAwaitDrain": false, "needReadable": false, "objectMode": false, "pipes": [], "readableListening": false, "reading": false, "readingMore": false, "resumeScheduled": false, "sync": false, Symbol(kPaused): null}, "_strategy": 0, "_writableState": {"afterWriteTickInfo": null, "allBuffers": true, "allNoop": true, "autoDestroy": true, "bufferProcessing": false, "buffered": [], "bufferedIndex": 0, "closeEmitted": false, "closed": false, "constructed": true, "corked": 0, "decodeStrings": true, "defaultEncoding": "utf8", "destroyed": false, "emitClose": true, "ended": false, "ending": false, "errorEmitted": false, "errored": null, "finalCalled": false, "finished": false, "highWaterMark": 16384, "length": 10, "needDrain": false, "objectMode": false, "onwrite": [Function bound onwrite], "pendingcb": 1, "prefinished": false, "sync": false, "writecb": [Function nop], "writelen": 10, "writing": true, Symbol(kOnFinished): []}, "_writeState": [0, 0], "allowHalfOpen": true, "bytesWritten": 0, Symbol(kCapture): false, Symbol(kCallback): null, Symbol(kError): null}, "disturbed": false, "error": null}, Symbol(Response internals): {"counter": 0, "headers": {Symbol(map): {"cache-control": ["no-cache, no-store, max-age=0, must-revalidate"], "connection": ["close"], "content-encoding": ["gzip"], "content-type": ["text/html; charset=utf-8"], "date": ["Mon, 24 Jun 2024 10:47:20 GMT"], "etag": ["\"yj9aqcz4so1r0\""], "transfer-encoding": ["chunked"], "vary": ["Accept-Encoding"], "x-powered-by": ["Next.js"]}}, "status": 500, "statusText": "Internal Server Error", "url": "http://localhost:36179/infinite-loop"}}

  142 |
  143 |     it(`${label}should redirect (infinite-loop)`, async () => {
> 144 |       await expect(
      |             ^
  145 |         fetchViaHTTP(next.url, `${locale}/infinite-loop`)
  146 |       ).rejects.toThrow()
  147 |     })

  at expect (../node_modules/.pnpm/[email protected]/node_modules/expect/build/index.js:113:15)
  at Object.expect (e2e/middleware-redirects/test/index.test.ts:144:13)

● Middleware Redirect › should redirect to api route with locale

thrown: "Exceeded timeout of 60000 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."

  147 |     })
  148 |
> 149 |     it(`${label}should redirect to api route with locale`, async () => {
      |     ^
  150 |       const browser = await webdriver(next.url, `${locale}`)
  151 |       await browser.elementByCss('#link-to-api-with-locale').click()
  152 |       await browser.waitForCondition('window.location.pathname === "/api/ok"')

  at it (e2e/middleware-redirects/test/index.test.ts:149:5)
  at testsWithLocale (e2e/middleware-redirects/test/index.test.ts:177:3)
  at Object.describe (e2e/middleware-redirects/test/index.test.ts:10:1)

● Middleware Redirect › should redirect with a fragment

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

Expected: "#fragment"
Received: ""

  167 |       const browser = await webdriver(next.url, `${locale}/with-fragment`)
  168 |       try {
> 169 |         expect(await browser.eval(`window.location.hash`)).toBe(`#fragment`)
      |                                                            ^
  170 |       } finally {
  171 |         await browser.close()
  172 |       }

  at Object.toBe (e2e/middleware-redirects/test/index.test.ts:169:60)

● Middleware Redirect › /fr should redirect

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

Expected: "/fr/new-home"
Received: "/fr/old-home"

  89 |       const browser = await webdriver(next.url, `${locale}/old-home`)
  90 |       try {
> 91 |         expect(await browser.eval(`window.location.pathname`)).toBe(
     |                                                                ^
  92 |           `${locale}/new-home`
  93 |         )
  94 |       } finally {

  at Object.toBe (e2e/middleware-redirects/test/index.test.ts:91:64)

● Middleware Redirect › /fr should redirect cleanly with the original url param

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

Expected: "/fr/new-home"
Received: "/fr/blank-page?foo=bar"

  120 |             `window.location.href.replace(window.location.origin, '')`
  121 |           )
> 122 |         ).toBe(`${locale}/new-home`)
      |           ^
  123 |       } finally {
  124 |         await browser.close()
  125 |       }

  at Object.toBe (e2e/middleware-redirects/test/index.test.ts:122:11)

● Middleware Redirect › /fr should redirect multiple times

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

Expected: "/fr/new-home"
Received: "/fr/redirect-me-alot"

  130 |       const browser = await webdriver(next.url, `${locale}/redirect-me-alot`)
  131 |       try {
> 132 |         expect(await browser.eval(`window.location.pathname`)).toBe(
      |                                                                ^
  133 |           `${locale}/new-home`
  134 |         )
  135 |       } finally {

  at Object.toBe (e2e/middleware-redirects/test/index.test.ts:132:64)

● Middleware Redirect › /fr should redirect (infinite-loop)

expect(received).rejects.toThrow()

Received promise resolved instead of rejected
Resolved to value: {"size": 0, "timeout": 0, Symbol(Body internals): {"body": {"_chunkSize": 16384, "_defaultFlushFlag": 2, "_defaultFullFlushFlag": 3, "_events": {"close": [Function bound onceWrapper], "error": [[Function onerror], [Function anonymous]], "finish": [Function bound onceWrapper], "prefinish": [Function prefinish], "unpipe": [Function onunpipe]}, "_eventsCount": 5, "_finishFlushFlag": 2, "_handle": {"availInBefore": 10, "availOutBefore": 16384, "buffer": {"data": [31, 139, 8, 0, 0, 0, 0, 0, 0, 3], "type": "Buffer"}, "cb": [Function anonymous], "flushFlag": 2, "inOff": 0, "onerror": [Function zlibOnError], Symbol(owner_symbol): [Circular]}, "_info": undefined, "_level": -1, "_maxListeners": undefined, "_maxOutputLength": 4294967296, "_outBuffer": {"data": [240, 147, 5, 249, 20, 127, 0, 0, 240, 147, …], "type": "Buffer"}, "_outOffset": 0, "_readableState": {"autoDestroy": true, "awaitDrainWriters": null, "buffer": {"head": null, "length": 0, "tail": null}, "closeEmitted": false, "closed": false, "constructed": true, "dataEmitted": false, "decoder": null, "defaultEncoding": "utf8", "destroyed": false, "emitClose": true, "emittedReadable": false, "encoding": null, "endEmitted": false, "ended": false, "errorEmitted": false, "errored": null, "flowing": null, "highWaterMark": 16384, "length": 0, "multiAwaitDrain": false, "needReadable": false, "objectMode": false, "pipes": [], "readableListening": false, "reading": false, "readingMore": false, "resumeScheduled": false, "sync": false, Symbol(kPaused): null}, "_strategy": 0, "_writableState": {"afterWriteTickInfo": null, "allBuffers": true, "allNoop": true, "autoDestroy": true, "bufferProcessing": false, "buffered": [], "bufferedIndex": 0, "closeEmitted": false, "closed": false, "constructed": true, "corked": 0, "decodeStrings": true, "defaultEncoding": "utf8", "destroyed": false, "emitClose": true, "ended": false, "ending": false, "errorEmitted": false, "errored": null, "finalCalled": false, "finished": false, "highWaterMark": 16384, "length": 10, "needDrain": false, "objectMode": false, "onwrite": [Function bound onwrite], "pendingcb": 1, "prefinished": false, "sync": false, "writecb": [Function nop], "writelen": 10, "writing": true, Symbol(kOnFinished): []}, "_writeState": [0, 0], "allowHalfOpen": true, "bytesWritten": 0, Symbol(kCapture): false, Symbol(kCallback): null, Symbol(kError): null}, "disturbed": false, "error": null}, Symbol(Response internals): {"counter": 0, "headers": {Symbol(map): {"cache-control": ["no-cache, no-store, max-age=0, must-revalidate"], "connection": ["close"], "content-encoding": ["gzip"], "content-type": ["text/html; charset=utf-8"], "date": ["Mon, 24 Jun 2024 10:48:24 GMT"], "etag": ["\"yj9aqcz4so1r0\""], "transfer-encoding": ["chunked"], "vary": ["Accept-Encoding"], "x-powered-by": ["Next.js"]}}, "status": 500, "statusText": "Internal Server Error", "url": "http://localhost:36179/fr/infinite-loop"}}

  142 |
  143 |     it(`${label}should redirect (infinite-loop)`, async () => {
> 144 |       await expect(
      |             ^
  145 |         fetchViaHTTP(next.url, `${locale}/infinite-loop`)
  146 |       ).rejects.toThrow()
  147 |     })

  at expect (../node_modules/.pnpm/[email protected]/node_modules/expect/build/index.js:113:15)
  at Object.expect (e2e/middleware-redirects/test/index.test.ts:144:13)

● Middleware Redirect › /fr should redirect to api route with locale

thrown: "Exceeded timeout of 60000 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."

  147 |     })
  148 |
> 149 |     it(`${label}should redirect to api route with locale`, async () => {
      |     ^
  150 |       const browser = await webdriver(next.url, `${locale}`)
  151 |       await browser.elementByCss('#link-to-api-with-locale').click()
  152 |       await browser.waitForCondition('window.location.pathname === "/api/ok"')

  at it (e2e/middleware-redirects/test/index.test.ts:149:5)
  at testsWithLocale (e2e/middleware-redirects/test/index.test.ts:178:3)
  at Object.describe (e2e/middleware-redirects/test/index.test.ts:10:1)

● Middleware Redirect › /fr should redirect with a fragment

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

Expected: "#fragment"
Received: ""

  167 |       const browser = await webdriver(next.url, `${locale}/with-fragment`)
  168 |       try {
> 169 |         expect(await browser.eval(`window.location.hash`)).toBe(`#fragment`)
      |                                                            ^
  170 |       } finally {
  171 |         await browser.close()
  172 |       }

  at Object.toBe (e2e/middleware-redirects/test/index.test.ts:169:60)

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

pnpm test-start test/e2e/middleware-general/test/index.test.ts

  • Middleware Runtime > with i18n > should have correct query values for rewrite to ssg page
  • Middleware Runtime > with i18n > should have correct dynamic route params for middleware rewrite to dynamic route
  • Middleware Runtime > with i18n > should have correct route params for chained rewrite from middleware to config rewrite
  • Middleware Runtime > without i18n > should have correct query values for rewrite to ssg page
  • Middleware Runtime > without i18n > should have correct dynamic route params for middleware rewrite to dynamic route
  • Middleware Runtime > without i18n > should have correct route params for chained rewrite from middleware to config rewrite
Expand output

● Middleware Runtime › with i18n › should have correct query values for rewrite to ssg page

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

- Expected  - 1
+ Received  + 0

  Object {
-   "from": "middleware",
    "slug": "hello",
  }

  295 |       await check(() => browser.elementByCss('body').text(), /\/to-ssg/)
  296 |
> 297 |       expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({
      |                                                                       ^
  298 |         from: 'middleware',
  299 |         slug: 'hello',
  300 |       })

  at Object.toEqual (e2e/middleware-general/test/index.test.ts:297:71)

● Middleware Runtime › with i18n › should have correct dynamic route params for middleware rewrite to dynamic route

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

- Expected  - 4
+ Received  + 1

- Object {
-   "slug": "from-middleware",
-   "some": "middleware",
- }
+ Object {}

  358 |       await browser.waitForElementByCss('#blog')
  359 |
> 360 |       expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({
      |                                                                       ^
  361 |         slug: 'from-middleware',
  362 |         some: 'middleware',
  363 |       })

  at Object.toEqual (e2e/middleware-general/test/index.test.ts:360:71)

● Middleware Runtime › with i18n › should have correct route params for chained rewrite from middleware to config rewrite

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

  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)

● Middleware Runtime › without i18n › should have correct query values for rewrite to ssg page

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

- Expected  - 1
+ Received  + 0

  Object {
-   "from": "middleware",
    "slug": "hello",
  }

  295 |       await check(() => browser.elementByCss('body').text(), /\/to-ssg/)
  296 |
> 297 |       expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({
      |                                                                       ^
  298 |         from: 'middleware',
  299 |         slug: 'hello',
  300 |       })

  at Object.toEqual (e2e/middleware-general/test/index.test.ts:297:71)

● Middleware Runtime › without i18n › should have correct dynamic route params for middleware rewrite to dynamic route

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

- Expected  - 4
+ Received  + 1

- Object {
-   "slug": "from-middleware",
-   "some": "middleware",
- }
+ Object {}

  358 |       await browser.waitForElementByCss('#blog')
  359 |
> 360 |       expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({
      |                                                                       ^
  361 |         slug: 'from-middleware',
  362 |         some: 'middleware',
  363 |       })

  at Object.toEqual (e2e/middleware-general/test/index.test.ts:360:71)

● Middleware Runtime › without i18n › should have correct route params for chained rewrite from middleware to config rewrite

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

- Expected  - 5
+ Received  + 1

- Object {
-   "hello": "config",
-   "slug": "middleware-rewrite",
-   "some": "middleware",
- }
+ Object {}

  387 |       await browser.waitForElementByCss('#blog')
  388 |
> 389 |       expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({
      |                                                                       ^
  390 |         slug: 'middleware-rewrite',
  391 |         hello: 'config',
  392 |         some: 'middleware',

  at Object.toEqual (e2e/middleware-general/test/index.test.ts:389:71)

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

TURBOPACK=1 pnpm test-start test/e2e/app-dir/app/index.test.ts (turbopack)

  • app dir - basic > server components > middleware > should strip internal query parameters from requests to middleware for rewrite
  • app dir - basic > server components > middleware > should strip internal query parameters from requests to middleware for redirect
Expand output

● app dir - basic › server components › middleware › should strip internal query parameters from requests to middleware for rewrite

thrown: "Exceeded timeout of 60000 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."

  1061 |
  1062 |     describe('middleware', () => {
> 1063 |       it.each(['rewrite', 'redirect'])(
       |                                      ^
  1064 |         `should strip internal query parameters from requests to middleware for %s`,
  1065 |         async (method) => {
  1066 |           const browser = await next.browser('/internal')

  at ../node_modules/.pnpm/[email protected]/node_modules/jest-each/build/bind.js:47:15
      at Array.forEach (<anonymous>)
  at e2e/app-dir/app/index.test.ts:1063:38
  at describe (e2e/app-dir/app/index.test.ts:1062:5)
  at describe (e2e/app-dir/app/index.test.ts:840:3)
  at Object.describe (e2e/app-dir/app/index.test.ts:11:1)

● app dir - basic › server components › middleware › should strip internal query parameters from requests to middleware for redirect

thrown: "Exceeded timeout of 60000 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."

  1061 |
  1062 |     describe('middleware', () => {
> 1063 |       it.each(['rewrite', 'redirect'])(
       |                                      ^
  1064 |         `should strip internal query parameters from requests to middleware for %s`,
  1065 |         async (method) => {
  1066 |           const browser = await next.browser('/internal')

  at ../node_modules/.pnpm/[email protected]/node_modules/jest-each/build/bind.js:47:15
      at Array.forEach (<anonymous>)
  at e2e/app-dir/app/index.test.ts:1063:38
  at describe (e2e/app-dir/app/index.test.ts:1062:5)
  at describe (e2e/app-dir/app/index.test.ts:840:3)
  at Object.describe (e2e/app-dir/app/index.test.ts:11:1)

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

__NEXT_EXPERIMENTAL_PPR=true pnpm test-start test/e2e/app-dir/app/experimental-compile.test.ts (PPR)

  • app dir - basic > server components > middleware > should strip internal query parameters from requests to middleware for rewrite
  • app dir - basic > server components > middleware > should strip internal query parameters from requests to middleware for redirect
Expand output

● app dir - basic › server components › middleware › should strip internal query parameters from requests to middleware for rewrite

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."

  1061 |
  1062 |     describe('middleware', () => {
> 1063 |       it.each(['rewrite', 'redirect'])(
       |                                      ^
  1064 |         `should strip internal query parameters from requests to middleware for %s`,
  1065 |         async (method) => {
  1066 |           const browser = await next.browser('/internal')

  at ../node_modules/.pnpm/[email protected]/node_modules/jest-each/build/bind.js:47:15
      at Array.forEach (<anonymous>)
  at e2e/app-dir/app/index.test.ts:1063:38
  at describe (e2e/app-dir/app/index.test.ts:1062:5)
  at describe (e2e/app-dir/app/index.test.ts:840:3)
  at Object.describe (e2e/app-dir/app/index.test.ts:11:1)
  at Object.require (e2e/app-dir/app/experimental-compile.test.ts:6:3)

● app dir - basic › server components › middleware › should strip internal query parameters from requests to middleware for redirect

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."

  1061 |
  1062 |     describe('middleware', () => {
> 1063 |       it.each(['rewrite', 'redirect'])(
       |                                      ^
  1064 |         `should strip internal query parameters from requests to middleware for %s`,
  1065 |         async (method) => {
  1066 |           const browser = await next.browser('/internal')

  at ../node_modules/.pnpm/[email protected]/node_modules/jest-each/build/bind.js:47:15
      at Array.forEach (<anonymous>)
  at e2e/app-dir/app/index.test.ts:1063:38
  at describe (e2e/app-dir/app/index.test.ts:1062:5)
  at describe (e2e/app-dir/app/index.test.ts:840:3)
  at Object.describe (e2e/app-dir/app/index.test.ts:11:1)
  at Object.require (e2e/app-dir/app/experimental-compile.test.ts:6:3)

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

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be in line with #49197

@huozhi huozhi enabled auto-merge (squash) June 24, 2024 13:10
@huozhi huozhi merged commit 7f72971 into canary Jun 24, 2024
87 checks passed
@huozhi huozhi deleted the fix/middleware-rewrite-sa-redirect branch June 24, 2024 13:17
@github-actions github-actions bot added the locked label Jul 9, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2024
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.

Invalid URL in middleware rewrite from edge runtime server action
3 participants