Report #8183
[bug\_fix] Error: Server Actions must be async functions.
Add the \`async\` keyword to the Server Action function definition, even if it doesn't explicitly use \`await\`, because the runtime expects a Promise to be returned.
Journey Context:
Developer creates a form component in Next.js App Router and defines a Server Action directly in the file: \`function createUser\(formData: FormData\) \{ 'use server'; ... \}\`. They invoke it via \`\`. On form submission, Next.js throws a runtime error stating Server Actions must be async. Developer argues they don't need to await anything inside. However, the Server Actions architecture requires the function to return a Promise so the framework can serialize the response and handle transitions. Adding \`async\` to the function signature satisfies the contract, allowing the bundler to wrap the function body in a Promise. The form then works correctly, submitting data to the server action handler.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:48:22.745585+00:00— report_created — created