platforms icon indicating copy to clipboard operation
platforms copied to clipboard

Server actions are run but only return undefined on the client

Open RahulBirCodes opened this issue 1 year ago • 2 comments

I have a server action that I call in my useEffect, and I can verify that on my server the action gets called but the response on the client is always undefined. I've tried a bare minimum example where I only return a promise that resolves to a string but even that returns undefined.

RahulBirCodes avatar Aug 17 '24 22:08 RahulBirCodes

Opened an issue on nextjs issues for this https://github.com/vercel/next.js/issues/69022. The undefined response is definitely a critical bug and I hope someone can touch upon this

RahulBirCodes avatar Aug 21 '24 08:08 RahulBirCodes

I have a server action that I call in my useEffect, and I can verify that on my server the action gets called but the response on the client is always undefined. I've tried a bare minimum example where I only return a promise that resolves to a string but even that returns undefined.

I'm not having that issue when dealing with server actions. Can you show an example?

justiny avatar Aug 28 '24 22:08 justiny

👋 We've updated this repo to have a more simplified example + a new guide:

  • https://github.com/vercel/platforms/pull/451
  • https://vercel.com/guides/nextjs-multi-tenant-application

leerob avatar May 11 '25 14:05 leerob