New page is called when intercepting routes are terminated before the server action is completed
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.5k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/JoSuwon/intercepting-routes-with-server-action
To Reproduce
- Start the application in development or visit deploy application (https://intercepting-routes-with-server-action.vercel.app/)
- Click the button to open the modal (This modal consists of intercepting routes and performs a server-action when mounted, which returns the result after 3 seconds)
- Ends interception-routes and returns to main before server-action completes execution (before 3 seconds)
- The app/page.tsx file is newly rendered on the server. (Check that page loaded time and random number are changed)
When you go back before the server-action is complete
https://github.com/user-attachments/assets/83931317-8543-43d5-8071-71e972248e62
When you go back after the server-action is complete
https://github.com/user-attachments/assets/7deebe11-78a1-4a5b-b698-de28df7ca7fb
Current vs. Expected behavior
Even if interception-routes is terminated before the server-action is complete, I think app/page.tsx should be maintained without new rendering.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.0.0: Wed Aug 7 03:08:56 PDT 2024; root:xnu-11215.1.9~22/RELEASE_ARM64_T6020
Available memory (MB): 16384
Available CPU cores: 10
Binaries:
Node: 20.14.0
npm: 10.7.0
Yarn: 1.22.19
pnpm: 9.4.0
Relevant Packages:
next: 14.2.5 // Latest available version is detected (14.2.5).
eslint-config-next: 14.2.5
react: 18.3.1
react-dom: 18.3.1
typescript: 5.5.4
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Parallel & Intercepting Routes, Partial Prerendering (PPR)
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local), Vercel (Deployed)
Additional context
Installing the next@canary version and running dev encountered the same problem, and the build failed and distributed to vercel as 14.2.5 version.
deploy link : https://intercepting-routes-with-server-action.vercel.app/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction and inspect app/page.tsx while comparing navigation before and after the server action completes. Reproduce the early back navigation in next dev or next start, then trace the Parallel & Intercepting Routes and server-action behavior. Done means leaving the interception before completion does not cause app/page.tsx to render a new page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, react
- Domain
- full-stack, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100