[X] I verified that the issue exists in the latest next-safe-action release
Is there an existing issue for this?
[X] I have searched the existing issues and found nothing that matches
Describe the bug
I just upgraded to Next.js 15 and I got this at handleValidationErrorsShape: async (ev) => flattenValidationErrors(ev) saying that this has to be an async function. To mitigate this issue I added the async keyword. However, there's a race condition within next that I have to click the submit button twice to actually get back any validation errors
Reproduction steps
Upgrade to next Next 15 and use handleValidationErrorsShape on a server action
Yep, unfortunately that's the current behavior of Next.js 15, not sure if it's a bug or expected, I'm waiting for an official reply by the Next.js team. Check out this tweet.
Are you using the latest version of this library?
Is there an existing issue for this?
Describe the bug
I just upgraded to Next.js 15 and I got this at
handleValidationErrorsShape: async (ev) => flattenValidationErrors(ev)
saying that this has to be an async function. To mitigate this issue I added the async keyword. However, there's a race condition within next that I have to click the submit button twice to actually get back any validation errorsReproduction steps
Upgrade to next Next 15 and use
handleValidationErrorsShape
on a server actionExpected behavior
No error at all
Link to a minimal reproduction of the issue
https://github.com/Caramella-Corner/caramellacorner.shop/blob/master/app/admin/_actions/products.ts
Operating System
Windows 11
Library version
7
Next.js version
15.0.1
Node.js version
20.18.0
Additional context
No response