Skip to content

Timeout Error

It is an API error returned when the API can’t render screenshots or video within the specified timeout:

{
"is_successful": false,
"error_code": "timeout_error",
"error_message": "The screenshot couldn't be taken within the specified timeout. Either the site doesn't respond quickly, or rendering takes longer than expected. Play with the `timeout` or the `navigation_timeout` options or reach the support for the investigation.",
"documentation_url": "https://screenshotone.com/docs/errors/"
}

Let’s quickly consider possible reasons and possible solutions.

By default, the timeout is about 60 seconds. You must fit your rendering request within that timeout.

You can:

Either use asynchronous requests and webhooks to get the results. And set the timeout up to 300 seconds. Or you can try to increase the timeout up to 90 seconds.

Make sure that your delay is not too big, e.g. if you set it to 30 seconds, and it takes the website to load for 30 seconds, it is better to decrease the delay.

Some sites just take too much time to load or they don’t emit DOMContentLoaded events.

Try to play with different values of the wait_until option and see if it helps.

A proxy is not the first fix for timeout_error. First try to reduce the page weight, decrease delay, adjust timeout or navigation_timeout, or use asynchronous requests and webhooks.

Retrying once with a proxy can help when the timeout looks like IP-based throttling, regional routing, or a page that stalls only from ScreenshotOne’s default IP range. Only do this for targets where automated access is allowed.

See when to retry with a proxy for the full retry matrix and a code example.

Often when you record a video of a long duration, the API must not respond in time. Since it takes to both record a video and stream it.

Try to decrease the video duration you are recording, it might help.

If nothing helps you, please, reach out to support@screenshotone.com and we will try to help you as fast as possible.