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

Middleware is causing POST/PUT requests with large payload to stuck #40189

Closed
1 task done
louisesiqifan opened this issue Sep 3, 2022 · 5 comments
Closed
1 task done
Labels
bug Issue was opened via the bug report template.

Comments

@louisesiqifan
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64
Binaries:
  Node: 16.14.0
  npm: 8.5.0
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 12.2.6-canary.8
  eslint-config-next: 12.2.5
  react: 18.2.0
  react-dom: 18.2.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

next run dev

Describe the Bug

When middleware.ts is present, POST and PUT requests with large payloads to any apis in the pages/api folder are stuck on pending.

The payload I was using has Content-Length: 30233, so even if in default api setting it should not be too big.

Screen.Recording.2022-09-02.at.7.18.46.PM.mov

Expected Behavior

POST and PUT requests should be working with middleware present.

Link to reproduction

https://github.com/louisesiqifan/next-js-huge-post

To Reproduce

  1. Run npm i
  2. Run npm run dev
  3. In http://localhost:3000/, click the two buttons
@louisesiqifan louisesiqifan added the bug Issue was opened via the bug report template. label Sep 3, 2022
@c0m1t
Copy link

c0m1t commented Sep 5, 2022

Any update on this issue?

@mgreenw
Copy link

mgreenw commented Sep 9, 2022

Also seeing this with a middleware.ts file and a PUT request with an image. Both 12.2 and 12.3.

@mgreenw
Copy link

mgreenw commented Sep 15, 2022

I think this is a dup of #39262

@louisesiqifan
Copy link
Author

As mentioned in #39262 , downgrading to v12.2.2 solved my issue.
Closing this because it's a dup.

@louisesiqifan louisesiqifan closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants