Skip to content
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

[Bug]: Advanced Middleware does not work with Next 13.0.1 #1732

Closed
1 of 2 tasks
orinokai opened this issue Nov 1, 2022 · 3 comments · Fixed by #1766
Closed
1 of 2 tasks

[Bug]: Advanced Middleware does not work with Next 13.0.1 #1732

orinokai opened this issue Nov 1, 2022 · 3 comments · Fixed by #1766
Assignees
Labels
priority: medium type: bug code to address defects in shipped code

Comments

@orinokai
Copy link
Contributor

orinokai commented Nov 1, 2022

Summary

Next 13.0.1 introduces a breaking change that adds a ResponseCookies class. This new class uses the deprecated method, getAll, which is not implemented in Deno's fetch and thus throws a 500 error.

I imagine the solution will be to polyfill the method in the @netlify/next middleware response object.

Steps to reproduce

  1. Clone repro site
  2. Run ntl dev

A link to a reproduction repository

https://github.com/orinokai/test-next-adv-middleware

Next Runtime version

4.28.3

More information about your build

  • I am building using the CLI
  • I am building using file-based configuration (netlify.toml)

What OS are you using?

Mac OS

Your netlify.toml file

`netlify.toml`
# Paste content of your `netlify.toml` file here

Your public/_redirects file

`_redirects`
# Paste content of your `_redirects` file here

Your next.config.js file

`next.config.js`
# Paste content of your `next.config.js` file here. Check there is no private info in there.

Builds logs (or link to your logs)

Build logs
# Paste logs here

Function logs

Function logs
# Paste logs here

.next JSON files

generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.
@orinokai orinokai added type: bug code to address defects in shipped code priority: medium labels Nov 1, 2022
@SeanMcTernan
Copy link

Hey team, any update on this one?

@nickytonline
Copy link

It's been prioritized, but work hasn't started on this yet.

@ascorbic
Copy link
Contributor

Referring to whatwg/fetch#973, this could be implemented using headers.entries(), which returns multiple entries for set-cookie if found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants