windmill-labs/windmill · error

Recording is too large (${total} bytes)

Error message

Recording is too large (${total} bytes)

What it means

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.

Source

Thrown at frontend/src/lib/components/recording/rawAppRecordingLoad.ts:615

			// short enough to be a kind rather than a payload.
			const named = typeof type === 'string' && type.length <= 32 ? ` (${type})` : ''
			return {
				ok: false,
				error: `This recording is of an unknown kind${named} — it may need a newer Windmill.`
			}
		}
	}
}

/** Fetch a recording from `url`, enforcing the download cap while streaming. */
export async function fetchRecording(
	url: string,
	onProgress?: (loaded: number, total: number) => void
): Promise<unknown> {
	const res = await fetch(url)
	if (!res.ok) throw new Error(`HTTP ${res.status} ${res.statusText}`)
	const total = Number(res.headers.get('content-length')) || 0
	if (total > MAX_RECORDING_BYTES) throw new Error(`Recording is too large (${total} bytes)`)
	const reader = res.body?.getReader()
	if (!reader) {
		const text = await res.text()
		if (text.length > MAX_RECORDING_BYTES) throw new Error('Recording exceeded the size limit')
		return JSON.parse(text)
	}
	const chunks: Uint8Array[] = []
	let loaded = 0
	for (;;) {
		const { done, value } = await reader.read()
		if (done) break
		if (!value) continue
		chunks.push(value)
		loaded += value.length
		if (loaded > MAX_RECORDING_BYTES) {
			await reader.cancel()
			throw new Error('Recording exceeded the size limit')
		}

View on GitHub (pinned to e474e8803c)

Solutions

  1. Reduce the recording size (shorter capture, fewer snapshots) and re-export
  2. Serve the recording through a host that enforces the same limit so URLs stay valid
  3. Check that the URL points at the recording, not a larger artifact
Defensive patterns

Strategy: validation

Validate before calling

const head = await fetch(url, { method: 'HEAD' })
const size = Number(head.headers.get('content-length')) || 0
if (size > MAX_RECORDING_BYTES) throw new Error('Recording too large before download')

Try / catch

try { rec = await fetchRecording(url) } catch (e) { if (/too large/.test(String(e))) notify('Recording exceeds the size cap'); else throw e }

Prevention

When it happens

Trigger: fetchRecording(url) against a recording whose Content-Length header exceeds MAX_RECORDING_BYTES.

Common situations: 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.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/0144e655467a8bb3. Report an issue: GitHub.