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
AMP hybrid mode is missing required dynamic route query pameters #17245
Comments
Can I work on it @lfades ? 👍 |
@ayshiff Sure 👍 |
I am a little bit struggling reproducing the bug. |
@ayshiff Are you running Next.js on the latest canary and using AMP in hybrid mode? |
I am using Next.js |
@ayshiff Oh one last thing, this only happens when you run |
After running
I'll try to show you the code I'm using and the corresponding output to try to understand why I don't have the same behavior as you 👍 |
@ayshiff In that case you don't have spend more time on this 👍 . I'll see If I can reproduce it again later. |
No problem ! I will try to take another issue then 👍 |
I'm seeing this same issue on 9.5.5, but only on vercel. When I run the build locally (
but when I run this on vercel (
I don't know if I can make a repro easily, but maybe this helps point to the problem. Why would this happen on vercel but not locally? |
I created a PR that fixes this: #17461 |
For what it's worth, this happened when I run |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
When using a dynamic route with
getStaticProps
andgetStaticPaths
,getStaticProps
executes twice for every defined path but it's missing the query parameter for the AMP version. This only happens withnext build
E.g if
getStaticPaths
returns/hello-world
for[slug].js
thengetStaticProps
gets executed twice with the following context:Expected behavior
The AMP version should have the required query parameters for the dynamic route.
Additional context
Using Next.js
9.5.4-canary.20
- Happened with both webpack 4 and webpack 5The text was updated successfully, but these errors were encountered: