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

Infinite index page reload #55389

Closed
1 task done
4zuko opened this issue Sep 14, 2023 · 1 comment · Fixed by #55416
Closed
1 task done

Infinite index page reload #55389

4zuko opened this issue Sep 14, 2023 · 1 comment · Fixed by #55416
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked

Comments

@4zuko
Copy link

4zuko commented Sep 14, 2023

Link to the code that reproduces this issue or a replay of the bug

https://github.com/4zuko/next-example-infinite-reload

To Reproduce

  1. Start the application in development (next dev)
  2. Visit http://localhost:3000/base-path

Current vs. Expected behavior

Current: The page is loaded but is stuck in an infinite reload loop.
Expected: The page should just load.

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 22.4.0: Mon Mar  6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64
Binaries:
  Node: 18.17.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.6.12
Relevant Packages:
  next: 13.4.19
  eslint-config-next: 13.4.19
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: standalone

Which area(s) are affected? (Select all that apply)

Not sure

Additional context

  • The example uses Pages Router
  • The bug can be reproduced in next.js versions >=13.4.13

NEXT-1618

@4zuko 4zuko added the bug Issue was opened via the bug report template. label Sep 14, 2023
@balazsorban44 balazsorban44 added the linear: next Confirmed issue that is tracked by the Next.js team. label Sep 14, 2023
@kodiakhq kodiakhq bot closed this as completed in #55416 Sep 15, 2023
kodiakhq bot pushed a commit that referenced this issue Sep 15, 2023
### What?
`_devPagesManifest.json` and `_devMiddlewareManifest.json` will fail to load when using an asset prefix. In conjunction with i18n, this causes the app to get caught in an infinite load loop. 

### Why?
We're expecting these paths to be exact matches but when there's an assetPrefix specified, they won't be matched. 

### How?
This copies similar behavior to how we handle [`webpack-hmr`](https://github.com/vercel/next.js/blob/2e2211d27b3f0ff1cff5553453df4cf391996163/packages/next/src/server/lib/router-server.ts#L681) by doing a partial match on the URL when serving it

Closes NEXT-1618
Fixes #55389
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants