# Changelog of Website Screenshot API: Bulk PNG & JPEG, Full Page (`madpai/website-screenshot`) Actor

- **URL**: https://apify.com/madpai/website-screenshot/changelog.md
- **Full Actor documentation**: https://apify.com/madpai/website-screenshot.md

## Changelog

Engineering changelog for this repo. The Store-facing changelog is kept by Listing.

### 0.1.5 (2026-11-12)

#### Fixed

- ws-9 (Store QA): a run never ends with an empty dataset. URLs the run's maximum charge can't cover get a free item with `errorCode: "charge-limit"` (before: skipped silently, so a max charge below one screenshot gave SUCCEEDED with 0 items). Empty or missing `urls` saves one free `invalid-input` item and the run succeeds, instead of `Actor.fail`. A final safety net saves a free `failed` item if nothing else was saved.
- The `screenshot` charge is only attempted when the budget covers it; a platform charge error keeps the screenshot item (logged, no duplicate).
- Run time limit (QA 2026-11-12, shared deadline fix): there was none, so a slow or hanging site could run into the platform timeout. With a timeout of 330 s or less (including the default 300 s) no new page starts after 240 s; with a longer timeout, 45 s before it; without a known timeout (local runs) there is no cap. Page waits (one page per host, politeness delay, `Crawl-delay`, `Retry-After`) never cross that deadline, navigation gets min(45 s, time left), no retry starts after it, and a backup timer shortly after it stops waiting for open pages. Every URL not captured in time gets a free item with `errorCode: "run-time-limit"`, including a page whose navigation was cut short by the deadline (it said `failed` before) and a URL whose robots.txt couldn't be fetched in time (it said `robots`); `OUTPUT_SUMMARY.timeLimited` and `timeHit` count them.
- QA 2673273 M1: the private-address DNS check before each URL now waits at most 5 s (or the time left, if less), for every URL, also one whose name is already being looked up; a lookup that timed out isn't reused. A host name whose DNS never answered stalled the URL pre-check, which runs before the browser starts, until the platform timeout: the run ended with 0 items. The pre-check now also stops at the deadline (the remaining URLs get `run-time-limit`) and is covered by the backup timer. The connection itself is still checked against the addresses it really uses.
- QA 2673273 M2: a page whose save (item + charge) was still running when the backup timer fired is no longer cut off at exit or given a second, free `run-time-limit` item. Each URL claims its single item when it is saved, and the run waits for saves still running (up to 10 s before the platform timeout). `OUTPUT_SUMMARY.itemsPushed` now counts every saved item, including `run-time-limit` and `charge-limit` ones.
- QA 2673273 P2-1 (also in 0.1.4): all tabs share one Chrome renderer, so one page that hangs or spins blocked every later page (`newPage() timed out`). After a page times out, the next page starts in a fresh browser (`OUTPUT_SUMMARY.browserRestartsAfterTimeout`).
- robots.txt fetches follow the same deadline (shared `polite.ts`); a robots.txt whose body stalls is treated as unreachable (RFC 9309: disallow) instead of failing.

### Unreleased

#### Changed

- Cost: optional `networkidle` waits are capped at 5 s (navigate to `load` first).

#### Fixed

- ws-8: recycle the browser at 60% of run memory or after 3 pages (was 70% / 4). Measured 8 heavy news pages: 1480–1556 MB (72–76%) defaults, 1555–1670 MB (76–82%) with media on.
- Chrome quiet flags and a small allow-list drop of Chrome updater hosts (clients\*.google.com, update.googleapis.com, redirector/edgedl gvt1, accounts.google.com, …) so background Google traffic no longer goes out through the guard proxy; Chrome's default UA carries the WebsiteScreenshot product token.
- bulk-url-status-checker-2 (DNS rebinding): Chrome now reaches the web only through a small guard proxy inside the Actor, which connects with the connect-time address check. A page, redirect hop, sub-resource, iframe or WebSocket whose host name resolves to a private, loopback, link-local or reserved address at connect time is refused (HTTP 403 or failed tunnel). A refused page is a free `blocked-private` item with no retry. QUIC and non-proxied WebRTC UDP are disabled, and Chrome does no DNS of its own. `OUTPUT_SUMMARY.requestsBlockedPrivate` counts refused browser requests.
- ws-8 (memory on batches of heavy pages): the browser is restarted, with the same settings and guard-proxy flags, when the Actor and Chrome together reach 70% of the run memory or after 4 pages, whichever comes first. Chrome kept 150–250 MB per heavy page, so 8 heavy news pages peaked at 1.8–2.2 GB of 2048 MB. Measured now: 1495–1531 MB by default, 1582–1674 MB with `blockMedia` off. `OUTPUT_SUMMARY.browserRestarts` counts restarts by trigger, and `peakMemoryMb` records the highest memory seen after a page.
