Help with Next.js Server Actions encryption key issue
Unanswered
Fire ant posted this in #help-forum
Fire antOP
I’m running a standalone Next.js site with Server Actions, and I’m getting this error:
Failed to find Server Action "006597f91948d2c2800bd0fb20ca43ea312fc81431". This request might be from an older or newer deployment.
I have already set the NEXT_SERVER_ACTIONS_ENCRYPTION_KEY environment variable with a base64 256-bit key across all my servers, but the error still happens sometimes.
Has anyone faced this issue? Any advice on what else to check or how to make this more reliable?
Failed to find Server Action "006597f91948d2c2800bd0fb20ca43ea312fc81431". This request might be from an older or newer deployment.
I have already set the NEXT_SERVER_ACTIONS_ENCRYPTION_KEY environment variable with a base64 256-bit key across all my servers, but the error still happens sometimes.
Has anyone faced this issue? Any advice on what else to check or how to make this more reliable?
2 Replies
Asian black bear
In addition to that you need a consistent build ID across instances: https://nextjs.org/docs/app/api-reference/config/next-config-js/generateBuildId