Some requests failed with an internal error or a timeout, although the cause was in the request or on the site. They now return an error that says what to fix. We also fixed a few rendering issues.
Some errors change their code, so if you handle errors in your code, check the list below.
Errors that say what to fix
- Invalid selectors. A selector that isn’t valid CSS never matches, so the request waited until it timed out or failed with an internal error. Now it fails at once with
request_not_valid(HTTP 400), which names the option and the selector. It applies toselector,click,hover,scroll_into_viewandwait_for_selector. - Scripts that throw. When the code in
scriptsthrows an error, you getrequest_not_validwith the error it threw, instead of an internal error. - Redirect loops. A site that keeps sending the browser from one page to another returns
network_errorwithin seconds. Before, the request failed with an internal error after almost a minute. - Responses cut short. When a site’s server starts sending a page and then drops the connection, you get
network_errorright away instead of a timeout or an internal error. - Elements too large for the image format. A screenshot by
selectorof an element that is too large for the requested format returnsresulting_image_too_large(HTTP 400) instead of an internal error.
Shadow DOM in HTML
include_shadow_dom returned only open shadow roots. It now returns closed ones too, as documented.
Pages whose components define their own shadowRoot property failed with an internal error. They now return their HTML.
Reducing motion
When reducing motion, LayerSlider, Slider Revolution and Beaver Builder slideshows now stop on their first slide, so repeated screenshots of the same page match.
Other fixes
- JPEG 2000. Requests with
format=jp2failed. They work now. - Pages with large inline images. With
block_ads,block_trackersorblock_cookie_banners, pages that embed large images in their HTML could take minutes and time out. They now render in seconds. - Sites that reloaded without end. On some sites, blocking cookie banners blocked a script the site needs to start, and the page kept reloading. These sites now render, with the banner hidden.
- Webhooks. A request could get a success webhook followed by an error one. Now a success webhook is never followed by an error webhook. A delivery that fails with a network error or a timeout is retried like any other failed delivery.
Security
We also made security improvements to how the API renders pages.
If you have any questions, please contact support@screenshotone.com.


