{"record":{"id":"779c6407314dffe4","repo":"remotion-dev/remotion","slug":"got-no-body","errorCode":null,"errorMessage":"Got no body","messagePattern":"Got no body","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/animated-image/create-image-decoder.ts","lineNumber":21,"sourceCode":"\tsignal,\n\trequestInit,\n\tcontentType,\n}: {\n\tresolvedSrc: string;\n\tsignal: AbortSignal;\n\trequestInit?: RequestInit;\n\tcontentType: string | null;\n}) => {\n\tif (typeof ImageDecoder === 'undefined') {\n\t\tthrow new Error(\n\t\t\t'Your browser does not support the WebCodecs ImageDecoder API.',\n\t\t);\n\t}\n\n\tconst response = await fetch(resolvedSrc, {...requestInit, signal});\n\tconst {body} = response;\n\tif (!body) {\n\t\tthrow new Error('Got no body');\n\t}\n\n\tconst decoder = new ImageDecoder({\n\t\tdata: body,\n\t\ttype: contentType ?? response.headers.get('Content-Type') ?? 'image/gif',\n\t});\n\tawait Promise.all([decoder.completed, decoder.tracks.ready]);\n\n\tconst {selectedTrack} = decoder.tracks;\n\tif (!selectedTrack) {\n\t\tdecoder.close();\n\t\tthrow new Error('No selected track');\n\t}\n\n\treturn {decoder, selectedTrack};\n};\n","sourceCodeStart":3,"sourceCodeEnd":38,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/animated-image/create-image-decoder.ts#L3-L38","documentation":"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.","triggerScenarios":"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.","commonSituations":"Incorrect asset URL, CDN misconfiguration returning empty bodies, CORS errors that produce opaque responses, network interception by a service worker returning empty responses.","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)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const probe = await fetch(src, {method: 'HEAD'});\nif (!probe.ok) {\n  // surface a friendlier error before decoding\n}","typeGuard":null,"tryCatchPattern":"try {\n  await createImageDecoder({...});\n} catch (e) {\n  if (e instanceof Error && e.message === 'Got no body') {\n    // handle CORS / empty body: log URL, check headers, fallback asset\n  }\n  throw e;\n}","preventionTips":["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."],"tags":["network","cors","image-decoder","animated-image"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}