form icon indicating copy to clipboard operation
form copied to clipboard

Next Server Actions don't work with next.js version 15.4

Open sbaechler opened this issue 5 months ago • 1 comments

Describe the bug

After updating to 15.4-canary I keep getting a server error when I post a form. The error seems to happen when parsing the return value from the server action. It is thrown by "server-action-reducer" which is a next.js module. Apparently the mimetype form/multipart is not allowed. (My form is not multipart)

When I downgrade to 15.3 the error disappears.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-form-c425rd6a?file=package.json

Steps to reproduce

  1. Enter a value between 8 and 12.
  2. Hit Submit

Expected behavior

Submit should work with server action validation.

How often does this bug happen?

Every time

Screenshots or Videos

Image

Platform

  • OS: Mac OS
  • Browser: Brave
  • Node: 24

TanStack Form adapter

react-form

TanStack Form version

1.14.0

TypeScript version

No response

Additional context

No response

sbaechler avatar Jul 11 '25 08:07 sbaechler

Did you change the stackblitz repro? I'm not seeing the same error than in the screenshot, the error I see is due to the expected shape of the errors from the server being different from the top level form errors loop (no issues in issueObject).

Image

luchillo17 avatar Jul 16 '25 05:07 luchillo17