{"record":{"id":"0144e655467a8bb3","repo":"windmill-labs/windmill","slug":"recording-is-too-large-total-bytes","errorCode":null,"errorMessage":"Recording is too large (${total} bytes)","messagePattern":"Recording is too large \\((.+?) bytes\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/recording/rawAppRecordingLoad.ts","lineNumber":615,"sourceCode":"\t\t\t// short enough to be a kind rather than a payload.\n\t\t\tconst named = typeof type === 'string' && type.length <= 32 ? ` (${type})` : ''\n\t\t\treturn {\n\t\t\t\tok: false,\n\t\t\t\terror: `This recording is of an unknown kind${named} — it may need a newer Windmill.`\n\t\t\t}\n\t\t}\n\t}\n}\n\n/** Fetch a recording from `url`, enforcing the download cap while streaming. */\nexport async function fetchRecording(\n\turl: string,\n\tonProgress?: (loaded: number, total: number) => void\n): Promise<unknown> {\n\tconst res = await fetch(url)\n\tif (!res.ok) throw new Error(`HTTP ${res.status} ${res.statusText}`)\n\tconst total = Number(res.headers.get('content-length')) || 0\n\tif (total > MAX_RECORDING_BYTES) throw new Error(`Recording is too large (${total} bytes)`)\n\tconst reader = res.body?.getReader()\n\tif (!reader) {\n\t\tconst text = await res.text()\n\t\tif (text.length > MAX_RECORDING_BYTES) throw new Error('Recording exceeded the size limit')\n\t\treturn JSON.parse(text)\n\t}\n\tconst chunks: Uint8Array[] = []\n\tlet loaded = 0\n\tfor (;;) {\n\t\tconst { done, value } = await reader.read()\n\t\tif (done) break\n\t\tif (!value) continue\n\t\tchunks.push(value)\n\t\tloaded += value.length\n\t\tif (loaded > MAX_RECORDING_BYTES) {\n\t\t\tawait reader.cancel()\n\t\t\tthrow new Error('Recording exceeded the size limit')\n\t\t}","sourceCodeStart":597,"sourceCodeEnd":633,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/recording/rawAppRecordingLoad.ts#L597-L633","documentation":"Thrown by fetchRecording while streaming once the recording's total size exceeds the download cap. App recordings can carry multi-megabyte snapshots, so the loader enforces a hard size limit instead of buffering an unbounded body into the page.","triggerScenarios":"fetchRecording(url) against a recording whose Content-Length header exceeds MAX_RECORDING_BYTES.","commonSituations":"Sharing an oversized app-recording export; a server that reports a wrong/large content-length; pointing the loader at a non-recording large JSON file.","solutions":["Reduce the recording size (shorter capture, fewer snapshots) and re-export","Serve the recording through a host that enforces the same limit so URLs stay valid","Check that the URL points at the recording, not a larger artifact"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const head = await fetch(url, { method: 'HEAD' })\nconst size = Number(head.headers.get('content-length')) || 0\nif (size > MAX_RECORDING_BYTES) throw new Error('Recording too large before download')","typeGuard":null,"tryCatchPattern":"try { rec = await fetchRecording(url) } catch (e) { if (/too large/.test(String(e))) notify('Recording exceeds the size cap'); else throw e }","preventionTips":["Check content-length via HEAD before fetching large files","Keep recordings small: trim snapshots at capture time","Serve recordings from hosts that report accurate content-length"],"tags":["recording","size-limit","fetch"],"backgroundTag":"payload-size-limit-exceeded","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}