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

Statically generated dynamic route pages return 404 after manual revalidation #72920

Open
mstruckus opened this issue Nov 18, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template.

Comments

@mstruckus
Copy link

mstruckus commented Nov 18, 2024

Link to the code that reproduces this issue

https://github.com/mstruckus/next-dynamic-path-revalidation-issue

To Reproduce

  1. Build and start the application.
    • npm run build
    • npm run start
  2. Open in browser http://localhost:3000/item/3. See that page is loaded as expected.
  3. Manually revalidate the page by opening in browser http://localhost:3000/api/revalidate?path=/item/3.
  4. Open again in browser http://localhost:3000/item/3. The page does not exist anymore, 404 response is returned, which is not expected.

Current vs. Expected behavior

Current behavior - manually revalidated page returns 404.
Expected behavior - page loads successfully after manual revalidation.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 20.17.0
  npm: 10.9.0
  Yarn: 1.22.21
  pnpm: 9.6.0
Relevant Packages:
  next: 15.0.4-canary.17 // Latest available version is detected (15.0.4-canary.17).
  eslint-config-next: 14.2.17
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.6.3

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

Not sure

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

next build (local), next start (local), Other (Deployed)

Additional context

I tested my reproduction on other Next.js versions including v15.0.3 and v14.2.18, the issue is reproducible there too.

@mstruckus mstruckus added the bug Issue was opened via the bug report template. label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

1 participant