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
Middleware returning empty 200 for old build ID instead of 404 #57207
Comments
I've re-tested on v14.0.0 and that still has the same broken behaviour. |
I've updated the repo to 14.0.3-canary.9 and the same broken behaviour still exists. |
Still reproducible on 14.0.5-canary.43 |
Updated the repro repo, the issue is still reproducible on 14.1.1-canary.7 |
Issue is still reproducible on 14.1.1-canary.27 |
This is resolved in v14.1.1-canary.37 🚀 |
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. |
Link to the code that reproduces this issue
https://github.com/ben-propflo/nextjs-middleware-deployment-repo
To Reproduce
If you then delete middleware.ts and repeat the steps above, you'll notice that the request to _next/data/ will return a 404 which causes a new fetch to http://localhost:3000/ssr2 so everything works as expected.
Current vs. Expected behavior
Following the steps from the previous section, when using middleware I'd expect the same behaviour as when not using middleware. That is a 404 is returned so that the client re-fetches the page.
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Fri Oct 6 19:02:35 UTC 2023 Binaries: Node: 18.18.0 npm: 8.18.0 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 13.5.7-canary.14 eslint-config-next: 13.5.6 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Data fetching (gS(S)P, getInitialProps), Middleware / Edge (API routes, runtime), Routing (next/router, next/navigation, next/link)
Additional context
I've gone back and tried previous versions of Next.js on my linked repro, the issue first starts appearing in v13.4.13-canary.0 (it works fine on 13.4.12)
The text was updated successfully, but these errors were encountered: