NF-032: Server Action request is invalid
The remote rejected a request to /nf/action with 400 before running any action, or with 413 because the body is over its limit (1 MiB by default). A plain...
Why This Error Occurred
The remote rejected a request to /_nf/action with 400 before running any action, or with 413 because the body is over its limit (1 MiB by default). A plain HTML form post or sendBeacon call fails this way by design.
Possible Ways to Fix It
-
Call Server Actions through the island runtime. For forms, use
<Form>from@next-federation/islandinstead of posting to/_nf/actionby hand. -
Run the same React version in host and remote.
-
For a
413, send less data per action, or raise the limit:// vite.config.ts nextFederationIslands({ actions: { maxBodyBytes: 4 * 1024 * 1024 } })
Useful Links
NF-031: Server Action not found
The remote answered a Server Action request with 404: the id in the X-NF-Action header is not a 'use server' function in the build that served the...
NF-033: Server Action threw an error
A Server Action on the remote threw, and the caller's promise rejected. The error came from the action's own code or from something it called.