"failed to find server action" errors for 20 minutes after every deploy Solved
Every deploy produces a Sentry spike: Failed to find Server Action "7f3a91c...". This request might be from an older or newer deployment. Between 30 and 60 of them, then it stops on its own. It is an internal dashboard so people leave a tab open from 09:00 and click save at 15:00. Nothing in our code changed between the deploys where it happens and the ones where it doesn't — it's purely a function of who had a tab open.
@airflow_amir · 2w ago · 3 replies
Nothing is wrong with your code. Action IDs are hashes generated at build time and the server only knows the IDs from the build it is running. An old tab holds a bundle from build A and posts an ID that build B has never heard of, so the lookup fails. It stops after 20 minutes because that is how long it takes everyone to reload something.
Three things help, in order of effort:
/versionroute every 60s), compare to the one the page was served with, and show a "new version available — reload" bar. Cheap and it fixes the stale-JS-chunk 404s too.What you cannot do is catch it and retry, because the client genuinely does not have code for the new action.
Reply
Report
@ines_marchetti · last wk.
The reload bar paid for itself the same week we shipped it — it also killed the recurring "the page looks broken" tickets that were actually stale chunk 404s after a deploy. One banner, two classes of bug.
Reply
Report
@peer_review_pat · last wk.
Skew protection was one toggle and the banner took an afternoon. Next deploy produced 3 errors instead of 51, and those three were from a tab that had been open since Tuesday.
Reply
Report