You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Undocumented breaking change with custom server between 13.4.1 and 13.5.1 / getRequestHandler does no longer set status code with Koa custom server
#65691
Open
clentfort opened this issue
May 13, 2024
· 0 comments
Checkout the repostiories main/v13.5.1 branch repsectively
Run npm i to install all dependencies
Run the dev environment via npm run dev.
Open the page in a browser. Open the dev tools on the network tab. Reload the page.
--> Observer the status code is 404 for all requests. The contents of the page are hidden via CSS
Next 13.4.1
Checkout the repostiories v13.4.1 branch
Run npm i to install all dependencies
Run the dev environment via npm run dev.
Open the page in a browser. Open the dev tools on the network tab. Reload the page.
--> Observer the status code is 200 for all requests. The contents of the page is visible
Current vs. Expected behavior
Currently the status code is not set correctly by getRequestHandler. I'd expect it to set the status code to the correct value (i.e. 200/404) as it was done in 13.4.1.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020
Binaries:
Node: 20.10.0
npm: 10.4.0
Yarn: 4.0.2
pnpm: 8.14.1
Relevant Packages:
next: 13.4.1, 13.5.1, 14.2.3 // Latest available version is detected (14.2.3).
eslint-config-next: N/A
react: 18.3.1
react-dom: 18.3.1
typescript: 4.9.5
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Not sure, Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
The application is run via Docker, however the behaviour is already visible in dev mode.
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://github.com/clentfort/nextjs-custom-server-breaking-change
To Reproduce
Next v14 and Next v13.5.1
main
/v13.5.1
branch repsectivelynpm i
to install all dependenciesnpm run dev
.--> Observer the status code is 404 for all requests. The contents of the page are hidden via CSS
Next 13.4.1
v13.4.1
branchnpm i
to install all dependenciesnpm run dev
.--> Observer the status code is 200 for all requests. The contents of the page is visible
Current vs. Expected behavior
Currently the status code is not set correctly by
getRequestHandler
. I'd expect it to set the status code to the correct value (i.e. 200/404) as it was done in 13.4.1.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020 Binaries: Node: 20.10.0 npm: 10.4.0 Yarn: 4.0.2 pnpm: 8.14.1 Relevant Packages: next: 13.4.1, 13.5.1, 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 4.9.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure, Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
The application is run via Docker, however the behaviour is already visible in dev mode.
The text was updated successfully, but these errors were encountered: