• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microlinkhq / browserless / 29776805285 / 6
79%
master: 79%

Build:
DEFAULT BRANCH: master
Ran 20 Jul 2026 08:39PM UTC
Files 3
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Jul 2026 08:36PM UTC coverage: 97.826%. Remained the same
29776805285.6

push

github

web-flow
fix(screenshot): never let the text walk fail a capture (#845)

* fix(screenshot): never let the text walk fail a capture

`waitForReady`'s snapshot built a TreeWalker over `document.body ||
document.documentElement`. A document that is mid-parse or detached has
neither, and `createTreeWalker` throws on a null root. Because that is not a
context-destroyed error, the gate rethrows it by design, so a survivable DOM
state failed the whole render.

Observed on production 3.42.8, three times in six hours, on documents of 6, 25
and 426 pages:

  chunk:failed ... message="Failed to execute 'createTreeWalker' on 'Document'"

Guard the root, and wrap the walk so a DOM mutating underneath it keeps the
count taken so far. `text` is only a paint signal: not being able to read it
means "no text seen yet", which leaves the gate conservative — it re-polls, or
falls through to the blank-page screenshot check — instead of failing a capture
that would otherwise succeed.

The rethrow for genuine evaluation errors is unchanged; its test still passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(screenshot): guard every root dereference in the snapshot

The #845 guard covered the TreeWalker root but the same null-documentElement
state still threw one line before the return: `scrollHeight` (and `clientWidth`/
`clientHeight` behind a zero innerWidth) dereferenced the root unguarded, so the
production error moved instead of dying. Resolve the root once and degrade every
read to zero; a transient height 0 just resets the quiet window and re-polls.

Live regression test reproduces the exact state (document.removeChild of the
root) and fails without the guard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1ecHpTgQwD4cH7vutmCon

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

24 of 26 branches covered (92.31%)

Branch coverage included in aggregate %.

66 of 66 relevant lines covered (100.0%)

5.06 hits per line

Source Files on job @browserless/lighthouse - 29776805285.6
  • Tree
  • List 3
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 29776805285
  • a6f8db53 on github
  • Prev Job for on master (#29723095263.5)
  • Next Job for on master (#29778167541.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc