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

microlinkhq / browserless / 29776805285
79%

Build:
DEFAULT BRANCH: master
Ran 20 Jul 2026 08:37PM UTC
Jobs 9
Files 35
Run time 1min
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: 80.587% (-0.2%) from 80.796%
29776805285

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>

691 of 850 branches covered (81.29%)

Branch coverage included in aggregate %.

0 of 46 new or added lines in 1 file covered. (0.0%)

3676 of 4569 relevant lines covered (80.46%)

109667.28 hits per line

Uncovered Changes

Lines Coverage ∆ File
46
39.68
-1.88% packages/screenshot/src/wait-for-ready.js
Jobs
ID Job ID Ran Files Coverage
1 @browserless/goto - 29776805285.1 20 Jul 2026 08:39PM UTC 3
75.71
GitHub Action Run
2 browserless - 29776805285.2 20 Jul 2026 08:38PM UTC 3
79.48
GitHub Action Run
3 @browserless/capture - 29776805285.3 20 Jul 2026 08:37PM UTC 11
86.63
GitHub Action Run
4 @browserless/screencast - 29776805285.4 20 Jul 2026 08:37PM UTC 1
95.74
GitHub Action Run
5 @browserless/function - 29776805285.5 20 Jul 2026 08:37PM UTC 3
97.0
GitHub Action Run
6 @browserless/lighthouse - 29776805285.6 20 Jul 2026 08:37PM UTC 3
97.83
GitHub Action Run
7 @browserless/errors - 29776805285.7 20 Jul 2026 08:37PM UTC 1
99.32
GitHub Action Run
8 @browserless/screenshot - 29776805285.8 20 Jul 2026 08:37PM UTC 9
68.12
GitHub Action Run
9 @browserless/devices - 29776805285.9 20 Jul 2026 08:37PM UTC 1
94.92
GitHub Action Run
Source Files on build 29776805285
  • Tree
  • List 35
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29776805285
  • a6f8db53 on github
  • Prev Build on master (#29723095263)
  • Next Build on master (#29778167541)
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