remotion-dev/remotion · error · TypeError
parameter 'timeoutInSeconds' must be an integer but got ${ti
Error message
parameter 'timeoutInSeconds' must be an integer but got ${timeoutInSeconds} What it means
Thrown by validateTimeout() in @remotion/lambda when timeoutInSeconds is a finite number inside the valid range but not an integer (timeoutInSeconds % 1 !== 0). AWS Lambda expects the timeout as whole seconds.
Source
Thrown at packages/lambda/src/shared/validate-timeout.ts:27
if (Number.isNaN(timeoutInSeconds)) {
throw new TypeError(`parameter 'timeoutInSeconds' must not be NaN, but is`);
}
if (!Number.isFinite(timeoutInSeconds)) {
throw new TypeError(
`parameter 'timeoutInSeconds' must be finite, but is ${timeoutInSeconds}`,
);
}
if (timeoutInSeconds < MIN_TIMEOUT || timeoutInSeconds > MAX_TIMEOUT) {
throw new TypeError(
`parameter 'timeoutInSeconds' must be between ${MIN_TIMEOUT} and ${MAX_TIMEOUT}, but got ${timeoutInSeconds}`,
);
}
if (timeoutInSeconds % 1 !== 0) {
throw new TypeError(
`parameter 'timeoutInSeconds' must be an integer but got ${timeoutInSeconds}`,
);
}
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Round to a whole second: Math.round(timeoutInSeconds) (or ceil to be safe).
- When converting from ms: Math.round(ms / 1000).
- Use integer literals in config.
Example fix
// before const timeoutInSeconds = estimatedMs / 1000; // e.g. 119750 / 1000 = 119.75 // after const timeoutInSeconds = Math.round(estimatedMs / 1000);
Defensive patterns
Strategy: validation
Validate before calling
const timeoutInSeconds = Math.round(Number(raw));
Type guard
const isIntegerSeconds = (v: unknown): v is number => typeof v === 'number' && Number.isInteger(v);
Prevention
- Round when converting from milliseconds (ms / 1000).
- Keep timeout values as integer literals in config.
- Type the field as number and assert integer at the boundary.
When it happens
Trigger: Passing a fractional second value like 120.5 or 90.25 to deployFunction().
Common situations: Computing timeout as a fraction (e.g. estimatedSeconds * 1.1), converting from milliseconds and forgetting to round (ms / 1000), or reading a decimal from a config file.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- parameter 'timeoutInSeconds' must be a number, but got a ${t
- parameter 'timeoutInSeconds' must not be NaN, but is
- parameter 'timeoutInSeconds' must be finite, but is ${timeou
- parameter 'timeoutInSeconds' must be between ${MIN_TIMEOUT}
- parameter 'vpcSecurityGroupIds' must either be 'undefined' o
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/b5547fb41fc01872.
Report an issue: GitHub.