Next.js Discord

Discord Forum

[Error: Failed to find Server Action "{ID}"

Answered
Eulophid wasp posted this in #help-forum
Open in Discord
Eulophid waspOP
How can I fix this in production - it works fine in staging but is failing in production. It gives me a server action ID but I don't know how to match it.

The help page linked ([link](https://nextjs.org/docs/messages/failed-to-find-server-action)) is a little vague.

Any help appreciated!
Answered by Eulophid wasp
The guidance says I can add a NEXT_SERVER_ACTIONS_ENCRYPTION_KEY which is cool but I don't really understand the "This variable must be AES-GCM encrypted" part?

It's just a string right? or am I meant to encrypt a specific key?
View full answer

17 Replies

Asian black bear
Are you scaling your application to multiple instances or is it just a single instance? How are you hosting?
Eulophid waspOP
Hi @Asian black bear - I'm on Vercel as a basic (hobby) plan.
Asian black bear
Which version of Next.js are you using?
Eulophid waspOP
"next": "^15.3.2"
A full build works locally (and as I stay dev is fine) but this error is filling my logs.
Asian black bear
You should maybe test one or two prior patch versions to see if it's a regression. Sadly, I can't help you otherwise, the possible causes I was familiar with are not really relevant in your case.
Eulophid waspOP
So try a different Next version? OK, I can do that I think 🙂
Thanks for your help!
Eulophid waspOP
ugh, that hasn't helped - thanks though!

Any ideas how I can debug - I don't have much to go on.
Dutch
can you share that error you see
Eulophid waspOP
OK, after 24 hours those errors have now stopped.

This was the error:
[Error: Failed to find Server Action "004855739b175147fe491e0ebc084243712e0b6fa5". This request might be from an older or newer deployment. Read more: https://nextjs.org/docs/messages/failed-to-find-server-action]
Eulophid waspOP
The guidance says I can add a NEXT_SERVER_ACTIONS_ENCRYPTION_KEY which is cool but I don't really understand the "This variable must be AES-GCM encrypted" part?

It's just a string right? or am I meant to encrypt a specific key?
Answer
Eulophid waspOP
Thanks @joulev but we're not currently on a Pro plan so can't enable skew protection.
Eulophid waspOP
Thanks - that's really useful 🙂