remotion-dev/remotion · error · TypeError
The parameter passed into continueRender() must be the retur
Error message
The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: ${JSON.stringify(handle)} What it means
continueRender() validates that its argument is the number returned by delayRender() (a Math.random() float). Passing a string, object, or other non-number is rejected because the handle is used to look up the matching timeout entry; a non-number can never match and indicates a logic error (e.g. passing a label or an options object by mistake).
Source
Thrown at packages/core/src/delay-render.ts:160
handle: number;
environment: RemotionEnvironment;
logLevel: LogLevel;
};
export const continueRenderInternal = ({
scope,
handle,
environment,
logLevel,
}: ContinueRenderInternalOptions): void => {
if (typeof handle === 'undefined') {
throw new TypeError(
'The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.',
);
}
if (typeof handle !== 'number') {
throw new TypeError(
'The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: ' +
JSON.stringify(handle),
);
}
const handleExists = scope.remotion_delayRenderHandles.includes(handle);
const timeoutEntry = scope.remotion_delayRenderTimeouts[handle];
if (handleExists && environment.isRendering && timeoutEntry) {
const {label, startTime, timeout} = timeoutEntry;
clearTimeout(timeout);
const message = [
label ? `"${label}"` : 'A handle',
DELAY_RENDER_CLEAR_TOKEN,
`${Date.now() - startTime}ms`,
]
.filter(truthy)
.join(' ');
Log.verbose({logLevel, tag: 'delayRender()'}, message);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Pass exactly the value returned by delayRender(): continueRender(handle).
- Keep the handle in a variable/ref typed as number to avoid coercion.
- Double-check you are not passing the label or an options object.
Example fix
// before
const label = 'load';
delayRender(label);
fetchData().then(() => continueRender(label)); // wrong: string
// after
const handle = delayRender('load');
fetchData().then(() => continueRender(handle)); Defensive patterns
Strategy: validation
Validate before calling
if (typeof handle !== 'number') {
throw new TypeError('continueRender requires the delayRender handle');
}
continueRender(handle); Type guard
const isDelayHandle = (h: unknown): h is number => typeof h === 'number' && Number.isFinite(h);
Prevention
- Store the handle as a number; avoid coercing through string state.
- Never pass the label or options object to continueRender.
- Lint for continueRender called with non-identifier arguments.
When it happens
Trigger: Calling continueRender('load') (passing the label), continueRender({handle}), continueRender(event), or any non-numeric value. Often the result of confusing the label string with the handle.
Common situations: Swapping label and handle in call order; storing the handle in state that coerces it to a string; passing an event or DOM node by accident.
Related errors
- The label parameter of delayRender() must be a string or und
- The continueRender() method must be called with a parameter
- inputRange must contain only numbers
- outputStyles must contain only objects
- Argument passed to "${api}" for param "${param}" is undefine
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/f39c6fa8fe003bbf.
Report an issue: GitHub.