Next.js · infra · fg-0300

'Failed to find Server Action' errors when Next.js runs on more than one container or after a deploy

If you see Error: Failed to find Server Action "7f3a...". This request might be from an older or newer deployment, the cause and the fix for Next.js are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Error: Failed to find Server Action "7f3a...". This request might be from an older or newer deployment.Form submissions fail intermittently behind a load balancerUsers with a tab open from before a deploy get errors on every action
Cause
Each build generates its own action IDs and a random key for encrypting action closures. Instances built separately, or old browser tabs against a new build, cannot resolve or decrypt each other's actions.
Fix
Build once and run the same artifact everywhere, set the same NEXT_SERVER_ACTIONS_ENCRYPTION_KEY at build time on every build, and set deploymentId so stale clients do a hard reload.
Apply
# generate once, store as a secret openssl rand -base64 32 NEXT_SERVER_ACTIONS_ENCRYPTION_KEY=<that value> next build // next.config.ts export default { deploymentId: process.env.DEPLOYMENT_VERSION }
Affected
Self-hosted Next.js 14 to 16 with multiple instances or rolling deploys
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun