next.js: Next 9 Routing: Requested and resolved page mismatch

Bug report

Describe the bug

We encountered an error that isn’t especially actionable as a consumer. It would be helpful to either provide more context in the error so it’s easier to understand what went wrong, or make the error explain more what we need to do to solve the problem.

It appears to have happened when trying to route /. with Next 9 routing in SSR, though I cannot seem to reproduce it. We have a corresponding /index page as well as a /[foo] page if that’s of any help.

I’ll try to collect more information if it happens again, but I thought it’d be good to know about since it is puzzling.

Expected behavior

Not sure to be honest.

System information

  • Version of Next.js: 9.1.4

Additional context

Log Dump

Handling request for /.

Error: Requested and resolved page mismatch
at Object.normalizePagePath (<project>/node_modules/next/dist/next-server/server/normalize-page-path.js:16:15)
at getPagePath (<project>/node_modules/next/dist/next-server/server/require.js:22:38)
at Object.requirePage (<project>/node_modules/next/dist/next-server/server/require.js:43:22)
at Object.loadComponents (<project>/node_modules/next/dist/next-server/server/load-components.js:24:36)
at Server.findPageComponents (<project>/node_modules/next/dist/next-server/server/next-server.js:457:40)
at Server.renderToHTML (<project>/node_modules/next/dist/next-server/server/next-server.js:553:21)
at Server.render (<project>/node_modules/next/dist/next-server/server/next-server.js:433:33)
at Object.fn (<project>/node_modules/next/dist/next-server/server/next-server.js:311:32)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Router.execute (<project>/node_modules/next/dist/next-server/server/router.js:25:32)
at async Server.run (<project>/node_modules/next/dist/next-server/server/next-server.js:406:29)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 21 (10 by maintainers)

Most upvoted comments

Recently frequent

Posting a stacktrace is not helpful.

As said

We can’t investigate without a clear and concise reproduction.