Error: Failed to find Server Action "7f3a9c2e". This request might be from an older or newer deployment.

Next.js · updated 2026-11-04

Logged by the Next.js server when a POST carries a Server Action ID that the current build does not have. Action IDs are not stable between builds, so it shows up right after a deploy, from tabs that loaded the old version. The related "Server Reference ID did not match the expected format" usually comes from security scanners sending made-up IDs.

Error: Failed to find Server Action "7f3a9c2e5d1b". This request might be from an older or newer deployment.
Read more: https://nextjs.org/docs/messages/failed-to-find-server-action
    at getServerActionRequestMetadata (/app/.next/server/chunks/9032.js:303:6019)
    at handleAction (/app/.next/server/chunks/9032.js:305:1553)

Quick fix

If it clusters right after deploys, it's version skew: tabs from the old build call actions the new build no longer has. Set a deploymentId per deployment so the client does a full reload when it notices a new version, and when self-hosting several instances give them all the same build and the same NEXT_SERVER_ACTIONS_ENCRYPTION_KEY (set at build time). On Vercel, Skew Protection keeps the previous deployment's actions available.

  1. Check timing: errors in the minutes after each deploy point to version skew; a steady trickle with malformed IDs points to scanners.
  2. Set deploymentId in next.config (or NEXT_DEPLOYMENT_ID at build) to a value that changes per deployment, such as the git SHA.
  3. Several servers or a rolling deploy: every instance of one release must run the same build output.
  4. Self-hosted on several instances: set NEXT_SERVER_ACTIONS_ENCRYPTION_KEY (base64, 16/24/32 bytes) at build time, the same for all.
  5. Treat "Server Reference ID did not match the expected format" with values like "x" as scanner traffic: filter it, don't chase it.
javascript
// next.config.js
module.exports = {
  // A new value per deployment: clients that notice a different deployment
  // do a full reload instead of calling actions the new build doesn't have.
  deploymentId: process.env.GIT_SHA,
};

// Build with one shared key when several instances serve the same release:
//   NEXT_SERVER_ACTIONS_ENCRYPTION_KEY=<base64 32-byte key> next build

Why it happens

Open tabs from the previous deploy

Server Action IDs are generated per build. A page loaded before the deploy still sends the old IDs when the user submits a form.

Instances running different builds

During a rolling deploy, or with servers built separately, a request can reach an instance from another build.

Different encryption keys across instances

Each build generates its own key unless NEXT_SERVER_ACTIONS_ENCRYPTION_KEY is set, so separately built instances of the same code still disagree.

Scanner traffic

Requests with a Next-Action header but a made-up value produce "Server Reference ID did not match the expected format. Received "x"". Next.js documents automated scanning as a cause.

Other fixes

  • Next.js does not route requests by deployment; for zero-skew rollouts, your host or CDN has to send each client to its own deployment.
  • Group these separately in your error tracker so a real action failure stays visible.

Same error, other wording

  • Error: The Server Reference ID did not match the expected format. Received "x".
  • Error: Failed to find Server Action. This request might be from an older or newer deployment.

Let your coding agent catch the next one

Runheed records this error in production with the stack trace, the breadcrumbs before it and the agent session that shipped the code, and serves it to Claude Code, Cursor or any MCP client. With it connected, you can ask:

> Find the "Failed to find Server Action" errors, check whether they cluster after deploys or come from malformed scanner requests, and set up deploymentId (and a shared encryption key if we run several instances) so old tabs reload instead of failing.

Plans from $29/moSee what your agent readsSee the setupCancel any time from the billing portal

Related errors

More in React and Next.js rendering

References: Next.js docs: Failed to find Server Action, Next.js docs: deploymentId