Open AaronFriel opened 4 months ago
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Would really love someone to take a look at this! It's pretty surprising given the serialization on the return path.
React version: 18.2.0
Steps To Reproduce
Create a server action that takes a promise parameter
p
:new Promise((r) => setTimeout(r, 10_000))
to that server action.Link to code example:
https://codesandbox.io/p/devbox/next-14-0-3-forked-7q86s7?file=%2Fapp%2Factions.ts%3A4%2C18&workspaceId=958ee911-ec8f-4ca3-9ce1-668005ecaeb8
The current behavior
Serialization of promises is synchronous and blocking.
The expected behavior
That a promise could be passed to a server action and resolved asynchronously, e.g., as a cancellation token.