Clearer errors and rendering fixes

Invalid selectors and failing scripts return an error that says what to fix, closed shadow roots are included in the HTML, more sliders stay still when reducing motion, and the JPEG 2000 format works.

Changelog2 min read

Written by

Dmytro Krasun

Published on

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 to selector, click, hover, scroll_into_view and wait_for_selector.
  • Scripts that throw. When the code in scripts throws an error, you get request_not_valid with 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_error within 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_error right away instead of a timeout or an internal error.
  • Elements too large for the image format. A screenshot by selector of an element that is too large for the requested format returns resulting_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=jp2 failed. They work now.
  • Pages with large inline images. With block_ads, block_trackers or block_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.

Read more product updates

New features, bug fixes, and optimizations...

View all product updates
Multiple notification recipients

Multiple notification recipients

Add multiple dedicated email recipients for usage limit notifications.

Read more

1 min read

ScreenshotOne is available on viaSocket

ScreenshotOne is available on viaSocket

Automate website screenshots, animated scrolling captures, and visual documentation workflows with ScreenshotOne and viaSocket.

Read more

1 min read

ScreenshotOne can now return screenshots and HTML in one request

ScreenshotOne can now return screenshots and HTML in one request

Starting from today ScreenshotOne can return both a website screenshot and the content in one simple API request.

Read more

1 min read

Automate website screenshots

Exhaustive documentation, ready SDKs, no-code tools, and other automation to help you render website screenshots and outsource all the boring work related to that to us.