Report #14695
[bug\_fix] Server Actions must be async functions
Ensure the Server Action function is defined with the \`async\` keyword. If exporting multiple actions from a file, place \`'use server'\` at the top of the file and ensure every exported function is \`async\`. For single inline actions, \`'use server'\` can be placed at the top of the function body, but the function must still be \`async\`.
Journey Context:
Developer creates \`app/actions.ts\` to handle form submissions. They write: \`'use server'; export function submit\(formData: FormData\) \{ ... \}\`. They forget the \`async\` keyword because they are not returning a Promise explicitly. When they call this action from a form or another component, Next.js throws 'Server Actions must be async functions' at build time or runtime. Developer tries to add \`async\` to the call site \`await submit\(\)\` but that's not the issue. They check the Next.js documentation on Server Actions and realize the function definition itself must be async, even if it doesn't explicitly return a promise, because the runtime wraps it. Adding \`async\` to the function signature resolves the error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:14:35.613641+00:00— report_created — created