Skip to content

Request header too large due to next-router-state-tree #75119

Closed
@akshayka

Description

Link to the code that reproduces this issue

https://gist.github.com/rjbudzynski/7fc7b46e2dfe8311a490fbbfbadc61dc

To Reproduce

  1. Navigate to the link in the GitHub gist, which opens a playground marimo notebook.
  2. Save the notebook and click "Create permalink"
  3. A post request fails with error code 400, request header or cookie too large: in particularnext-router-state-tree is prohibitively large.

Current vs. Expected behavior

I expected the POST request to succeed, not to fail with a header too large error.

Our playground uses long routes (encoding user code in the route). Is it possible for us to manually clear the Next-Router-State-Tree header, or otherwise control its size?

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
  Available memory (MB): 65536
  Available CPU cores: 10
Binaries:
  Node: 21.5.0
  npm: 10.2.4
  Yarn: N/A
  pnpm: 9.12.1
Relevant Packages:
  next: 14.2.7 // An outdated version detected (latest is 15.1.5), upgrade is highly recommended!
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.5.2
Next.js Config:
  output: N/A
 ⚠ An outdated version detected (latest is 15.1.5), upgrade is highly recommended!
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

We are deploying on Vercel.

Metadata

Assignees

No one assigned

    Labels

    invalid linkThe issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions