remix-run/react-router · error · Error
No response body
Error message
No response body
What it means
When an RSC server action is invoked from the browser, the client POSTs with `rsc-action-id` and expects an RSC payload stream back to `createFromReadableStream`. If the fetch resolves with a `Response` whose `body` is null (204 No Content, HEAD-like responses, some proxy-generated responses), the promise chain throws this error. The action call then rejects into the calling component's error handling.
Source
Thrown at packages/react-router/lib/rsc/browser.tsx:142
let landedActionId = 0;
return async (id: string, args: unknown[]) => {
let actionId = (globalVar.__routerActionID =
(globalVar.__routerActionID ??= 0) + 1);
const temporaryReferences = createTemporaryReferenceSet();
const payloadPromise = fetchImplementation(
new Request(location.href, {
body: await encodeReply(args, { temporaryReferences }),
method: "POST",
headers: {
Accept: "text/x-component",
"rsc-action-id": id,
},
}),
).then((response) => {
if (!response.body) {
throw new Error("No response body");
}
return createFromReadableStream(response.body, {
temporaryReferences,
}) as Promise<RSCPayload>;
});
React.startTransition(() =>
Promise.resolve(payloadPromise)
.then(async (payload) => {
if (payload.type === "redirect") {
let location = normalizeRedirectLocation(payload.location);
validateNavigationTarget(
payload.location,
location,
new URL(window.location.href),
"allow-explicit",
);
if (payload.reload || isExternalLocation(location)) {View on GitHub (pinned to 7aea711dd1)
Solutions
- Inspect the action POST in the network tab: if the status is 204/3xx with no body, fix the interceptor (auth proxy, middleware, service worker) to let the RSC response reach the browser.
- Ensure any custom `fetch` passed to the RSC browser APIs returns the original `Response` untouched.
- Make sure the action's route/module exists server-side so the framework, not a fallback handler, answers the POST.
- After a deploy, hard reload to rule out version skew in the action-id routing.
Defensive patterns
Strategy: try-catch
Try / catch
try {
const result = await callServerAction(args);
} catch (e) {
if (e instanceof Error && e.message === "No response body") {
window.location.reload(); // recover from gateway-mangled action POST
} else {
throw e;
}
} Prevention
- Pass custom fetch implementations through untouched when wiring RSC browser APIs.
- Register service workers to skip POST requests and .rsc/action URLs.
- Check gateway rules that answer POSTs with bodyless statuses.
When it happens
Trigger: A middleware or gateway replying 204/empty to the action POST; a service worker or custom `fetch` wrapper returning `new Response()` without a body for POST requests; the server action route being intercepted by an auth layer that responds bodyless; CDNs stripping bodies for certain statuses.
Common situations: Deploying behind API gateways that answer POSTs with bodyless 3xx/204; offline-first service workers fabricating responses; custom `unstable_RSCHydratedRouter`/callServer `fetch` implementations that forget to pass through the body.
Related errors
- Missing body in server response
- Unexpected payload type
- Unable to decode RSC response
- You are trying to call ${fn} on a route that does not have a
- Unable to fetch new route matches from the server
AI-assisted analysis of remix-run/react-router@7aea711dd1 (2026-08-18).
Data as JSON: /api/errors/7e549662fb9629c1.
Report an issue: GitHub.