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
Cookies missing in Nextjs with app directory if set cookie in middleware #50726
Comments
@iMuFeng having the same issue, inconsistent behaviour where What did you end up doing? |
@pnxdxt The issue I encountered was that Supabase added the |
@iMuFeng Thanks! For anyone looking this up, we had this line
which didn’t seem to work well with server-side cookies 😌 |
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 or a replay of the bug
https://github.com/iMuFeng/nextjs-app-cookie
To Reproduce
Run git clone https://github.com/iMuFeng/nextjs-app-cookie
Run cd nextjs-app-cookie && pnpm i && pnpm dev
Open http://127.0.0.1:3000/
Create a new cookie named "cookie1" manually in the console with any value (like abc), and then refresh this page.
Describe the Bug
Nextjs has a bug where the cookies from the response are parsed by nextjs/headers cookies instead of those from the request.
Expected Behavior
There should display the value of "cookie1"
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: