remotion-dev/remotion · error · Error
Got no body
Error message
Got no body
What it means
Thrown when the fetch response for an animated image has no body stream. Without a body, the ImageDecoder cannot receive bytes to decode, so Remotion aborts.
Source
Thrown at packages/core/src/animated-image/create-image-decoder.ts:21
signal,
requestInit,
contentType,
}: {
resolvedSrc: string;
signal: AbortSignal;
requestInit?: RequestInit;
contentType: string | null;
}) => {
if (typeof ImageDecoder === 'undefined') {
throw new Error(
'Your browser does not support the WebCodecs ImageDecoder API.',
);
}
const response = await fetch(resolvedSrc, {...requestInit, signal});
const {body} = response;
if (!body) {
throw new Error('Got no body');
}
const decoder = new ImageDecoder({
data: body,
type: contentType ?? response.headers.get('Content-Type') ?? 'image/gif',
});
await Promise.all([decoder.completed, decoder.tracks.ready]);
const {selectedTrack} = decoder.tracks;
if (!selectedTrack) {
decoder.close();
throw new Error('No selected track');
}
return {decoder, selectedTrack};
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Verify the image URL returns a 200 with image bytes (open it directly in the browser).
- Fix CORS headers so the response is readable (Access-Control-Allow-Origin).
- Check service workers or proxies that may be swallowing the body.
- Ensure the asset path resolves (case sensitivity, base URL).
Defensive patterns
Strategy: try-catch
Validate before calling
const probe = await fetch(src, {method: 'HEAD'});
if (!probe.ok) {
// surface a friendlier error before decoding
} Try / catch
try {
await createImageDecoder({...});
} catch (e) {
if (e instanceof Error && e.message === 'Got no body') {
// handle CORS / empty body: log URL, check headers, fallback asset
}
throw e;
} Prevention
- Verify image URLs return 200 with bytes before rendering.
- Configure CORS headers on the asset host.
- Avoid service workers that intercept and empty image responses.
When it happens
Trigger: A 204 No Content response, an opaque response, a CORS-restricted response that strips the body, or a server returning an empty body for the image URL.
Common situations: Incorrect asset URL, CDN misconfiguration returning empty bodies, CORS errors that produce opaque responses, network interception by a service worker returning empty responses.
Related errors
- Your browser does not support the WebCodecs ImageDecoder API
- No selected track
- No frame found
- Could not determine animated image duration
- Failed to render GIF with source ${src}: "${error.message}".
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/779c6407314dffe4.
Report an issue: GitHub.