Skip to content

15.4.1 regression - using server side cookies component with middleware results in uncaught error server-action-reducer.js:104 #82937

@gladykov

Description

@gladykov

Link to the code that reproduces this issue

https://github.com/gladykov/nextjs-15.4.1-bug

To Reproduce

  1. npm install
  2. npm run dev
  3. http://localhost:3000/
  4. Click the button
  5. Check the browser web dev console

Current vs. Expected behavior

Result:

server-action-reducer.js:104 Uncaught (in promise) Error: An unexpected response was received from the server.
    at fetchServerAction (server-action-reducer.js:104:37)

Recovery steps:

  • Downgrade to next 15.4.0
  • OR remove middleware.ts

Provide environment information

/bin/sh: line 1: pnpm: command not found

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 ZEN SMP PREEMPT_DYNAMIC Tue, 19 Aug 2025 05:00:54 +0000
  Available memory (MB): 15853
  Available CPU cores: 8
Binaries:
  Node: 22.14.0
  npm: 11.5.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.4.1 // There is a newer version (15.5.0) available, upgrade recommended! 
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.2
Next.js Config:
  output: N/A

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

Middleware

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

next start (local), next dev (local)

Additional context

I can reproduce in v15.5.1-canary.4 as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions