Debugging stuck renders
If your render is stuck, proceed as follows:
Check for long delayRender()
calls
If the delayRender()
timeout is too big and does not resolve, a render may get stuck indefinitely without an error message.
This issue may be more confusing on Remotion Lambda, whose runtime also has a timeout.
If the delayRender()
timeout is bigger than the Lambda function timeout, the Lambda function will first time out without the delayRender()
call failing first, leading to no error message.
To debug the issue:
- Set the
delayRender()
timeout value to a smaller value, so that if it does not resolve, an error message is shown. - Always sse
cancelRender()
to handle any error that prevents you from callingcontinueRender()
.
Enable verbose logging
Enable verbose logging to see if there are any failures from the browser or other child processes.
Ensure Chrome Headless Shell is used
Newer Chrome versions may not work with Remotion anymore and cause a render to get stuck, because they have removed the Headless mode.
Instead, you need to migrate to the Chrome Headless Shell.
This issue does not occur on Remotion Lambda.
Follow these best practices:
- Do not download Chrome from a Linux package manager.
- Do not set the
--chrome-executable
option and let Remotion download a compatible version of Chrome Headless Shell for you. - Use
npx remotion browser ensure
to make sure a compatible versions of Chrome Headless Shell is ready before the first render.
Lambda: Are you reading the errors
field?
If the overallProgress
field is stuck on Lambda, ensure that you are:
- Reading the
errors
field to see if there are any errors. - not further polling
getRenderProgress()
if thefatalErrorEncountered
field istrue
.