windmill-labs/windmill · error

Recording exceeded the size limit

Error message

Recording exceeded the size limit

What it means

When the response has no readable stream (no res.body reader), fetchRecording falls back to reading the whole body as text and enforces the same MAX_RECORDING_BYTES cap on the text length before parsing.

Source

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

				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')
		}
		onProgress?.(loaded, total)
	}
	return JSON.parse(await new Blob(chunks as BlobPart[]).text())
}

View on GitHub (pinned to e474e8803c)

Solutions

  1. Reduce the recording size and retry
  2. Use a runtime/browser with streaming response body support (ReadableStream on fetch)
  3. Serve a smaller, pre-trimmed recording file
Defensive patterns

Strategy: validation

Validate before calling

if (typeof Response !== 'undefined' && new Response().body === null) {
  warn('Streaming unsupported; size cap applies after full download')
}

Type guard

function supportsStreaming(res: Response): boolean { return !!res.body }

Try / catch

try { rec = await fetchRecording(url) } catch (e) { if (/size limit/.test(String(e))) notify('Recording too large for this environment'); else throw e }

Prevention

When it happens

Trigger: fetchRecording(url) in an environment where res.body is null (older runtimes, some polyfilled fetch) and the downloaded text exceeds the cap.

Common situations: Fetching a large recording in a context without streaming response support; very old browser/embedded webview loading the recording page.

Related errors


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