Skip to content

fix: non-ASCII page names returning 404 under SSR#89572

Draft
bgub wants to merge 1 commit intovercel:canaryfrom
bgub:fix/non-ascii-page-names
Draft

fix: non-ASCII page names returning 404 under SSR#89572
bgub wants to merge 1 commit intovercel:canaryfrom
bgub:fix/non-ascii-page-names

Conversation

@bgub
Copy link
Contributor

@bgub bgub commented Feb 6, 2026

Fixes #10084

Summary

  • fix route matching and filesystem resolution so encoded UTF-8 pathnames map correctly to non-ASCII page filenames during SSR
  • add App Router e2e coverage for encoded/decoded non-ASCII static routes, dynamic routes, and client navigation
  • add Pages Router e2e regression coverage that reproduces issue Pages with utf-8 name don't work properly under SSR #10084 (pages/тест) and verifies SSR + client navigation

Testing

  • pnpm test-dev-turbo test/e2e/app-dir/non-ascii-page-name/non-ascii-page-name.test.ts
  • pnpm test-dev-turbo test/e2e/non-ascii-page-name-pages-router/non-ascii-page-name-pages-router.test.ts
  • pnpm test-dev-webpack test/e2e/non-ascii-page-name-pages-router/non-ascii-page-name-pages-router.test.ts

@nextjs-bot
Copy link
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: d5ec3fd

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Feb 6, 2026

Allow CI Workflow Run

  • approve CI run for commit: c1d98ef

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@bgub bgub changed the title Fix non-ASCII page names returning 404 under SSR fix: non-ASCII page names returning 404 under SSR Feb 14, 2026
@bgub bgub force-pushed the fix/non-ascii-page-names branch from d5ec3fd to 29cff8a Compare March 7, 2026 03:29
Add decode fallbacks in route matching, filesystem checks, and segment
cache encoding so pages with non-ASCII names (e.g. Cyrillic, Arabic,
Japanese) resolve correctly in both dev and production modes.

Includes App Router and Pages Router e2e test coverage.

Fixes vercel#10084
@bgub bgub force-pushed the fix/non-ascii-page-names branch from 29cff8a to c1d98ef Compare March 7, 2026 03:30
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Mar 7, 2026

Failing test suites

Commit: c1d98ef | About building and testing Next.js

pnpm test-start test/e2e/app-dir/non-ascii-page-name/non-ascii-page-name.test.ts (job)

  • non-ascii-page-name > should render a static page with non-ASCII name via encoded URL (DD)
  • non-ascii-page-name > should render a static page with non-ASCII name via decoded URL (DD)
  • non-ascii-page-name > should render a dynamic route with non-ASCII static segment (DD)
  • non-ascii-page-name > should client-side navigate to a non-ASCII page (DD)
  • non-ascii-page-name > should client-side navigate to a dynamic route with non-ASCII segment (DD)
Expand output

● non-ascii-page-name › should render a static page with non-ASCII name via encoded URL

next build failed with code/signal 1

   97 |             if (code || signal)
   98 |               reject(
>  99 |                 new Error(
      |                 ^
  100 |                   `next build failed with code/signal ${code || signal}`
  101 |                 )
  102 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:99:17)

● non-ascii-page-name › should render a static page with non-ASCII name via decoded URL

next build failed with code/signal 1

   97 |             if (code || signal)
   98 |               reject(
>  99 |                 new Error(
      |                 ^
  100 |                   `next build failed with code/signal ${code || signal}`
  101 |                 )
  102 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:99:17)

● non-ascii-page-name › should render a dynamic route with non-ASCII static segment

next build failed with code/signal 1

   97 |             if (code || signal)
   98 |               reject(
>  99 |                 new Error(
      |                 ^
  100 |                   `next build failed with code/signal ${code || signal}`
  101 |                 )
  102 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:99:17)

● non-ascii-page-name › should client-side navigate to a non-ASCII page

next build failed with code/signal 1

   97 |             if (code || signal)
   98 |               reject(
>  99 |                 new Error(
      |                 ^
  100 |                   `next build failed with code/signal ${code || signal}`
  101 |                 )
  102 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:99:17)

● non-ascii-page-name › should client-side navigate to a dynamic route with non-ASCII segment

next build failed with code/signal 1

   97 |             if (code || signal)
   98 |               reject(
>  99 |                 new Error(
      |                 ^
  100 |                   `next build failed with code/signal ${code || signal}`
  101 |                 )
  102 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:99:17)

pnpm test-dev-turbo test/development/dev-indicator/dev-rendering-indicator.test.ts (turbopack) (job)

  • Dev Rendering Indicator > Shows build indicator when page is built from modifying (DD)
Expand output

● Dev Rendering Indicator › Shows build indicator when page is built from modifying

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

- Expected  - 1
+ Received  + 1

  Object {
-   "showedRenderingIndicator": true,
+   "showedRenderingIndicator": false,
  }

  42 |
  43 |     const showedRenderingIndicator = await browser.eval('window.showedBuilder')
> 44 |     expect({ showedRenderingIndicator }).toEqual({
     |                                          ^
  45 |       showedRenderingIndicator: true,
  46 |     })
  47 |   })

  at Object.toEqual (development/dev-indicator/dev-rendering-indicator.test.ts:44:42)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pages with utf-8 name don't work properly under SSR

2 participants