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
[NEXT-1017] Intercepted routes: error on Vercel builds only #48406
Comments
will look into it |
@alex-ketch it seems you're using the wrong syntax for intercepting routes. In your project the path is It's definitely curious that it works, will add an error for that. |
There was also a bug for the |
This PR fixes a bug with interception where the rewritten path passed an incorrect segment data on production, resulting in a 404. The fix consists of moving the rewrite pre-processing step that rewrites the dynamic segment from the originating path to when we actually generate the rewrite. This is needed because that step does not run on production. Now it does and signals correctly to the app-render that the value for the segment can be determined from the path. Also enables prod testing, which I had forgotten to enable. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation or adding/fixing Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> fix #48406 link NEXT-1017
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://intercepted-modals.vercel.app
To Reproduce
Clone and deploy the following project to Vercel: https://github.com/alex-ketch/intercepted-modals.
An existing deployment can be seen here: https://intercepted-modals.vercel.app
404 Error:
500 Error:
Describe the Bug
When a project using intercepted routes is deployed to Vercel, a runtime error is encountered when attempting to open the intercepted route. What makes it hard to debug is that this error is not present during local development builds, or
vercel dev
commands.There are two similar scenarios which both cause errors:
/intercepting-parallel-modal/userId
interceptingintercepting-parallel-modal/photo/1
)dynamic-sibling-route
intercepting/dynamic-sibling-route/3
)The above linked reproduction repo is directly based on the e2e tests found here: https://github.com/vercel/next.js/tree/canary/test/e2e/app-dir/parallel-routes-and-interception/app/(group). I've added another use case of catching a dynamic path for the current path under the
dynamic-sibling-route
folder.When attempting to visit the modal route a 404 error is shown, but no relevant logs are seen in Vercel.
When attempting to visit a route for a dynamic sibling route the following 500 error is logged.
Thought I'd mentioned you @feedthejim since I noticed you were working on these features recently. Let me know if you need any further info in debugging this.
Expected Behavior
Should match behaviour seen in local development builds.
I.e. clicking on a link for an item in the feed should show contents of the detail view.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
From SyncLinear.com | NEXT-1017
The text was updated successfully, but these errors were encountered: