# Error: Server Action failed to parse FormData: missing field 'email'

- **ID:** `nextjs/server-action-formdata-parse-error`
- **Domain:** nextjs
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

A Server Action expects a specific field in the FormData from a client form submission, but the field is missing, often due to a mismatch between the form's input names and the action's expected keys.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Next.js 14.0.0 | active | — | — |
| Next.js 14.2.0 | active | — | — |
| Next.js 15.0.0 | active | — | — |

## Workarounds

1. **Check the form input names: ensure they match the keys expected in the Server Action. For example, if the action expects 'email', the form should have '<input name="email" />'.** (95% success)
   ```
   Check the form input names: ensure they match the keys expected in the Server Action. For example, if the action expects 'email', the form should have '<input name="email" />'.
   ```
2. **Log the entire FormData in the Server Action using 'console.log(Object.fromEntries(formData))' to see all received fields.** (90% success)
   ```
   Log the entire FormData in the Server Action using 'console.log(Object.fromEntries(formData))' to see all received fields.
   ```
3. **Use optional chaining or default values in the action: 'const email = formData.get("email") || ""' to avoid missing field errors.** (85% success)
   ```
   Use optional chaining or default values in the action: 'const email = formData.get("email") || ""' to avoid missing field errors.
   ```

## Dead Ends

- **** — If the field is truly missing from the form structure (e.g., typo in name), a hidden input can fix it, but if the issue is on the server side (wrong key), it doesn't help. (50% fail)
- **** — useFormState doesn't affect FormData parsing; the error is in the action itself, not the state hook. (80% fail)
- **** — The error is about server-side parsing; client component wrapper doesn't change the FormData structure. (70% fail)
