-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Regression in ctx.req parameters availability in Document getInitialProps in version 13.4.13 (works in 13.4.12) #53883
Comments
Possibly the same issue, attempting any of the login/logout methods through Next-Auth is broken on localhost in version 13.4.13, it always redirects to https:// which doesn't work for localhost. in 13.4.12, the proto from the original request is retained, in the case of localhost, this is http:. I know they are using server context as well, so i'm assuming this is the issue but I haven't dove in. |
did you ever figure out if this is the issue? I'm getting the same thing -- but nothing has been pushed up for a fix |
Closing in favor of #54440. Feel free to comment there! |
Consolidation is fine, as long as this regression is ultimately fixed |
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. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 Binaries: Node: 16.19.0 npm: 9.2.0 Yarn: N/A pnpm: N/A Relevant Packages: next: 13.4.14-canary.1 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.5 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
Data fetching (gS(S)P, getInitialProps)
Link to the code that reproduces this issue or a replay of the bug
https://github.com/carystanley/nextjs-req-context-regression
To Reproduce
Clone the repo at https://github.com/carystanley/nextjs-req-context-regression, install and use
npm run dev
go to:
http://localhost:3000/
see page with:
run
npm i next@13.4.12
use
npm run dev
go to:
http://localhost:3000/
see page with:
Describe the Bug
Not sure if this bug is specific in our setup. But we have express running and we have middleware that adds "context" to the req object. We then use that information in our Document getInitialProps(ctx) to make a data call for the header which is customized based on
req.context
and otherreq.*
metadata.This worked fine in version 13.4.12, but some regression occurred in 13.4.13 that has cause the additional
req.*
metadata to no longer be available.This was a breaking change that broke our application
Expected Behavior
We would expect it to operate like it did in version 13.4.12 where
req.*
information on thereq
object in Document getInitialProps(ctx) was still available.Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
express
The text was updated successfully, but these errors were encountered: