79523443

Date: 2025-03-20 15:48:14
Score: 1.5
Natty:
Report link

It appears that Next.js was dropping the second queued action in my case. I’m using Next.js v15.2.0-canary.61, and this behavior might be fixed in a newer version.

I found a workaround in a GitHub thread that resolves the issue. The suggestion is to wrap the server action call in a setTimeout, which successfully prevents the second action from being lost.

This approach worked for me:

setTimeout(() => {
  yourServerAction();
}, 0);

If upgrading isn’t an option or the issue persists, this workaround might help others facing the same problem.

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same problem
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Nick