remotion-dev/remotion · error · error
could not parse Lambda progress response: %w
Error message
could not parse Lambda progress response: %w
What it means
Returned when json.Unmarshal cannot decode the Lambda function's response payload into the RenderProgress struct. The Invoke succeeded at the transport level, but the bytes returned are not the JSON shape the Go client expects — typically because the deployed function is a different Remotion version than the client, or because the function returned an error envelope or plain text instead of progress JSON.
Source
Thrown at packages/lambda-go/invocations.go:97
invocationParams := &lambda.InvokeInput{
FunctionName: new(config.FunctionName),
Payload: internalParamsJSON,
}
// Invoke Lambda function
invokeResult, invokeError := svc.Invoke(context.Background(), invocationParams)
if invokeError != nil {
return nil, fmt.Errorf("could not invoke Lambda function %q: %w", config.FunctionName, invokeError)
}
// Unmarshal response from Lambda function
var renderProgressOutput RenderProgress
resultUnmarshallError := json.Unmarshal(invokeResult.Payload, &renderProgressOutput)
if resultUnmarshallError != nil {
return nil, fmt.Errorf("could not parse Lambda progress response: %w", resultUnmarshallError)
}
return &renderProgressOutput, nil
}
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Print invokeResult.Payload before unmarshalling to see what the function actually returned.
- Align versions: redeploy the Remotion Lambda function so its version matches the lambda-go client (`npx remotion lambda functions deploy`).
- Confirm FunctionName points at a Remotion-render function, not an unrelated Lambda.
Example fix
// before
resultUnmarshallError := json.Unmarshal(invokeResult.Payload, &renderProgressOutput)
// after - surface the raw payload so the cause is obvious in logs
if len(invokeResult.Payload) == 0 {
return nil, fmt.Errorf("empty Lambda progress response (FunctionError: %s)", aws.ToString(invokeResult.FunctionError))
}
resultUnmarshallError := json.Unmarshal(invokeResult.Payload, &renderProgressOutput) Defensive patterns
Strategy: validation
Validate before calling
// Before unmarshalling, sanity-check the payload shape.
func isProgressPayload(b []byte) bool {
var probe map[string]json.RawMessage
if err := json.Unmarshal(b, &probe); err != nil {
return false
}
_, hasDone := probe["done"]
_, hasChunks := probe["chunks"]
return hasDone && hasChunks
} Prevention
- Keep the lambda-go client and deployed Remotion Lambda function on the same version.
- Log invokeResult.FunctionError and the raw payload when unmarshal fails.
- Confirm the FunctionName targets a Remotion-render function, not an unrelated Lambda.
When it happens
Trigger: invokeResult.Payload is valid JSON but does not match RenderProgress (missing fields, wrong types), is invalid JSON entirely (function returned a stack trace), or is an AWS/Lambda error envelope. Common after upgrading the client without upgrading the deployed function.
Common situations: Client is on lambda-go 4.x but the deployed Remotion Lambda function is still 3.x. The function crashed and returned an error envelope like `{"errorMessage":"...","errorType":"Error"}`. A non-Remotion function is bound to the same name.
Related errors
- could not parse Lambda response: %w
- Invalid JSON: ${JSON.stringify(decoded)}
- could not serialize render parameters: %w
- could not serialize progress parameters: %w
- error serializing inputProps. Check it has no circular refer
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/4225c6850e31ec45.
Report an issue: GitHub.