Compare commits

..
Author SHA1 Message Date
Federico 8c24507b5a A gate on the guides, and the one live defect it found (#178)
* A gate on the guides, and the one live defect it found

Nothing was reading the 454 pages in docs/. One of them published
`tree = page.accessibility.snapshot()`, an attribute this fork does not have
and does not refuse by name, so anybody who ran that block got an
AttributeError. It is corrected to page.aria_snapshot(), which exists.

scripts/check_docs_api_surface.py asks the REAL classes what they have and
refuses any name in a ```python block that is not there. Two other designs
were measured first and rejected, and the reasons are in the docstring so
nobody rebuilds them: parsing every block fails on 82 of 1169 deliberate
fragments, so it would be born red on correct pages; and checking attributes
on a returned value would not have caught the defect that prompted all this,
because in that one the attribute was real and the runtime value was None.

Five known-bad inputs and seven that must not fire, because a gate that
refuses everything is as useless as one that passes everything. The foreign
objects that share a name - an httpx response, a pdfplumber page, pytest's
request fixture, an hrequests page - are skipped by the library the block
names, and every entry there came from a measured false positive.

Required by the gate job, and skipped rather than faked green during the
window where the pinned core is not yet on the index, exactly as unit is.

* The prose said the old name too, and the gate cannot see prose

Fixing the code block left the sentence under it still promising
accessibility.snapshot(). The gate reads only ```python blocks - that blind
spot is declared in its docstring, and it took about a minute to bite.

A page whose prose contradicts its own example is worse than either half
being wrong alone, because a reader believes the sentence.
2026-09-08 03:20:02 +02:00
github-actions[bot]andfeder-cr 39010ed45e record 0.13.2 as published, and date it the day the index took it (#176)
* record 0.13.2 as published

* Run the checks the bot's token cannot trigger

* Date 0.13.2 the day the index took it

The upload is 2026-09-07T23:53Z; the heading said 2026-09-08, which is the
local date an hour later. test_the_changelog_documents_every_version_it_claims_to_cover
compares the two and is right to refuse.

---------

Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-08 02:14:55 +02:00
Federico d34a11e886 Thin out one repeated construction, and give the last eight orphans a home (#177)
Two related pieces of corpus hygiene.

The first: "rather than" ran at 2.60 per thousand words across 454 pages, with
one page using it sixteen times. A construction repeated at that rate is a
signature and not a style, which this corpus established in July when the same
phrase was cut from 63 uses across 21 pages down to 23. The corpus has grown
twentyfold since and nobody recounted.

136 pages were over five uses. 351 of them are rewritten, bringing every page
to five or fewer and the corpus mean from 4.4 to 3.6 per page.

The rewrites are varied on purpose. Replacing all 351 with "instead of" would
have taken that phrase from 1.19 to 1.65 per thousand words, which is trading
one signature for another. The load is spread by syntactic context instead: a
gerund takes "instead of", a preposition and a bare noun take a comma and
"not", a determiner alternates between the three. The result moves "rather
than" from 2.60 to 2.14, "instead of" from 1.19 to 1.32, ", not" from 2.45 to
2.71, and "in place of" from 0.01 to 0.05. Nothing spikes.

Verbs in the base form were left alone: rewriting those needs a judgement per
sentence, they are only 30 cases in the corpus, and there were plenty of safe
candidates without them.

The second piece: eight pages published on 5 September had no inbound link
from anywhere in the prose. Each now has one entry in the body of the pillar
it declares as its parent, in the section it belongs to. Both corpora are now
at zero orphans. Worth stating plainly, because the obvious reading is wrong:
this is not an indexing fix. All eight are outside Google's index, and so are
the two pages of the same wave that did have inbound links.

Internal links all resolve, no line endings touched, and the four files with
unbalanced brackets are code samples that were already that way.
2026-09-08 02:01:55 +02:00
Federico 5f528357a6 Return the navigation Response from goto, reload and history (#174)
goto answered None on every navigation because op_goto ended with a hardcoded {"response": None}. The page loaded, the response events carried the right statuses and expect_response worked; only the return value was missing, so page.goto(url).status was unreachable. Crawlee reads that value and treats None as a failed load, so a PlaywrightCrawler driven by this package failed every request: 0 finished / 2 failed before, 2 / 0 after, against a local server.

The engine needed no change. navigationId is set only on the main document channel and is inherited by every hop of a redirect chain, so PageDispatcher can index the document request by it exactly. reload and the history commands share the fix.

Released as 0.13.2, because the version job correctly refused a head whose wheel files had moved while pyproject still declared a version the index already serves.
2026-09-08 01:50:07 +02:00
Federico 70a8164d26 Give the twenty September guides the blocks the house format requires (#175)
The wave published on 7 September went out without the question block, the
See also line and the Sources section: rules 6, 7 and 8 of the format every
article on this wiki follows, missing on all twenty. 416 of the other engine
pages carry the question block, which is the long-tail capture device, so the
gap was in these twenty and not in the convention.

Each page gets four questions in the words people actually type, answered from
what the page already argues, so no new claims are introduced. Each See also
names pages the article already links in its body, using their real titles.
Each Sources section names what the page was checked against: the Playwright
reference for the calls the code makes, and a primary source where one is
genuinely on point - RFC 5545 for the calendar feeds, MDN's getComputedStyle
and content for the pseudo-element page, MDN's aria-label for the page about
numbers drawn as images, PyPI's stats API for the download-count page. Every
one of those nine URLs was fetched and returns 200.

Purely additive: 668 lines added, none removed, no line endings touched.
2026-09-08 01:44:02 +02:00
Federico 8a8dc8d0fd Give the twenty new guides their inbound links (#173)
They shipped with zero inbound internal links, against the register's own rule
that a new page goes into the body of the relevant pillar. The pillar here is the
Scraping with Playwright hub, and adding them to it is that page's purpose rather
than stuffing: nine into the vertical section beside the flight, crypto and
directory guides, eleven into the objects section in its filename order.

The in-body links are only two, and the reason is the rule that the anchor must
already exist in the sentence. Six candidates matched a search; four were false
positives on inspection. The printer-friendly guide already writes
getComputedStyle(el, "::after").content while explaining that generated content
is not in the DOM, and the transport timetable guide already says a live
departure board is not a timetable. Those two are links. The other four were
opac inside opacity: 0, sprite sheets in a list of sub-resources, and
Playwright's platform compatibility table, and writing a sentence around any of
them would have been the stuffing the rule exists to prevent.

The hub edit is twenty added lines and no removed ones, verified against a copy
taken before the change, after restoring CRLF: the script that inserted them had
rewritten the whole file to LF, which would have shown as a 199-line rewrite.
2026-09-07 23:59:12 +02:00
Federico 648aacfabd Put our own measurements into the two guides that can carry them (#172)
The twenty guides shipped without a single measurement of our own, which is the
one thing the article method treats as more important than length. Two of them
can host one truthfully, and these are those two.

CSS pseudo-element content now carries the closed shadow root finding. Two
Playwright issues describe what look like separate problems, #23047 (locators
cannot enter mode:"closed" roots, open since May 2023, 26 comments) and #30816
(Page.content() does not serialize shadow DOM at all, closed, 2 comments). They
are one gap seen from two sides, and nobody has connected them: the search
`repo:microsoft/playwright 30816 23047` returns exactly two results, the two
issues themselves, re-verified against the API today rather than taken from the
research note. That is why advice for one symptom never helps with the other.

Numbers rendered as images now carries the canvas bench result. Hashing the PNG
bytes of the same page across three runs gave three different md5 values on
unmodified retail Firefox, which reads as canvas randomisation and is false: the
files had identical byte length and differed only in encoder metadata. Comparing
the decoded pixel array instead, all three runs were stable. The rule that falls
out is concrete for anyone watching a rendered number for change, and it comes
with the code.

The other eighteen are left alone rather than given a decorative statistic. A
measurement belongs to an article only when the article is actually about the
thing measured.
2026-09-07 22:50:47 +02:00
Federico c61579c2f4 Extend the twenty new guides to the length the corpus publishes at (#171)
They shipped at 851 words on average against roughly 1,900 for the pages that
rank, which was stated at the time as open work. Each one now carries three more
sections, and the additions are substance rather than padding:

- a complete run, end to end, with the parts production needs: a resumable loop,
  a flush per record so an interrupted run leaves usable data, and the guard that
  distinguishes an empty result from a failed read;
- what the specific target does when it decides to stop serving you, which
  differs sharply by domain. Carrier endpoints defend against enumeration,
  comparison engines are slow rather than hostile, bank sites cache hard, court
  portals rate limit and do not forgive, school sites simply go stale, and
  library catalogues degrade by session rather than by policy;
- the schema, with the question each grain exists to answer: connector-level
  transitions for charger utilisation, event logs for adoption waiting times,
  status history for permit durations, both timestamps everywhere so staleness is
  measurable rather than assumed.

Several also gained the check that separates a real absence from a silent
refusal, which is the failure this corpus keeps meeting: a table that renders
empty, a town with no stations, a docket that lost its entries, a series that
returns zeros. Each is now a distinct outcome rather than a plausible row.

Average is now 1,433 words, from 851. That is closer to the corpus norm and still
short of it, and saying so is more useful than padding to a number: the measured
data says length does not separate the pages that rank from the ones that do not.
2026-09-07 21:52:03 +02:00
Federico 0bd093d285 Twenty new scraping guides, chosen from the ranking data (#170)
Which topics win is now measured rather than assumed. Among the pages Google has
indexed, our own-title queries rank 84% of the time and generic demand queries 4%,
and the ten indexed pages that lose on their own title are the most generic
Playwright and scraping subjects: generating a PDF, rate limiting, e-commerce
product pages, headless versus headed, recording a trace. That family was
excluded on purpose.

The twenty added here are narrow objects or mechanisms, each with a different
technical problem at its centre so they do not read as twenty variants of one
article:

  duration bands rather than a price          parking rates
  live status with two distinct timestamps    EV charging availability
  the location decides the result             fuel prices
  seasonality, and cancellations as events    ferry schedules
  session-bound catalogue, copies per branch  library availability
  a timeline that reorders and gets revised   package tracking
  a DOM rewritten while you read it           flight status boards
  a unit that changes underneath you          snow reports
  the disappearance is the data               pet adoption listings
  postback forms, and a resumable run         construction permits
  never enumerate, only known cases           court dockets
  deadlines that are frequently not dates     scholarship listings
  a grid of parallel tracks, and timezones    conference agendas
  the series behind the chart                 package download statistics
  the footnote that changes the number        bank interest rates
  a quote is a function of its inputs         energy tariffs
  prefer the calendar feed, expand inclusive  school term calendars
  cascading dropdowns, a cross product        spare part compatibility
  sprites and remapped fonts, and when to stop numbers rendered as images
  not in the DOM at all                       CSS pseudo-element content

They sit at nav_order 150 to 169 under Scraping with Playwright, with no
collisions and no internal links broken. Every page carries the honest limits of
its subject, including the cases where the right answer is to stop and ask the
site for the data instead.

One deviation from the house standard, stated rather than hidden: these average
851 words against roughly 1,900 for the corpus that ranks. Length was measured
and does not separate winners from losers on its own, but extending them is
still open work.
2026-09-07 21:18:57 +02:00
Federico 61fde53457 The server's command is uvx aihawk (#169)
Since aihawk 0.11.0 the MCP server is aihawk with no subcommand, so the one line a reader copies is claude mcp add stealth -- uvx aihawk, and the pages that name the server call it aihawk. The old command keeps working through the shim but is not what a new reader should copy.
2026-09-07 00:55:24 +02:00
Federico 823217b484 The MCP server lives in AIHawk: the two repository links and the family bullets say so (#168)
The server repository was merged into AIHawk (aihawk 0.10.0, module aihawk.mcp); the PyPI name invisible-playwright-mcp stays as a shim, so the commands on these pages are unchanged and only the links move: to the wiki page that now holds the server's config blocks, settings and tools.
2026-09-07 00:54:55 +02:00
Federico b8243bb0c2 The MCP server lives in AIHawk: the two repository links and the family bullets say so (#167)
The server repository was merged into AIHawk (aihawk 0.10.0, module aihawk.mcp); the PyPI name invisible-playwright-mcp stays as a shim, so the commands on these pages are unchanged and only the links move: to the wiki page that now holds the server's config blocks, settings and tools.
2026-09-07 00:13:39 +02:00
Federico 0f14cc782d The two sibling one-liners run through uvx again (#165)
Owner decision, 2026-09-06, after a survey of comparable projects: pip refuses
outside a virtual environment on current Debian and Ubuntu, and on Windows a
Store Python leaves pip scripts off the PATH, so the one route that works for
every reader is uv. Reverts the pip form of this block from earlier today; the
sibling pages say the same.
2026-09-06 17:03:09 +02:00
Federico d4faa9ebaf The two sibling one-liners install with pip (#164)
The README block that points at the MCP server and at AIHawk showed both
through uvx. Both now read pip install followed by the command, which is how
their own pages say it since 2026-09-06. One wiki page loses the prefix too.
2026-09-06 11:12:32 +02:00
github-actions[bot]andfeder-cr 39e4dd2e0f record 0.13.1 as published (#163)
* record 0.13.1 as published

* Run the checks the bot's token cannot trigger

---------

Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-06 04:55:34 +02:00
Federico 76a7a0ce21 Pin invisible-core 29.19.0: the engine is firefox-29, which has the screencast (#162)
* Pin invisible-core 29.19.0: the engine is firefox-29, which has the screencast

page.screencast.start() shipped in 0.13.0 against a sealed engine that could
not answer it; the seal now points at firefox-29, which carries the screencast
and crops the Windows resize border out of a full-window frame. The pin
follows the seal and nothing else moves. Version 0.13.1.

* 0.13.1 is dated by the clock in UTC, not the one on the desk
2026-09-06 04:39:38 +02:00
github-actions[bot]andfeder-cr 0d65c54eb6 record 0.13.0 as published (#160)
* record 0.13.0 as published

* Run the checks the bot's token cannot trigger

---------

Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-06 03:00:21 +02:00
Federico 5a786f43d6 The 0.13.0 changelog heading is dated by the upload (#161)
PyPI records the 0.13.0 upload on 2026-09-05 UTC; the heading said the 6th,
which was the local date after midnight. test_release_e2e compares the two
and it is right to.
2026-09-06 02:45:22 +02:00
Federico 1f6f8d1ac8 page.screencast streams JPEG frames of the window, pointer included (#159)
* page.screencast streams JPEG frames of the WINDOW, pointer included

page.screenshot() is the content viewport and can never show the pointer:
it is drawn in the chrome document so that no page can see it. The engine's
screencast is back since firefox-28, rebuilt on the browser's own window
capture with a fullWindow flag of ours, and the in-process Juggler server
now answers screencastStart and screencastStop with it. Every frame the
engine sends goes up to the vendored client under the names it reads and
is acknowledged from the reader thread with a new Connection.post, which
sends without waiting: a send there would wait for a reply only that
thread can deliver. The pipe gets a write lock, because two threads now
write it. A video file (path=) is refused by name: there is no encoder.

Measured against the objdir build: under headless=True, which on Windows
is the cloaked window, 146 frames in fifteen seconds at the requested ten
per second, 782x676 with 87 percent of the pixels being the page served
and none black - the capture reads a cloaked window. The unit tests build
a PageDispatcher without a browser and were run against three known-bad
inputs, listed in the module docstring.

* Version 0.13.0: the screencast is a feature, not a fix

The changelog entry moves from Unreleased to 0.13.0, dated today.

* The screencast e2e skips, by name, on an engine that has no screencast

The CI drives the sealed engine, firefox-27, which has no
Page.startScreencast: the first run went red on that sentence with 206
other tests green. Until the seal rolls to firefox-28 the test skips
naming the engine; any other refusal is still a failure.
2026-09-06 01:51:33 +02:00
github-actions[bot]andfeder-cr 95c791d351 record 0.12.3 as published (#158)
* record 0.12.3 as published

* Let the gate run on the ledger branch

* The 0.12.3 entry carries the index's date

The upload landed on 2026-09-05 UTC; the entry said 2026-09-06, the local
calendar at the time of the tag. test_the_changelog_documents_every_version_it_claims_to_cover
compares the two and was right to refuse.

---------

Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-06 01:10:02 +02:00
Federico 907150bf60 Pin invisible-core 27.19.0: orphaned .tmp trees in the engine cache are swept (#157)
A download killed during verifying or extracting used to leave up to the whole
extracted tree under cache_root()/.tmp-<tag>-<pid>, because only a fresh
download by the same pid ever removed it. The core now sweeps the trees whose
process is gone on every ensure_binary, warm path included, and leaves alone
its own tree, a live process's tree and anything not named after a pid. The
MCP server 0.13.0 starts the download with the process, which turned a killed
download from a Ctrl-C into an ordinary event.

Pin moved with scripts/sync_core_pin.py after the core landed on the index.
Version 0.12.3, a pin bump: nothing this package launches the browser with
changed.
2026-09-06 00:37:38 +02:00
Federico d86f52c9c8 The README says the one thing the stock driver cannot do (#155)
Playwright's own docs rule out closed-mode shadow roots, and measured this
week stock Playwright returns nothing for that content in Firefox and
Chromium alike while this engine returns the element, with the page still
reading null from shadowRoot. That was documented on the wiki and nowhere a
reader would see it. One paragraph, the measurement, and the link to the
page that prints the reproduction.
2026-09-05 15:36:17 +02:00
Federico 686607738e Ten mechanics pages, and one correction the measurement forced (#154)
Three arms on one local page settled a claim this wiki had been making
confidently: stock Playwright finds nothing inside a closed shadow root,
in Firefox and Chromium alike, while this engine reaches the content with
the page still reading null from shadowRoot. The shadow DOM page said the
boundary was absolute for everyone; it now says what was measured, and
links the new page that prints the reproduction.

Two more recipes died the same way, which is why every code block in this
wave was executed before it shipped. The keyboard fallback everyone
recommends for a stubborn dropdown, click then ArrowDown then Enter, does
not move the value at all: focus without the click does. And
document.fonts.check() answers true for a font family invented on the
spot, so it cannot tell you whether a container has the font you think.

The rest: Queue-it waiting rooms and why there is nothing there to defeat,
memory on long runs with the measurement method that does not double count
a previous browser, ARM64 Linux, fonts in slim images, canvas across
operating systems, downloading linked PDFs (where the out-of-page request
API is refused by design and the in-page fetch is the route), select
options for native and custom dropdowns, a browser-use comparison with the
conflict declared, and the Windows first-launch failure with the registry
correlation reported as our observation rather than an architecture claim.
2026-09-05 13:22:23 +02:00
github-actions[bot] e2b795eea4 record 0.12.2 as published (#152)
The ledger entry the publish workflow wrote for 0.12.2, from the artifacts the index serves.
2026-09-05 12:36:32 +02:00
Federico 4ddf1f9fb7 The persistent-profiles page names the defect that was ours (#153)
The page listed two upstream Playwright reports about cookies vanishing between
runs and told the reader to look there before rewriting their own code. From
0.8.0 to 0.12.0 this client dropped them itself: the persistent launch handed
back a Juggler container whose storage dies with the session. Fixed in 0.12.1;
a reader on one of those versions should upgrade before reading anything else,
and the page now says so.
2026-09-05 12:36:12 +02:00
Federico 790a123c86 0.12.2: the launch counter lives on the engine's repository (#151)
The pin moves to invisible-core 27.18.0, which declares the launch counter's
address in every session: the usage-counter release of the repository that
builds and ships the engine. The engine's compiled default says the same from
the next build. Engines older than firefox-21 do not read the pref and are not
counted; the ping can be turned off with invisible_firefox.usage_ping.enabled.
2026-09-05 12:24:24 +02:00
Federico 0d2dae5862 The browser launches badge is back, because the number behind it is live again (#150)
It went in 0.7.2, when the counter it read lived on a repository that had just
been deleted: the renderer would have redrawn the last real value every morning,
and a frozen figure presented as current is worse than none. The counter has
lived on this repository since 2026-08-19 and has been counting since, about
twenty thousand launches a day at the moment, so the badge shows a live number.

It is cumulative and it undercounts: engines before firefox-21 carry the old
address compiled in and rejoin the count only as their users upgrade.
2026-09-05 04:23:52 +02:00
github-actions[bot] 101b8099fe record 0.12.1 as published (#149)
The ledger entry the publish workflow wrote for 0.12.1, from the artifacts the index serves.
2026-09-05 04:09:12 +02:00
Federico 874277167f A persistent profile keeps its cookies and storage for the next session (#148)
Since 0.8.0 profile_dir kept nothing. The persistent launch handed back an
ordinary context: Browser.createBrowserContext, a Juggler container with its
own userContextId, whose destroy() calls ContextualIdentityService.remove and
deletes the container's cookies and storage with the identity. The first
session set a cookie and a localStorage entry and read both back; the second
session on the same profile read an empty jar and None; cookies.sqlite in the
profile held zero rows throughout. Measured 2026-09-05 against the published
0.12.0 from a clean environment.

Upstream's persistent context is the browser's default one, userContextId 0,
whose state is the profile's. It is addressed by omitting browserContextId,
never by null, because Juggler registers it under undefined and Map.get(null)
finds nothing; and it is never removed, closing it closes the browser. One
function now owns that rule and every command that names a context goes
through it, so the twelve option pushes, newPage, the cookie commands and
close all agree.

The e2e writes a cookie and a localStorage entry in one session, reads the
cookie row from cookies.sqlite on disk in between, and reads both back in a
second session on the same profile. Against 0.12.0 it fails on the on-disk
read. Three pure tests pin the addressing rule, including the null trap.
Version 0.12.1.
2026-09-05 03:48:55 +02:00
github-actions[bot] 0828d6b9b0 record 0.12.0 as published (#147)
The ledger entry the publish workflow wrote for 0.12.0, from the artifacts the index serves.
2026-09-04 20:58:08 +02:00
Federico 0a16b783d6 0.12.0: the engine moves to firefox-27, where the first launch on Windows works (#146)
The pin goes to invisible-core 27.17.0, which seals firefox-27. That engine
changes one thing: on Windows the launcher process forwards the Juggler pipe it
is handed in the environment instead of reading CRT descriptors this client
never opens, so the first launch from a path the browser had never run from no
longer exits with 3221226505. Everything else in the engine is firefox-26.

The changelog entry says what it was, why it failed exactly once per machine,
and since when; the test that keeps it fixed is the commit before this one.
2026-09-04 20:46:17 +02:00
github-actions[bot] 31ba882e6d record 0.11.0 as published (#143)
The ledger entry the publish workflow wrote for 0.11.0, from the artifacts the index serves.
2026-09-04 18:23:43 +02:00
Federico fc7915483f The version gate asks whether the package moved, not whether the number is taken (#145)
On its first day the gate refused the two pull requests that follow every
release: the ledger the publish workflow opens by itself, and the changelog
entry for the release. Both carry the published version, and a bump on either
would be a lie, because nothing that ships had moved.

The question it asks now is the one it always meant. Since the tag of the
published version, has anything changed that goes into the wheel, the package
tree the build backend names or pyproject.toml? The ledger, the changelog,
tests, workflows and docs alter nothing anybody installs and pass without a
bump; a change under the package does not. The tag has to be in the checkout,
so the version job fetches the full history, and a taken version with no tag
in the clone is refused rather than guessed at.

Two known-bad inputs: a pure classifier fed the ledger, the changelog, a test,
a workflow and a same-prefix sibling of the package, which must all not count,
against files under the package, which must; and the previous release's tag,
from which the package moved by definition.
2026-09-04 18:17:42 +02:00
Federico fc0a2827ac Fifteen commits of content under a version the index already served (#142)
Measured 2026-09-04: 0.10.0 is on the index while main sat on 0.10.0 with FIFTEEN
commits on top of the tag - 39 files, 841 insertions, the screenshot clip fix
among them. A release from there would have published NOTHING and reported
success, because publish.yml asks the index first and treats an already-present
version as a deliberate no-op. That is right for a re-pushed or backfilled tag
and indistinguishable from somebody forgetting to bump, so the fix could not have
reached anybody and nothing would have said so.

This is the third package with the same hole; the sibling found it first. The
check asks the index whether the version a change proposes is still free, on pull
requests only - on main straight after a release the version IS the published one
until somebody bumps, and a gate that is red at rest is one people learn to skip.
Bumping publishes nothing, so the rule costs one line in the change that earns
the release. Hence 0.11.0.

⛔ The known-bad input is PER PACKAGE, and copying it from a sibling was wrong.
It said 0.1.0, which this package has never published - the oldest here is 0.3.5.
The test failed rather than passing on a version that does not exist, which is
the only reason the mistake was visible.

Three outcomes rather than two: a network error is neither present nor absent,
and scoring it as absent turns an unreachable index into a green gate.
2026-09-04 13:15:28 +02:00
SamadhiFire f2474beb0b Two launch gates stop calling the removed path command (#141) 2026-09-04 13:10:33 +02:00
Federico 03f695d813 Merge pull request #140 from feder-cr/docs/differentiation-wave
Three twin pages stop sharing a title's intent, and the pairs the tracker cleared stay put
2026-09-04 02:03:56 +02:00
feder-cr 3b6fee9957 Three twin pages stop sharing a title's intent, and the pairs the tracker cleared stay put 2026-09-04 01:57:16 +02:00
Federico f4f5f13629 Merge pull request #139 from feder-cr/docs/audit-code-fixes
Twelve pages stop shipping code that cannot run as pasted, and two claims catch up with their sources
2026-09-04 00:43:40 +02:00
feder-cr 3fbbf6dd30 Twelve pages stop shipping code that cannot run as pasted, and two claims catch up with their sources 2026-09-04 00:36:26 +02:00
Federico c08444186e Merge pull request #138 from feder-cr/docs/strip-image-metadata
Tool metadata out of the shipped screenshots, and a code sample readers can actually read
2026-09-04 00:28:46 +02:00
feder-cr 52a1fc0859 Tool metadata out of the shipped screenshots, and a code sample readers can actually read 2026-09-03 22:12:05 +02:00
Federico 0f48c05214 Merge pull request #137 from feder-cr/docs/agent-layer-links
The engine's front page now names the agent that sits on it
2026-09-03 20:24:18 +02:00
feder-cr 4438689e40 The engine's front page now names the agent that sits on it 2026-09-03 20:17:43 +02:00
Federico bf72778dcc A screenshot photographs where the page is, and full_page means the page (#136)
* A screenshot photographs where the page is, and full_page means the page

Found by looking, not by reading. Asked to open a README in a browser and
actually look at it, I scrolled to the part I wanted and took a picture, and the
picture was the top of the page. scrollY 3000, the target element at y=0 in the
viewport, and the image showing the document's first screen.

One line. op_screenshot built its clip as {x: 0, y: 0, width: innerWidth,
height: innerHeight}. The engine reads a clip in DOCUMENT coordinates, so that
is not the viewport: it is the document's top-left corner, at viewport size. Two
promises broke on it, both silently, both returning a valid image of the wrong
place.

Scrolling did nothing. An agent that scrolls and looks got the same picture
every time, with nothing in the image to say so. That is what
browser_take_screenshot does in the MCP server, and rung 3 of the ladder that
server hands every model is "take a screenshot, then click on what you can see" -
so the server was recommending a step that could not work.

And fullPage was never read by the driver at all: 800x600 on a document asked
for at 800x4000.

Fixed where it comes from rather than where it shows: the clip is computed from
the page, either where the viewport actually is or how big the document actually
is. A clip the CALLER supplies passes through untouched, because Playwright
documents it in page coordinates already.

Six tests, and they read PIXELS. A size proves the crop has the right shape, and
the defect was a right-shaped crop of the wrong place, so the fixture page has a
red band at y=1000 and a green column at x=1400 and the assertions ask what
colour came back. The PNG reader is thirty lines of zlib rather than adding
Pillow to the dev extras so one test can read one pixel.

Six mutations, six killed. The first round had one survivor, the horizontal
axis, because nothing scrolled sideways - I had labelled it as expected to
survive, which is a polite way of saying half a two-axis fix was untested. It is
covered now.

Two of my assertions were also wrong rather than the code: adding the green
column made the document 1600 wide, so full_page correctly answered 1600x4000
while the test demanded 800x4000, and scrollTo(1400, 0) is clamped to 800 in an
800px viewport, so I was reading the wrong pixel. The test now reads scrollX
back and computes from it instead of assuming, which is the same mistake in
miniature as the defect it covers.

The vendored upstream suite could not have caught this. It is excluded from
collection, but that is the smaller half: its test_screenshot.py has three tests,
and neither fullPage nor scrolling is among them.

* Translate the identifiers I just wrote in Italian, and say why nothing stopped me

The English gate went red on CI for the test file added in the previous commit:
`landed`, `out` and `prior` were `dove`, `fuori` and `sopra`. I wrote Italian
into a public repository on the same day I wired that gate into this repo's CI
for exactly this.

⛔ And the reason it passed locally is worth more than the mistake. The gate
walks `git ls-files`, so it sees TRACKED files only. Running it before `git add`
on a brand-new file scans everything except the file being added, and reports
clean. It is not wrong to read the tracked set - that is what ships - but it
means the local run before a first commit cannot see the thing most likely to be
wrong, and only the CI run after the push does.

Nothing to change in the gate. What changes is when it is run: after staging,
not before.
2026-09-03 17:25:13 +02:00
Federico 83403b83a7 Merge pull request #135 from feder-cr/docs/discovery-links
The README learns the vendor pages exist, and the agents hub points across
2026-09-03 15:39:09 +02:00
feder-cr 12fd16385a The README learns the vendor pages exist, and the agents hub points across
Eighteen anti-bot vendor pages went live in the wiki without a single link
from the repository's own README, which is the page crawlers actually visit.
Now the documentation section names the set. The AI-agents hub also gains a
pointer to the AIHawk wiki, where the agent-experience content moved: the
split is developers wiring an agent to this engine here, people running an
agent there.
2026-09-03 15:32:36 +02:00
github-actions[bot]andfeder-cr 2b4f83f7f2 record 0.10.0 as published (#132)
* record 0.10.0 as published

* Trigger the required checks

The branch below was pushed by a workflow using GITHUB_TOKEN, and GitHub does
not let that token start other workflows. So tests.yml never ran, the required
`gate` context never arrived, and the pull request was not slow: it was
unmergeable. An empty commit pushed with a real token is what starts them.

Documented in 17-release-seal-spec.md step 8, and this is the second release it
has happened to.

---------

Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-09-03 15:02:07 +02:00
Federico 38ac9d5259 Merge pull request #134 from feder-cr/docs/agent-pages-moved-to-aihawk
Four agent pages moved to the AIHawk wiki, and their slots point across
2026-09-03 14:43:48 +02:00
Federico 9cd79b98bc Put Added first in the 0.10.0 entry, where the reader looks (#133)
Closing the changelog for the release left the three subsections in the order
they were written rather than the order this file's own header says it follows:
Documentation, Internal, then Added. The release page is generated from that
section, so the headline of the release - nine acting methods on ElementHandle -
came third, under two sections about prose and CI.

Reordered, and the release notes regenerated from it.
2026-09-03 14:41:22 +02:00
feder-cr 011b1c35d3 Four agent pages moved to the AIHawk wiki, and their slots point across
The agent-experience versions of the timing signal, the retry-loop volume
signal, computer-use detection and browser-use's config surface now live on
the AIHawk wiki, told in agent language for the audience that runs an agent
rather than builds one. The originals become pointers so the eight pages
that link them keep working, each keeping a one-paragraph summary and its
local mechanism links. The mechanism layer itself does not move.
2026-09-03 14:38:19 +02:00
Federico 2b85b111eb 0.10.0: an ElementHandle can act, and the docs stop contradicting the product (#131)
* Land four docs edits that were rescued once and then lost again

On 2026-08-30 four wiki pages were found edited in the working tree and never
committed. They were rescued onto a branch, and the branch was never merged, so
the same work has now been lost twice: once to an uncommitted tree, once to a
branch nobody opened.

Three of the four were untouched on main since 28 and 29 August, so main is
byte-identical to the rescue's parent and taking the rescued version applies
exactly the rescue. The fourth is the page I edited today, so its addition went
in by hand: a FAQ entry saying an agent is not made undetectable by one setting,
because the engine fingerprint, the machine's own surfaces and the agent loop's
rhythm are three separate problems. Both edits now stand.

The course-catalog guide's change is the one worth checking rather than trusting:
it rewrites a code example from query_selector_all plus handle methods to
page.locator, nth, get_attribute and click. The API existing on the client proves
nothing, so it was run against a real page: count, nth, get_attribute, click and
get_by_role all work, and the clicks arrive with isTrusted true. The guide teaches
something that works.

* 0.10.0: an ElementHandle can act, and the docs stop contradicting the product

`page.query_selector("#go").click()` is ordinary Playwright, and this driver
answered "ElementHandle has no method 'click'" - fifty-five methods offered by
the client, fourteen served, every one of them a read. Nine acting methods are
wired, through the same humanised path as the selector versions, because two
click paths would be two fingerprints.

That was already on main. What this release adds is the decision to ship it:
until it is on the index the method fails for everybody, and it is verified in
three places rather than one. The e2e ran it against a real browser in CI, and
both consumers were run against THIS engine rather than the published one -
invisible-playwright-mcp declares an open bound, so a release here changes what
every `uvx invisible-playwright-mcp` install resolves. 147 tests on the server
and 132 on the interface, against this tree.

The documentation half is the larger change by volume. Two pages told readers
there is no MCP server for this project, written before there was one. The
README never named either sibling, so anyone who would rather prompt than script
was handed off to the page that said no server existed. Four wiki pages edited
in a working tree on 2026-08-30 were rescued onto a branch and then lost a
second time when nobody merged it.

And the English-only gate, written for this repository and wired nowhere, now
runs in CI. It found four Italian test files on its first run here.
2026-09-03 14:21:24 +02:00
Federico 386da78813 Run the English gate here, and stop saying there is no MCP server (#130)
* Run the English gate in the repository it was written for

The rule is the owner's, from 2026-08-27, after 549 lines of Italian shipped
here in one subsystem and 852 more were found in 33 files that were already
public. The gate was written that day, in this repository, and wired into
nothing: not tests.yml, not the pre-push hook, whose steps are pytest, pin,
names, internals and publish. Both sibling packages copied the script AND the
CI step. This one kept only the script.

Ran it here for the first time today: four test files, red. Two of them were
last touched on 2026-08-31 by a commit about something else, so nothing was
going to notice.

The four are translated. The diffs are 17 lines across four files, and the
translation was checked by reconstructing each file from its HEAD blob with
only the prose substitutions applied, so every count, date and version in them
is untouched by construction rather than by inspection. One file changed a loop
variable from `nome` to `name`, which is a code identifier rather than prose,
and the rule names variables explicitly.

The job is its own, and deliberately not behind core-on-index: reading files
needs no install, and hanging a language check off the availability of a
package on an index would skip it during exactly the window when releases are
made. The selftest runs first, because a language gate that has only ever
printed clean is the same non-gate as any other.

One thing this does not fix. The gate reads prose, so it sees two Italian
function words in a file and not a lone identifier: `e2e-hunt.yml` has an input
named `giri` and passes. That limit is documented where the gate is described.

* An ElementHandle can act, not only be read

`page.query_selector("#go").click()` is ordinary Playwright, and this driver
answered "ElementHandle has no method 'click'". The client offers fifty-five
methods on a handle and the driver served fourteen, every one of them a read:
the whole acting half was missing, and the error said so honestly while being
useless to anyone migrating.

Nine are wired: click, hover, fill, type, press, focus, check, uncheck,
selectOption. Nine and not fifty-five is a decision - these are the ones a
person hits in the first hour - and the rest keep reporting themselves as
missing rather than being filled in for symmetry.

⛔ They go through the same `actions` as the selector versions, and that is the
whole design. A handle click is the humanised pointer: approach, hover, press,
release, with the hit-target check and the actionability retry. A second,
simpler path would be quicker to write and would give this package two click
behaviours with two fingerprints, which is the one thing it exists not to have.

What differs is exactly what should: the node is not looked up again, because a
handle names one node and re-querying finds a different element with the same
description; and it is not disposed afterwards, because the caller still holds
it.

The tests are in two layers because the defect found while writing them lives
in only one. The lower layer has no browser and checks that the retry loop
treats a caller's element differently from one it resolved itself. The upper
layer drives a real page through the public API, and that is the layer that
caught it: `click` and `fill` accepted the new parameter and quietly failed to
forward it, because their call is formatted differently from the others and a
pattern-based edit missed them. Every lower-layer assertion still passed. The
e2e asserts the hover arrives before the click and that the click is trusted,
because those are what a shortcut would lose.

* Stop telling readers there is no MCP server for this

Two pages said so, and both were written on 2026-07-27, before the server was
published on 2026-08-19. True when written; afterwards they steered readers
away from the thing that solves the problem they then documented a workaround
for.

The integration page opened with "You do not need a separate MCP server" and
its FAQ answered "Is there an MCP server for this project?" with "No, and there
does not need to be". It now opens with ours, and is what it actually is: how
to point Microsoft's playwright-mcp at this engine if you are already committed
to it, and precisely what that costs. The sentence about losing the seeded
profile is scoped to Microsoft's server by name, because it is not true of ours.

The engine README never mentioned either sibling. A reader who would rather
prompt than script had one hand-off, to the page above, which told them no
server existed. There is now a short block after Install with both one-liners,
and the Related projects section lists the three siblings before the eleven
third-party neighbours it already had.

Two smaller things the same audit turned up: the Python floor was stated only
as a badge image, about 200 lines below the install block a 3.10 user copies,
and the core's README described its second consumer as a desktop profile
manager, which was invisible_firefox, whose repository was deleted on
2026-08-18.

* One home for the download size, and the handle work in the changelog

Three READMEs carried a figure for the first-run download and no two agreed:
"about 700 MB" on both consumer pages, "~238 MB download (~544 MB unpacked)"
here. The seal packaged with invisible_core has the real numbers - 240 MB for
Windows, 262 and 253 for the two Linux legs - so all three were wrong, the
consumers by roughly triple.

A figure with three homes has no home. The consumers now say "a few hundred
megabytes" and point here; this file carries the per-platform numbers, taken
from the seal.

The changelog gains the ElementHandle entry under Unreleased. Nine acting
methods is a user-visible addition and the file exists to say so.

* Translate the identifiers the language gate cannot see

The gate reads prose - two Italian function words in a file - so a lone
identifier passes it. e2e-hunt.yml had `giri` as a workflow input and wrote its
artifacts under `prove/giri/giro_NN.log`, all of which the gate looked at and
found nothing wrong with, correctly.

The rule names workflow steps explicitly, so these are `runs` and
`evidence/runs/run_NN.log` now. Noting it because it is the shape of what the
gate misses, not a one-off: a name is not prose, and the check is for prose.
2026-09-03 13:12:02 +02:00
github-actions[bot] 430668e50f record 0.9.0 as published (#129)
The ledger entry for 0.9.0. Without it the next release is refused by
version_gate: the index would serve a version the ledger does not record.
2026-09-02 19:05:59 +02:00
Federico f31b7f8ee8 0.9.0: the wait that never waited (#128)
op_wait_for_timeout in _juggler/server.py read params.get("timeout"). The client
sends waitTimeout, which is upstream Playwright's own parameter name: timeout is the
reserved key on that channel, carrying the per-call action timeout for every other
call. Reading the wrong key made every wait in this package a no-op that reported
success - 2000ms returned in 1ms, in both APIs, for as long as this driver existed.

The first attempt patched the vendored client instead, to make it send the key the
server happened to read. Review caught it by reading upstream's protocol.yml.
2026-09-02 18:02:10 +02:00
github-actions[bot]andfeder-cr 7115bbeb32 record 0.8.3 as published (#126)
* record 0.8.3 as published

* trigger the required checks

The branch was pushed by the publish workflow with GITHUB_TOKEN, and GitHub
does not let a push made with that token start other workflows - a deliberate
loop-guard. So tests.yml never ran and the `gate` context the branch
protection requires could not exist: the PR was unmergeable for a reason that
has nothing to do with its content.

An empty commit pushed with a real token starts them.

---------

Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-08-31 19:05:15 +02:00
Federico cbbdda07be Back-fill 0.8.2 in the ledger, from the artifacts the index serves (#125)
0.8.2 shipped this morning and its ledger entry never landed: the publish
workflow opens a `ledger/<version>` PR and cannot merge it, and that branch is
pushed with GITHUB_TOKEN, which by design does not start other workflows - so
the `gate` context the branch protection requires never ran and the PR could
not be merged at all. The release after it was then refused, which is the
mechanism working as intended and one release too late.

⛔ NOT recorded from a rebuild, and the difference is measured rather than
assumed. Checking out v0.8.2 and running `record` produces an entry that
DIVERGES from what the index actually serves, in exactly the files the build
backend generates: METADATA and WHEEL in the wheel, PKG-INFO in the sdist. A
different hatchling version is enough. Recording that would have put digests in
the ledger that no published artifact matches - the precise failure the ledger
exists to catch, introduced by the thing meant to repair it.

So the entry is built from the downloaded wheel and sdist, through the gate's
own `wheel_manifest` / `sdist_manifest` / `manifest_digest` rather than a
reimplementation of them, and its field set is asserted against the previous
entry's before being written.
2026-08-31 18:53:03 +02:00
Federico 784c3cee1d 0.8.3: pins the core that seals firefox-26 (#124)
That engine moves every input handler in the visible-pointer overlay out of
input delivery. Only the mousemove one had been deferred; the press handler was
still creating a DOM node and starting a CSS animation synchronously in the
parent process while a mousedown was in flight - more work than what had been
removed, and on the click path rather than the move path.

The timing gain is not measured: the press-path bench is new and refuses to run
on a loaded machine, which is all that has been available.
2026-08-31 18:39:28 +02:00
Federico 8650f3b64c 0.8.2: the pinned engine has no updater (#122)
Moves the core pin to 25.16.0, which seals firefox-25.

Every session used to show an "Update available" badge shortly after start, and
no preference removed it: app.update.auto stops the download rather than the
notification, suppressPrompts only delays the doorhanger because the badge is
shown immediately and unconditionally, and disabledForTesting is inert unless
the browser is driven by Marionette or the remote agent.

That engine is now built without the update machinery at all, so nothing checks,
nothing can install over the binary the seal pins, and the badge has no code left
to draw it. The update channel is unchanged, because the remoting name derives
from it.
2026-08-31 11:42:18 +02:00
Federico 36719bb26f One silent socket froze the test servers forever (#121)
HTTPServer serves one request at a time, and BaseHTTPRequestHandler has no
timeout: a connection that is accepted and sends nothing blocks
handle_one_request forever, and with it the whole server. A browser opens
speculative connections, so the real document is never served and the test sees
an empty page.

Reproduced on an identical bench: a normal request answers 200, then one silent
socket, then the same request raises TimeoutError. With ThreadingHTTPServer and
a handler timeout, four silent sockets change nothing and the request still
answers 200.

That is B194: two cross-origin iframe tests red in CI and green locally, with
"found 0 elements", on code that had passed the same job in another run. It
reads as flakiness because it depends on whether the browser opens a
speculative socket first, which is a matter of timing - and the Python client
reaches the navigation faster than the Node driver did.

test_long_session_e2e.py was already on ThreadingHTTPServer. The lesson existed,
in one file, and the other three had not followed it.
2026-08-31 01:14:03 +02:00
Federico ba3690739d Merge pull request #120 from feder-cr/docs/round-4-cloudflare-bot-mgmt-iframe
2 more docs: Cloudflare Bot Management, sandboxed iframes
2026-08-30 22:46:10 +02:00
feder-cr b94ba47a6b Cloudflare's other product, and a sandbox iframe tell Playwright causes itself
Round 4, and honestly the last easy one: the corpus already covered Turnstile
but not Cloudflare Bot Management, a separate always-on scoring product that
runs on nearly every request regardless of whether a site uses Turnstile at
all. Both pages now cross-link and state plainly which is which.

The sandboxed-iframe page came from a real, closed GitHub issue
(microsoft/playwright#33343) that turned out more nuanced on inspection than
the initial lead suggested: the maintainer called the console warning benign,
and the reporter's real blocker was a third-party ad SDK's own detection,
unrelated to the sandbox attribute itself. Reported that accurately instead
of overstating the issue's status.

One small addition to the existing Imperva page rather than a new article:
Imperva's 2019 acquisition of Distil Networks, so a reader still searching
that legacy name lands on accurate content instead of nothing.

Checked and rejected this round: Azure WAF Bot Protection and Google Cloud
Armor (both vendor walls), User-Agent deprecation timeline and real-passkey
scraping obstacles (already covered by existing pages under different
framing), View Transitions API (no scraping-relevant demand). Playwright has
shipped nothing past 1.62 as of this check.

2 touched hub pages updated in the same commit.
2026-08-30 22:41:31 +02:00
Federico c07fbc08a8 Merge pull request #119 from feder-cr/docs/round-3-hcaptcha-and-gaps
6 more docs: hCaptcha's missing pages, 2 verbatim errors, TOTP 2FA
2026-08-30 21:36:56 +02:00
feder-cr 604de15836 hCaptcha gets the vendor page it was missing, plus 3 more confirmed gaps
Round 3 of the same gap audit: checked the corpus against a fresh clone of
main (416 files), not a stale worktree. Most candidates from this round
dead-ended into duplicates or vendor walls - documented honestly rather than
padded. Six survived verification.

hCaptcha had zero dedicated page despite being cited as a source inside the
Kasada article - an odd gap given reCAPTCHA and GeeTest both already had one.
Fixed with the same three-page pattern already used for reCAPTCHA: the
mechanism explainer, the "does Playwright trigger it more" companion, and
the Enterprise-vs-Standard comparison. Every one of the three repeats the
boundary explicitly: hCaptcha's visual puzzle is an actual image-classification
captcha, and this project does not solve, bypass, or automate past it.

Two verbatim errors this corpus was missing: SEC_ERROR_UNKNOWN_ISSUER, the
Firefox-native NSS certificate error (distinct from the already-covered
Chromium-flavored ERR_CERT_AUTHORITY_INVALID, and the one this project's own
engine actually emits), and ERR_BLOCKED_BY_CLIENT via page.route(), which
reproduces a real ad-blocker's exact error string byte for byte.

TOTP-based 2FA (pyotp, a shared secret, no inbox) gets its own page,
cross-linked both ways against the existing email-OTP page rather than
merged into it - the two mechanisms share nothing except both being called
"2FA login."

Rejected this round, for the record: Radware/ShieldSquare and Netacea (pure
vendor walls), Castle.io (same), Signal Sciences (already covered under the
Fastly page it now belongs to), DataDome alternatives as a category (vendor
buyer's-guide content, not developer troubleshooting), five more verbatim
error codes (no Playwright-specific practitioner discourse), Android WebView
and iOS Safari automation (native-app QA audience both times), mobile
fingerprinting reframings (no distinct pain point beyond the existing mobile
emulation page). Playwright has shipped nothing past 1.62 as of this check.

3 touched hub pages updated in the same commit.
2026-08-30 21:28:24 +02:00
Federico a822d11c07 Merge pull request #118 from feder-cr/docs/gap-cluster-vendors-and-errors
51 new docs: named anti-bot vendors, verbatim errors, real Playwright changes
2026-08-30 20:34:58 +02:00
feder-cr 89d56923e0 43 more confirmed gaps: more vendors, verbatim errors, real Playwright changes
Same discipline as the first 5 vendors: zero prior mentions in the corpus,
confirmed with live Serper checks, no invented internals. Detectors, Explained
grows by 13 (Imperva, F5 Shape, Fastly, reCAPTCHA Enterprise, Arkose Labs,
AWS WAF Bot Control, Anubis, Cloudflare's AI Labyrinth, Private Access Tokens,
robots.txt-adjacent crawler blocking, Vercel BotID, GeeTest v4, honeypot
fields) - every one keeps the same boundary the first batch drew: what an
engine-level Firefox answers honestly versus what stays server-side, and
never a captcha-solving promise.

12 more verbatim Chromium/Firefox network errors get their own pages, each
differentiated from its closest sibling instead of duplicated (ERR_PROXY_
CONNECTION_FAILED explicitly separated from the existing ERR_TUNNEL_
CONNECTION_FAILED; ERR_CONNECTION_TIMED_OUT from Playwright's own
TimeoutError). JA4H gets its own page as JA4's HTTP-layer sibling, cross-
linked to the existing JA3/JA4 and HTTP/2 pages rather than repeating them.

9 driver/DOM troubleshooting pages cover errors this corpus never had a
dedicated page for (strict mode violations, detached frames, CSP blocking
injected scripts, the crash-vs-OOM distinction), a benchmark-methodology
piece that turns the same scrutiny on this project's own comparisons, a
build-vs-buy piece with no invented cost figures, and 3 real, individually
verified Playwright 1.61/1.62 changes (WebAuthn virtual authenticator, MCP
bundled into core, headless clipboard isolation) - each checked against
Playwright's actual release notes and GitHub before being stated as fact.

Considered and rejected as pruning candidates: the two lowest-search-demand
pages in the corpus turned out to be cited by 7 and 24 other articles
respectively. Low direct search volume for an exact title is not the same
as no value; nothing was removed.

All 7 touched hub pages updated in the same commit.
2026-08-30 20:27:46 +02:00
feder-cr aeabf1451c Five vendors with zero coverage, and three verbatim errors nobody could search
Cloudflare, Turnstile, DataDome, Kasada, PerimeterX and Akamai appeared in
zero of the 371 existing docs, despite being the anti-bot vendors developers
hit most often - confirmed this week against live Serper data, not assumed.
Each new page explains the vendor's actual mechanism from real sources (their
own docs where public, credible reverse-engineering writeups where not), and
draws the same honest boundary this corpus already keeps everywhere else:
what an engine-level real Firefox answers versus what stays outside any
browser's reach (IP reputation, server-side risk scoring, account history).
None of them promise to solve or defeat anything - this project does not do
captcha-solving, and a page implying otherwise would misrepresent the product.

The Akamai page uses a real, public GitHub issue (daijro/camoufox#555) as an
honest case study: an engine-level Firefox patch still got blocked by Akamai
despite a matching TLS/JA3/JA4 fingerprint. It states plainly this is an open
question for any project taking this approach, ours included - no unverifiable
claim of immunity.

Three verbatim network errors (ERR_HTTP2_PROTOCOL_ERROR, ERR_TUNNEL_CONNECTION_FAILED,
ERR_SOCKS_CONNECTION_FAILED) get their own pages under Network, Proxy and WebRTC:
people search the exact string when debugging, and none of the three existed
in this corpus even though general proxy-auth pages did. Each is honest that
this is a proxy/network-layer problem the product's fingerprint work does not
touch.

Both hub pages updated in the same commit.
2026-08-30 20:27:46 +02:00
github-actions[bot]andfeder-cr 718afe93d5 record 0.8.1 as published (#117)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-08-30 20:17:28 +02:00
Federico 87ff57336d 0.8.1: the proxy is the road the page goes out on (#113)
* The proxy reaches the browser, and a persistent context opens

Two defects of one family: the Python server that replaced the Node driver does
not do everything the driver did, and neither failure said so.

op_launch read executablePath, env, userDataDir, firefoxUserPrefs and timeout
out of the launch message and never looked at proxy. The engine has carried
Browser.setBrowserProxy and setContextProxy all along. Both are now sent, and a
proxy that cannot be expressed refuses the launch instead of leaving a browser
running without the proxy its session was built around. The endpoint is read by
the core's parse_proxy rather than by a copy living here: two readings of what a
proxy is would be the same duplication one layer down.

op_launch_persistent returned only the context. The client reads result
["browser"] first and result["context"] after, so every profile_dir= session
raised KeyError: 'browser' - in the published 0.8.0, so it shipped. The comment
above the code said the client reads only the context, and the assertion was
written against that comment rather than against the client. Both come back now.

test_proxy_reaches_the_browser.py is in the positive form the reporter asked
for: not "the home address does not appear", which passed throughout the whole
regression because the page never printed an address at all, but "the bytes the
page shows came from the proxy", proved by navigating to a host that exists in
no DNS. Four browser arms: http at browser level, http per context, socks, and
the refusal.

* 0.8.1: the proxy is the road the page goes out on

Pins invisible-core 24.16.0 and the firefox-24 engine. Two of the three fixes
are Python and would work on an older binary; the third - SOCKS credentials
reaching the engine - is a line in the engine itself, so the pin is what makes
the release true rather than half true.

* A browser that exits during startup now says why

stderr is merged into stdout and read line by line while waiting for the
readiness line, and it was thrown away. When the process had already died the
client returned a Connection over a closed pipe, and the caller got
"BrowserType.launch: the pipe is closed" - which names neither the exit code
nor the one thing the browser printed before going.

Today a CI guard went red with exactly that sentence. Deciding whether the
cause was the engine or the client took a rebuilt binary, four workflow runs
and a controlled comparison against the previous engine, to recover
information the browser had already written and nobody had kept.

The lines are kept rather than tested and dropped, and an exit during startup
raises with the code, the command and the last fifteen lines.
2026-08-30 19:57:08 +02:00
github-actions[bot]andfeder-cr c6924d3fba record 0.8.0 as published (#112)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-08-30 10:49:24 +02:00
Federico 88ff9c5704 Correct the 0.8.0 size claim to a number that reproduces (#111)
0.8.0 announced "the wheel goes from about 13 MB to 7 MB". Measured on two
clean virtual environments, the wheel goes 1.61 MB to 0.68 MB and the installed
package 11.18 MB to 6.50 MB. The noun was wrong - those were never wheel sizes -
and 13 matches no reading of either. The direction was right and the saving is
real, which is exactly why the number should be the one a user can reproduce.

The 92 MB Node runtime stands: _node.py fetched it from nodejs.org on first use,
and THIRD_PARTY_FORK.md carries the same figure.
2026-08-30 04:22:56 +02:00
Federico 75372510af Merge pull request #108 from feder-cr/release/0.8.0
0.8.0: no Node driver, and the two fixes that needed firefox-23
2026-08-30 04:02:09 +02:00
feder-cr 16cd925651 Six names the linter could not resolve, and three of them were annotations
The F821/F811 step went red on all five runners. None of it is style.

server.py annotated three `conn` properties as "Connection", a name the module
never imports. It is a string annotation, so nothing raised at runtime and the
suite could not see it, but the module already imports the class as
`juggler.Connection` and that is what the annotation now says: a name that
resolves.

_profile.py imported shutil and pathlib a second time inside two functions,
shadowing the module-level imports for no reason. _session.py imported
max_seconds_for twice from the same module in two separate blocks, which is the
shape that lets the two drift; the blocks are now one.
2026-08-30 03:56:28 +02:00
Federico 0079d47334 Merge pull request #110 from feder-cr/docs/deep-quality-pass-38
Deeper quality pass on 38 more docs: factual fixes, structure, house style
2026-08-30 03:54:45 +02:00
Federico d388712977 navigator.webdriver reports false today, not undefined (#109)
The article had the current spec backwards. Before Chrome 89 (2021) and
Firefox 75 (2020), the property was only exposed under automation, so a
clean session read undefined. Both engines changed that on purpose,
Chromium's own Intent to Ship literally titled 'navigator.webdriver ===
false when automation is not active', specifically to match Gecko and
WebKit. The W3C spec declares it a plain boolean, which WebIDL does not
allow to be undefined.

That flips the article's central argument: setting the property to
false via a page-level patch gets the *value* right today. What still
gives it away is the mechanism, an own property instead of one on
Navigator.prototype, and a getter whose toString is not [native code].
Rewrote the sections and FAQ that had this backwards, verified the new
sources live (W3C IDL, Chromium's Intent to Ship thread, MDN).
2026-08-30 03:52:02 +02:00
feder-cr 9e9d569580 Deeper quality pass on 38 more docs: factual fixes, structure, house style
Second pass on files that had already received citation fixes but not
the full review: score against the corpus rubric, fix what the score
found, independent re-verify. 26 files had real content to fix, the
rest were already clean.

Recurring finds across this batch: missing Conclusion sections before
the FAQ (5 files), near-duplicate paragraphs, an unverifiable specific
claim about a Google cookie deprecation date replaced with a defensible
general statement, inconsistent Sources retrieval dates, and citations
that named a tool without linking it.

navigator-webdriver-explained.md is deliberately excluded here - its
one real defect (a wrong claim about the current spec-compliant default
of navigator.webdriver) is a separate, already-open fix.
2026-08-30 03:49:00 +02:00
feder-cr bc4a67bc73 Pin the core that seals firefox-23
The two fixes 0.8.0 announces are half Python and half engine: the UA widget
guard lives in Element::GetShadowRootForBindings, and the response body reader
is a Juggler command that had to come back. On firefox-22 the Python halves
compile and do nothing, so the pin is what makes the release true.
2026-08-30 03:27:11 +02:00
feder-cr a1ff56e2ed Response bodies read again, UA widgets stay out of selectors, and the e2e opens four browsers
Two defects reported from outside, by someone running a 24-site study, plus the
change that makes verifying them affordable.

Response.text() and Response.body() work again. The Juggler command they rest on
was removed while trimming the network observer; this restores the client half
and waits for the request to finish before asking, because the engine only has
the body then and body() does not wait. That race bit the main document almost
every time and subresources almost never: on a three-request page the JSON and
the script came back and the document answered "Request 17 is not found".

The UA widget defect is fixed in the engine and needs the matching release. What
lands here is the regression file: three tests that fail on an engine without the
guard and pass with it, and two that pass either way and exist to stop a fix in
the wrong direction - reverting the closed-root feature, or opening those roots
to page script, both of which would satisfy a count assertion.

The e2e runs four browsers at once, cutting a fourteen-minute gate. --dist
loadfile is not tuning: one file holds 65 of the 193 tests behind a single
module-scoped browser, and another has a test that only passes when its module
runs whole. Two harnesses picked a free port and released it before binding it
again, which is a race with one worker and a coin flip with four; they now bind
zero and read the port back off the listening socket, as two other files already
did.
2026-08-30 01:09:15 +02:00
feder-cr 57d235ab39 Merge main into the branch that removes Node, and open 0.8.0
One conflict, and it was two people fixing the same defect: the cancelled
teardown. PR #104 landed DatGuy1's version on main while this branch carried
its own, written the same day. Kept this branch's - same behaviour, and it
documents why the bug exists and credits the report - so the resolution loses
nothing but the duplicate.

⛔ Merged in a separate worktree on purpose. The shared checkout has fifty
untracked files belonging to another session's in-flight work, and git refuses
to merge over them. Forty-eight of the fifty are the same content as main
modulo line endings, but TWO differ for real - the clinical-trial and
course-catalog guides - so removing them was not an option. A worktree touches
none of it.

0.8.0 and not 0.7.5: this ships the Node removal, so the wheel goes from about
13 MB to 7 and a first install stops downloading a 92 MB runtime. That is not
a patch.
2026-08-29 22:39:13 +02:00
feder-cr ef8a39e337 Pin the core that seals firefox-22
Moved by scripts/sync_core_pin.py, not by hand: this literal is the only place
the expected core version is written, and _pin.py reads it back out of this
package's own metadata at import time.

⛔ THIS COMMIT IS NOT PUBLISHABLE ON ITS OWN, and that is the ordering the
runbook makes load-bearing rather than a nice-to-have. invisible-core 22.16.0
is not on the index yet, so a cold `pip install` of this package would fail to
resolve until it is. Core first, confirm it resolves, then this.
2026-08-29 21:56:19 +02:00
feder-cr b84fc56327 The cross-origin frame test waited for a duration, not for the condition
It slept 500ms and then read page.frames. By then the child frame is
ATTACHED but on a loaded machine it has not NAVIGATED, so the URLs come back
empty and the assertion reads them as the very defect the test guards.

Measured: red inside the full e2e run, with urls = ['http://127.0.0.1:.../',
'', '', ''], and green 5 times out of 5 on its own. That gap between loaded
and idle is the signature of a timing assumption rather than a regression -
and worth stating, because the obvious suspect was the teardown change
committed an hour earlier, which had nothing to do with it.

It was never retried either: run_e2e.py reruns on a fixed list of load-flake
messages and this assertion's text is domain-specific, so it can never match.
Adding it to that list was the tempting fix and the wrong one - it hides the
failure instead of removing the race.

The failure mode is deliberately unchanged: if no frame EVER reports the
child origin, the loop runs out of time and the same assertion fires with the
same message. Verified by mutation - with the origin replaced by one that
never appears, it still goes red - then the whole module, 10 passed.
2026-08-29 20:01:34 +02:00
feder-cr 6b71f77b11 The suite tests this checkout, not whatever last ran pip install -e
Found by accident: a fix applied to src/invisible_playwright/async_api.py had
no effect on the test that exercised it, because the package under test was
not this one. The editable install in the shared interpreter pointed at
C:/tmp/invisible_playwright - a SECOND working copy of this same repository,
on an older branch, with no _juggler/ package at all. A plain `pytest -q`
here reported 7 collection errors and ran zero tests, in a tree whose own
suite is green.

Failing loudly was luck, not design: the two copies happened to differ by a
whole subpackage. Had they differed by one function's behaviour, the suite
would have gone green while testing code nobody had written here - the same
false green this project keeps finding in its own instruments, this time in
the instrument that judges everything else.

`pythonpath = ["src"]` is resolved relative to this pyproject.toml, so each
checkout points at itself and two working copies stop fighting over one
interpreter. It fixes the problem without touching the shared environment,
which matters because the other copy is in active use by someone else:
repointing the .pth would have moved the breakage rather than removed it.

Verified: a plain `pytest -q`, with no PYTHONPATH and the misdirected
editable install still in place, now imports from this checkout and reports
530 passed.

⛔ invisible_core has the same exposure and does NOT have this line. It points
at the right place today by luck of install order, not by construction.
2026-08-29 18:46:41 +02:00
feder-cr 9d50caee97 A cancelled async teardown left the browser behind, on this branch too
Reported from outside as #104 (DatGuy1) against the published main, where it
is now merged. This branch carried the identical defect: the merge will have
to reconcile the two, and doing it here while the reasoning is fresh beats
discovering it during a merge weeks from now.

The bug is a type-hierarchy one, invisible from reading the happy path.
asyncio.CancelledError inherits from BaseException, not Exception, so the
`except Exception` around each close step does not catch it: cancel the task
running _teardown and it escapes at the first await, every later step is
skipped, and what survives is a browser nobody closes. This project has
measured that orphan twice - 88 stray firefox processes in one session, and
7,308 leftover profile directories over seven months - so the leak is not
hypothetical here.

A cancellation is now caught, kept, and re-raised at the end: it still
propagates as asyncio requires, but only after every step has had its turn.
The reap moves into a `finally`, because it is the one step that must run
even if the loop dies in a way this does not model.

The test pins three things, since any one alone would pass a half-fix: the
step AFTER the cancelled one still runs, the reap still happens, and the
cancellation still reaches the caller. Validated against the known-bad -
remove the CancelledError branch and it fails on the first assertion.

530 unit tests pass.
2026-08-29 18:43:09 +02:00
Federico 0960168270 Merge pull request #104 from DatGuy1/patch-1
fix(async): improve async teardown error handling
2026-08-29 18:31:29 +02:00
Federico 5f933255af Merge pull request #106 from feder-cr/docs/fourty-eight-more-guides
48 more guides for objects the docs had no page for
2026-08-29 18:09:54 +02:00
feder-cr f38909b106 Delete audit_cpt_realism.py: broken, orphaned, and superseded
The script wrote to src/invisible-playwright/_fpforge/data - hyphenated, a
path that has never existed in this repo - so its first open(..., "w") would
have raised FileNotFoundError. It could not have run for a long time and
nobody noticed, because nothing invokes it: no CI step, no other script, no
entry point.

Fixing the path would not have helped. The CPT tables it regenerates moved to
invisible_core on 2026-07-03 with the pure-config split; _fpforge/ here is a
pure alias shim re-exporting invisible_core._fpforge, and the six JSON files
this script targets were deleted from this repo then. Keeping a second,
broken generator pointed at a package that no longer holds the data is the
duplicated-source-of-truth shape rule 16 forbids.

The provenance it carried - Steam HW Survey March 2026 core distributions,
Intel ARK and AMD release-era mappings, the 100-250GB free-space baseline -
is not lost: it is one command away at
    git show 7a983e9:scripts/audit_cpt_realism.py
If the regenerator is ever wanted again it belongs in invisible_core, next to
the sampler and the data it would actually feed.
2026-08-29 17:54:55 +02:00
Federico c41b321b12 Real citations and factual fixes across the docs corpus (#105)
Every article whose Sources section named a tool, library, spec, or
paper without a working link now carries a verified URL, checked live
before being added. Where the underlying claim itself was wrong, not
just uncited, the claim is corrected too: a storage-quota page had the
mechanism backwards (total disk size, not free space) and a dead
ternary that never read the value it claimed to show; a Puppeteer
migration guide called Firefox support experimental after it went
stable; a debugger-timing page linked a Mozilla doc page that had
moved.

125 files, no rewrites: citations, factual corrections, and small
house-style fixes only. Verified after: every added URL resolves live,
zero em-dashes, zero invented statistics, house style intact.
2026-08-29 17:53:55 +02:00
feder-cr 7af6d3a068 48 more guides for objects the docs had no page for
Auction listings, book metadata, GraphQL endpoints, WHOIS records,
patent listings, weather station feeds, and 41 other specific data
shapes that came up while writing the rest of this corpus and never
got a page.

Each one names the response to capture instead of the rendered DOM
where one exists, the row shape that survives a re-run, and one
mistake the approach corrects. Cross-linked from the two live-sports
and product-stock pages where the topics genuinely overlap, and from
the guides hub so none of these ship as orphan pages.
2026-08-29 17:49:40 +02:00
feder-cr 74bbce9efa A NameError the gate could not see, and the leftovers of the Dialog fusion
upstream_baseline.py's _per_file returned `1 if morti else 0` with `morti`
assigned nowhere: a guaranteed NameError, reachable only via --per-file on
the async arm, forty minutes into a run nobody makes twice. Two loop
variables in _count and one output label were still Italian in a public repo.

check_unresolved_names.py reported "none in 102 file(s)" on a tree containing
that exact fault, because SCANNED covered src/invisible_playwright and never
scripts/. The logic was never wrong - pointed at the file by hand it named
the fault correctly - only the perimeter was, and the argument for covering
scripts/ is the stronger one: this class of defect survives because a
NameError inside a function is invisible until someone calls it, and the
package has 529 unit tests calling into it while these scripts have none.
Measured before widening: 22 files, zero findings besides the real one. The
known-bad now fires from the default path and exits 1.

Three leftovers from yesterday's Dialog fusion, all in code that reads live:
BrowserContext still registered a channel listener for a wire "dialog" event
that nothing emits any more; the comment above its auto-answer explained a
client/server race that the fusion removed, while the auto-answer itself is
now the ONLY one in the product - _juggler has no server-side equivalent, so
deleting it is a hang, not a leak, and the comment now says so; and
_dialog.py's docstring described _object_factory.py as keeping a dead Dialog
branch on purpose when the same commit deleted that branch outright.

_juggler/server.py built the console and pageError payloads twice as
byte-identical literals, once for the log and once for the emit. Populating
`args` for real - the obvious next change to those lines - would have been
applied to one copy and silently made page.console_messages() disagree with
page.on("console").

check_field_coverage.py collected ast.FunctionDef only, which was harmless
until the fusion added PageDispatcher.send_async the same day. An async
operation is absent from _methods, so reachable() returns an empty known-set
and every field it legitimately reads is reported as ignored. Two selftest
cases added; only the first guards the fix, and the comment says which.

Verified: 529 unit, both gate selftests (16 and 14 cases), english-only
clean, and the upstream dialog suite against a real browser - 10 async and 2
sync passing, with upstream_regressions.py confirming the two reds are the
two the committed baseline already records as failed.
2026-08-29 17:43:46 +02:00
DatGuy1 4d174f1b28 Improve async teardown with error handling
If the playwright's task is cancelled, then the teardown is also cancelled, and the _browser, _pw, etc. still live as zombie processes. asyncio.CancelledError inherits from BaseException and not Exception, so `except Exception` does not catch it. The change catches any async exceptions properly, continues the teardown procedure, and at the end gracefully reraises it.
2026-08-29 18:27:06 +03:00
feder-cr 572d0216fa Fuse Dialog: no more channel round trip for the smallest dispatcher
Dialog no longer goes through __create__/guid/channel. _juggler builds it
directly and hands it to the client via a new twin registry bridge
(InProcessTransport.bind_impl_objects, Connection.deliver_event) that lets
server-side code reach the live impl-side object for a guid and deliver
events under the client's own execution-context rules.

Three defects only a real browser surfaced: SyncBase/AsyncBase read
impl_obj._loop (and _dispatcher_fiber for the sync facade) unconditionally
when wrapping any object for a listener, so a fused Dialog needs to copy
both from its Page at construction time; delivering an event with a bare
call_soon_threadsafe bypasses the EventGreenlet dispatch() wraps every wire
event in, so dialog.accept() hung with no exception; and an untranslated
_juggler exception broke is_target_closed_error the same way Page.close()
did earlier, fixed by running every fused-type call through the same
parse_error translation reply_error already used.

diff_protocol.py reported PARITY the first time this ran, and that verdict
was empty: the scripted session never opened a dialog, so neither arm had
anything to disagree about. capture_protocol.py now clicks a button that
calls alert() and accepts it; the real diff shows three argued differences
(Dialog never reaches the wire, parented under Page, with a dialog event on
BrowserContext), now recorded in EXPECTED_DIFFERENCES next to the existing
previewUpdated exception.

Verified: the upstream Playwright dialog suite (9/9), three repeats each of
four sync-facade scenarios, 529 unit tests, run_e2e.py (189/0), and
upstream_regressions.py against a fresh post-fusion baseline (698 recorded,
162 passing, matching the committed reference exactly).
2026-08-29 16:48:55 +02:00
feder-cr e247b733c6 Same structure, fewer concepts to hold at once
Reach-through chains go from 70 to 3, and the three left are the definitions of
the properties that replaced them - the one place allowed to know the shape of
the tree. FrameDispatcher wrote `self.page.actions` thirty-eight times, so
thirty-eight places knew where the actions engine lives; now one does. The worst
was in RouteDispatcher, five levels on a single line, and it escaped the first
pass because that class was not on my list.

server.py loses 263 lines. The seventeen leaf helpers touched no class and sat
BETWEEN the classes, so reading ElementHandleDispatcher you fell into
`_serialize` on the way to FrameDispatcher. They are now in `_marshal` (shaping
protocol values) and `_profile` (writing the profile) rather than one
`_helpers`, which is the bucket every project grows and nobody can name.

factory.py disappears into transport.py: it chose between two transports when
one is left, which is literally a module that exists to call another one. Its
typo guard went with it - it protected against running the driver by accident,
and there is no driver. The message for anyone who still has
INVPW_TRANSPORT=driver set stays: 0.7.4 shipped with it as the default.

And the six methods the two entry points had identical are one definition.
`_session` was created on 2026-07-27 for exactly this and the duplication
outlived its own creation: it had extracted the functions, not the methods that
call them. The two classes use the same fourteen attributes of `self` across
those six, and the ASTs of the bodies compare equal - what made them look
different was comments worded differently.

What was NOT removed, which is the half that matters: the transport's worker
threads (every Juggler operation blocks; on the event loop they would kill
asyncio.gather), the out-of-perimeter `_impl` classes (they produce a refusal
that NAMES the feature; without them it is AttributeError), `protocol.py` (it is
the frozen reference the generator's --check compares against - the move was
planned and withdrawn once its function was found), and splitting the mutually
recursive dispatcher graph, which would buy navigation with import cycles.

The net was built FIRST: upstream_regressions.py does not ask for green - 162 of
698 pass - it asks that none of the 162 stop. Its first real run reports no
regressions.

Two gates learned something from the refactor. check_unresolved_names.py only
walked methods inside classes, so it reported "clean" while a moved helper used
`json` with no import - the two new modules have no classes at all. Widened to
module-level functions, plus the false positive that widening produced
(`__file__` is not a builtin): 13 selftest cases to 16.

And a rule this cost three separate breakages to learn: an import is not unused
because the file holding it does not use it. Something can be reaching a name
THROUGH it - another module's import, or a monkeypatch target. The second time,
it had been verified with a precise AST analysis of uses inside the file, which
is structurally unable to see it.
2026-08-29 10:47:39 +02:00
feder-cr 9f426d365b Translate the per-file mode: it went in in Italian, on a public repo
The gate said so on the previous commit and I ran `git commit` chained in the
same command without reading its verdict, so a red gate scrolled past into a
green-looking success. The rule it breaks is the one from 2026-08-27: module
names, functions, variables, comments, docstrings and error messages in the two
published packages are English.

Nothing about the behaviour changes. `_conta` is `_count`, `_riassumi` is
`_summarise`, `MORTO` is `DIED`, and the three notes that carry the reasoning -
why one process per file, why a file with no summary is not a file with zero
faults, why the progress line needs flush - say the same thing in English.

The helpers were re-exercised after the rename: a real summary line still parses
to the same four numbers, a dead file still yields nothing rather than zeroes.
2026-08-29 04:09:32 +02:00
feder-cr 2c76ab1dd1 Il braccio async non era non-misurato: era non-misurabile, e adesso lo e'
pytest-asyncio fa girare l'intera sessione su UN event loop. Un test che lo
blocca lo blocca per sempre: --timeout-method thread stampa gli stack e poi la
sessione MUORE, senza riepilogo. Su Windows non ci sono le due vie d'uscita che
altrove basterebbero, --timeout-method signal e --forked.

Misurato: la corsa intera si e' fermata al 13%, e riprodotta in isolamento
bastano due test dello stesso file - il primo passa, il secondo appende, la
corsa muore. Piu' di milleduecento test non hanno mai avuto la parola.

Con --per-file un appeso costa QUEL file e non la corsa. Provato su due file,
di cui uno e' quello che appende: viene marcato MORTO e il file dopo gira lo
stesso, riportando i suoi sei rossi.

E la riga che conta e' quella che distingue i due casi: un file senza riepilogo
NON e' un file con zero guasti, e' un file che e' morto. Contarlo come zero e'
il falso verde piu' facile da scrivere in un aggregatore, e questo lo elenca per
nome ed esce 1.

I progressi sono stampati con flush=True. Senza, rediretti su file, un ciclo che
dura un'ora non scrive niente ed e' indistinguibile da uno piantato: la prima
corsa vera e' stata seguita contando i processi e il tempo di CPU, e quando e'
stata fermata il parziale e' morto dentro il buffer.
2026-08-29 04:06:40 +02:00
feder-cr a27c2efc16 The judge counted tests it never ran as tests the driver failed
The driver arm imports an old `src/` from a worktree, so any test file naming
something added since that commit fails to COLLECT there and every test in it
comes back ABSENT. Those rows were landing in "only the DRIVER fails", which
prints under "ours is BETTER here" - measured 32 of 51, essentially the whole
bucket, and the number grows on its own every time this tree moves. A gate
drifting toward a more flattering verdict is a gate that has stopped answering
its own question.

They have their own bucket now, and past a certain share the judge says in words
that the worktree needs re-cutting. The comparison that does not have this
problem, because it drives a fixed scripted session rather than this tree's
evolving tests, is diff_protocol.py.

Also drops an em-dash from a test that ships. The two `_generated.py` keep
theirs: those are Microsoft's docstrings in the vendored client, and diverging
from upstream for cosmetics is the wrong direction. One public doc still carries
four, and is left alone on purpose - it is an untracked draft from another
session, and sweeping somebody else's unfinished page into a commit that does
not describe it is worse than the punctuation.
2026-08-28 21:02:43 +02:00
feder-cr d109de2264 Two user-visible changes had shipped with nothing in the changelog
The Node driver went, and the visible pointer now ships on. Both are things a
reader upgrading across this release needs told, and neither was written down:
at release time somebody would have had to reconstruct them from git, which is
the failure the changelog gate exists to catch one version too late.

An Unreleased section rather than a version heading, because no version has
been cut. The gate reads only `## [X.Y.Z] - YYYY-MM-DD` headings, so this one
is invisible to it by construction and cannot be mistaken for a release the
index never served.

Also recorded there: the recursion in event delivery and the disposal of closed
pages, both fixed in this branch. They are user-visible even though they read
as internals - the first one made a long session stop working.
2026-08-28 19:44:18 +02:00
feder-cr 9292f2e26f Event delivery was recursive, and past 330 pages the browser stopped talking
Playwright's own suite, pointed at this client for the first time, broke at 63%
with a wall of 150 identical errors: newPage still answered with its targetId
and the attach event never arrived again. Commands alive, events dead, twenty
seconds of waiting per test.

Every subscriber captured the previous on_event and installed itself on top, so
delivering one event called the whole chain nested: the Python stack depth was
the number of subscribers. Nothing ever unsubscribed, and a page registers
three. Measured: 4 links at page 0, 979 at page 325, then RecursionError on
every event - inside the catch the read loop has so a bad handler cannot kill
it, which wrote the failure to a list capped at 32 entries that nobody reads.

One registry now, EventListeners: add_listener, remove_listener, and a
dispatch_event that iterates. The test fakes INHERIT it rather than imitating
it, because a fake with its own idea of what delivering an event means made
those tests green independently of the shipped code. The unsubscribe lives in
announce_closed, the one place that already knows a page is over.

A second leak was hiding behind the first: the server's guid registry grew by
one object per page. The protocol half was real - the driver disposes a closed
Page and we did not - and was found by giving diff_protocol a fifth dimension,
because its event comparison skips every method starting with __. The other
half was not protocol at all: the leftover was a FrameDispatcher, and the
driver sends nothing for frames because its client cascades children itself. So
children are dropped silently inside dispose(), and the wire stays identical.

After: one subscriber and eight objects at page 499, against 979 and 508.

Mutations run: the old recursive implementation stops at 965 of 5000, the same
limit seen in production at 979; announce_closed without the detach and an
inert Lifecycle.detach() both go red; and the e2e reports exactly 120 leaked
subscribers over forty pages, which is three per page.

The cursor default also moves to on. The wrapper forwards show_cursor=None and
lets invisible_core resolve it - a dependency on new BEHAVIOUR that no gate
here can see, since nothing fails to import. A test now imports
DEFAULT_SHOW_CURSOR by name so the ordering is enforced: publish the core, move
the pin, then release this.
2026-08-28 18:17:18 +02:00
Federico c21449bda7 Fifty guides for objects and mechanics the docs had no page for (#100) 2026-08-28 11:48:34 +02:00
Federico e54ac12650 Link the course catalogs guide from four related pages (#99)
It shipped with six outbound links and none coming in, which left it the
only orphan in docs/. The four sources are pages that do not currently
hold a first-page position, so nothing at risk was touched.
2026-08-28 03:24:29 +02:00
Federico 2642828d8c Put a scannable tool table at the top of the comparisons page (#98)
The page was a prose index. The queries it should answer are answered
elsewhere by tables, so the format was the gap, not the content.
2026-08-28 03:18:10 +02:00
Federico c0d1a7dc26 Add a guide for scraping course catalogs (#97)
Fills a gap the docs had no page for: catalogs are a four-level tree and
the row that carries instructor, capacity and enrolment is the section,
not the course.
2026-08-28 03:01:16 +02:00
feder-cr f74aa063d6 Control characters spelled with chr(), where they are meant
test_marker_vocabulary.py caught two literals that EVALUATE to a control
character: the escape table in gen_key_layout.py, and a NUL that NumpadDecimal
genuinely carries as its key in the extracted layout.

Both are deliberate and both were still wrong to write as escapes. The gate
reads the resolved value with ast precisely because a file can be byte-clean and
still hold a corrupted string - a Windows path in a non-raw literal is the
canonical case - and nothing in the source distinguished a deliberate 0x08 from
an accidental one except saying so. They are chr(8) and chr(0) now, with the
reason next to them, and the generator emits chr(n) for a control character in
the data rather than an escape.
2026-08-28 02:34:09 +02:00
feder-cr 5e6a6ef402 Child frames, frame-crossing locators, and four defects the judge found
The two-transport judge answered for the first time: 43 tests green on both, 0
failing on both, 0 failing only on the driver - and 7 passing through the driver
and failing through us. All seven were one subject, and the verdict was correct:
not ready to delete the driver.

Child frames were never announced. The server made a FrameDispatcher for the
main frame and created others only on demand, so page.frames held one entry
where there should have been two and every iframe locator found nothing. The
message said it plainly - page.frames urls = ['http://.../'] - and it took the
judge to ask the question at all.

Frame-crossing selectors were refused, and once frames existed the refusal was
the wrong answer. `#outer >> internal:control=enter-frame >> #inner` is now
resolved server-side, because the injected script lives in ONE document and
cannot reach into an iframe's - that is the same-origin boundary, not a missing
feature. The hop recurses, because frames nest: handling one level looks right
on every page with a single iframe and is wrong on the ones that matter.

dispatch_event passed Playwright's serialised argument envelope straight to
Juggler, whose closed-world schema rejected it naming a field the caller never
wrote. Nothing to do with frames: it failed on the main frame too, and only an
iframe test happened to exercise it.

And the hit-target interceptor got a coordinate space wrong. getContentQuads
answers in the MAIN frame's space, which is what dispatchMouseEvent wants, but
the interceptor's preliminary check runs elementFromPoint inside the TARGET
frame's document. A main-frame point handed to a nested iframe asks about a
coordinate that means something else there, and it answered <html> for an
element sitting under the pointer. The preliminary check now runs only in the
main frame; the listener still validates every event with its own coordinates,
so the guarantee is unchanged and only the timing moves.

Also: every action now takes frame_id and honours it, and load states and
navigation are emitted for every frame rather than only the main one.
2026-08-28 02:01:52 +02:00
feder-cr 7f21765b4b The server leaked five gigabytes of profiles in one day
op_launch invented a temporary profile on every launch and never removed one.
Measured after a single day of development: 136 leftover invisible_profile_*
directories, 5.0 GB. Nothing failed and nothing warned - a Firefox profile is a
few dozen megabytes and the disk simply goes.

This is not a new class of defect here. The project already records the same
thing for Playwright's own throwaway profiles: 7,308 directories accumulated
over seven months, found only because somebody counted. This reproduced it in
hours, which is what a per-launch leak does.

Whoever makes the profile takes it away, and only that one. A userDataDir the
caller named is theirs and survives the session by definition; a directory we
invented is ours and must not.

The removal hook is registered AFTER conn.close, and the order is the point:
hooks run in reverse, so it runs last, when the browser is gone and no longer
holds a lock. Removing it first fails on Windows and fails SILENTLY, because
the hook runner swallows one hook's failure so it cannot stop the others. And
the removal itself never raises: it runs while the session is already going
away, and a profile left behind costs megabytes where an exception would cost a
shutdown.

The mutation was run: with the cleanup disabled the test goes red on the
leftover directory, and the caller-owned half of the same test proves the
distinction is real.

Housekeeping alongside: 239 leaked directories removed, 11.8 GB.
2026-08-28 01:23:45 +02:00
feder-cr 68fed39327 Item 1: the two writers of user.js produce the same bytes
The criterion item 1 was written with is byte parity, not "both work". Two prefs
files can each be valid, each configure the browser, and differ - a header, a
different order, an integer written as a string. Every one of those is invisible
in a running browser, and every one means the Python path configured a browser
the Node path never did.

tests/gates/prefs_byte_parity.py compares them without a browser: both writers
are pure functions of the prefs dict. The driver's rules are READ from the
bundle on every run rather than copied - a gate that compares our writer against
a transcription compares it against our own idea of the driver, which always
agrees. If the method disappears from the bundle the gate exits 2, NOT
COMPARABLE, instead of declaring parity.

It found a real difference on its first real run: our writer SORTED the names,
while the driver uses Object.keys, which is insertion order. Six prefs, six
lines, all out of place - a perfectly correct file that was not the same file.
It also had a header comment the driver does not write. Both fixed.

Six mutations killed - a header added, lines sorted, an integer quoted, a
boolean turned into a string, the trailing newline dropped, a pref missing -
plus three cases that must not fire.

What is NOT closed and is written down as such: the persistent path, where the
profile belongs to the caller, is not compared; and the e2e on both transports
has not run.
2026-08-28 01:16:05 +02:00
feder-cr 03a616e77a Item 7: a refusal that names the feature, and one perimeter instead of two
Out of perimeter used to answer `no object 'artifact@3' to answer 'read'`:
technically true, unreadable, and indistinguishable from a bug in this package.
It now says that reading an artifact is tracing, that tracing is outside the
automation core, and that this is a decision rather than a gap - with a pointer
to where the decision is written.

A gap and a decision are different failures and the message says which. An
in-perimeter method that is missing is our bug and reads as one; an
out-of-perimeter one names the feature. Collapsing them sends the reader to the
wrong place.

And the perimeter moved INTO the shipped package. It was written first in a
workbench script that measures how much work is left, which is the wrong home
twice over: the thing that has to REFUSE is this package, and a list kept
somewhere that is never shipped is a second copy of a fact. The workbench tool
now reads perimeter.py, and a test asserts it still does - if it ever grew its
own copy again, the two would disagree the first time one was edited, and the
one that matters is the one nobody would have updated.

Five tests, and the mutation was run: with OUTSIDE emptied, four go red. The
fifth checks that every courtesy entry is also out of perimeter - a courtesy
for an in-perimeter operation would make it a silent no-op, which is exactly
what section 5.4 forbids.
2026-08-28 01:10:18 +02:00
feder-cr da238664b3 Item 6 is closed: 127 of 127 in-perimeter operations answer
All eight groups are finished. What was estimated at "~270 call sites" was 127
server operations once the perimeter was applied and the count derived from the
code instead of a hand-kept table.

The last ten were classified before being written, and half of them turned out
not to be work.

drop() with an explicit data payload is REFUSED, and the reason is the protocol:
Juggler builds the DataTransfer from a real pointer drag and exposes no command
to inject one. Faking it from the injected script would emit isTrusted: false on
a form that saw trusted events for everything else, which is the mixture [B175]
exists about. drag_and_drop() is a pointer gesture and works.

register_selector_engine and set_test_id_attribute are refused for the same
structural reason: both are baked into the injected script when it is built, and
rebuilding it would invalidate every handle the caller holds.

set_storage_state refuses per-origin localStorage rather than writing the
cookies and dropping the rest, and expose_binding names which half is missing -
the reply path, not the install.

__waitInfo__ is an annotation for the trace viewer, not an operation: the client
sends it on every wait. It answers as a courtesy, because refusing would fill
the handler error log on every expect().

Implemented: ariaSnapshot, touchscreenTap, requests, launchPersistentContext,
failure, httpVersion, resolveSelector.

And the root now declares a METHODS table like everything else. initialize was
implemented from the first day but lived in an if inside handle_root, so the
tool that derives coverage could not see it - the count was wrong by one, in the
direction that makes you write code twice.
2026-08-28 01:05:09 +02:00
feder-cr c3d4ff570d Route interception, web storage, and the last of the small groups
118 of the 128 in-perimeter operations now answer. The dialogs, console and
files group is finished.

Route interception is the piece with teeth. A route that is never answered
hangs the page SILENTLY: the request sits held, nothing errors, and the failure
surfaces as a timeout on whatever the caller does next. So the route event is
emitted the instant the request is intercepted, never lazily, because
Playwright's own auto-answer only works if the object reaches it.

Three narrowings that are stated rather than discovered later.

Juggler's interception is a BOOLEAN, not a pattern list: it intercepts
everything or nothing. The client filters by url on its side and continues what
it does not want, so behaviour is right - but every request now round-trips
through this process, which is why route() on a busy page is slower here than
upstream. A cost, not a defect.

set_storage_state refuses per-origin localStorage instead of writing the
cookies and dropping the rest. Half a restored session that looks like it
worked sends the caller to debug the site.

expose_binding refuses too, and says which half is missing: installing the
function is one init script, but the reply path - bindingCalled, then resolve
or reject into the promise the page is holding - is not wired, and a binding
that never answers hangs the page that called it.

Web storage runs in the MAIN world, and that one is not a style choice: storage
is keyed by origin and the utility sandbox carries an ExpandedPrincipal, so
reading from there does not raise - it answers a DIFFERENT store, empty, and
the caller concludes the site saved nothing.

And the english-only gate stopped this commit twice more. Both times it was
right.
2026-08-28 00:59:41 +02:00
feder-cr 3696196a3e Handles, script tags, the console log, and a benchmark that closed a question
The owner asked why a server is needed on the client side at all. Measured
rather than argued: scripts/bench_transport.py times only our machinery against
a fake server that answers instantly - no browser, so what is left is the
transport and nothing else. Over 8000 rounds the median is 0.029 ms, p99 0.069,
which is 1.2% of a real Juggler round trip. Making _juggler async would touch
~110 dispatcher methods plus the whole client to recover that. The answer is no,
and it is written down with the number so nobody has to re-derive it.

Five operations that looked outstanding were out of perimeter wearing a generic
name. read, write, delete and cancel are Stream and Artifact - the files
tracing, video and downloads produce - and createTempFiles is the streamed
upload path, while set_input_files with local paths already works. They were
recognised by reading WHICH MODULE sends them rather than by their name. And
reject/resolve are not a group of their own: they are the reply path of
exposeBinding.

New here: getProperty, getPropertyList, jsonValue, requestGC, addScriptTag,
addStyleTag, waitForElementState, and the console and pageError logs.

Two things the tags get right on purpose. They are appended in the MAIN world,
because a tag added behind the Xray defines nothing the page can see - the exact
opposite of what add_script_tag promises. And a url is AWAITED: returning
immediately hands back a handle to a script that has not run, so the next
evaluate does not see what it defines.

The logs fill from the events, not on request. Filling them when asked would
only ever hold what arrived after the question, so console_messages() would
answer an empty list and look like a page that prints nothing. Capped at 500.

And the english-only gate stopped this commit once: the comments above were
written in Italian first. It did exactly what it exists for.
2026-08-28 00:53:18 +02:00
feder-cr be41de5ca8 Network events, cookies, permissions, viewport, screenshot
Request and Response cross the seam, so page.on("request") and
page.on("response") fire. Cookies, permissions and geolocation go through the
browser context. Viewport, emulated media and screenshot go through the page.

Four shapes measured rather than assumed.

Headers are an ARRAY of name/value pairs, never a dict. RawHeaders iterates the
list and a dict iterates its keys, so handing one over does not raise: every
header value comes back empty.

Every timing field is mandatory and -1 means "did not happen". Leaving one out
is a KeyError in the client; leaving it at 0 claims the phase took no time,
which is a different lie.

In a closed-world schema null and absent are different answers. Page.screenshot
was rejected with 'Object "<root>.clip" is undefined, but has some scheme'
because an Optional arriving as null is a value of the wrong type. And clip
turned out to be mandatory anyway: the declaration does not wrap it in
Optional, so it is computed from the viewport when the caller does not give
one. Reading the type declaration settled it - both obvious readings of that
error were wrong.

A cookie domain with a leading dot means "and every subdomain", so comparing
the two strings directly answers nothing for a site-wide cookie.

And clear_cookies with a filter is refused rather than widened: the engine
command clears the whole context, and quietly clearing more than asked is worse
than saying no.
2026-08-28 00:42:42 +02:00
feder-cr 1c188bb53f Events: console, pageerror, dialogs, load states, navigation
page.on(...) works through the Python server. Juggler events are translated
into protocol events, which is what everything from expect_console_message to
an unanswered alert depends on.

Two shapes that a guess would get wrong, both from reading the client.

console and pageError are emitted on the CONTEXT, not the Page.
_browser_context.py listens for them and re-emits on the page it finds in
params["page"]. Emitting them on the Page produces no error whatsoever: the
handler simply never runs, and the user concludes their page prints nothing.

And creating an object is not emitting an event. The dialog cost an hour on
exactly this: __create__ was sent, the client built the Dialog, and nothing
fired - because _browser_context.py listens for a dialog EVENT carrying the
channel. The failure did not look like a missing event. It looked like
"Runtime.callFunction: no response in 30s", because an unanswered dialog leaves
the content process blocked inside window.alert and the NEXT command is the one
that times out.

The control is what identified it: the same script through the Node driver
answered the dialog and returned. Two clients, one engine, one behaviour
different - so it was mine.

A location is always sent, never null: _browser_context.py casts it and falls
back only on a missing KEY, so a null becomes an AttributeError somewhere else.
And console arguments arrive as remote objects, so the text comes from the
preview when there is no primitive value.
2026-08-28 00:07:21 +02:00
feder-cr 9d4d89e3e6 Closed shadow roots, end to end, and the prefs the server was throwing away
The 2026-08-20 research said locators cannot reach a closed shadow root without
forking Playwright. Re-measured against the shipped binary, half of it is
already done and the other half is now possible.

Side A is DONE and was already shipped. The engine patch lives in
Element::GetShadowRootForBindings, gated on the ExpandedPrincipal that Juggler's
sandbox carries, so the utility world sees a closed root and the page still gets
null. Measured both ways in one run: the selector engine finds an element inside
a closed root, and inside a root nested in a closed root, while the page's own
script reads null off the same host and its outerHTML is unchanged.

Side B is what owning the client unlocked. content() no longer serialises with
outerHTML, which walks the light DOM only and returns every shadow root as an
empty host. It now collects the roots recursively - possible because this runs
in the utility world - and hands them to getHTML({serializableShadowRoots,
shadowRoots}), which writes them as <template shadowrootmode="closed">. On the
probe page: three roots, two closed and one open, 805 characters against 433.
This is a deliberate divergence from upstream and it is written down where it
happens.

And the finding that mattered more than either. The Python launch path was
writing NO prefs: two hundred of them arrive in firefoxUserPrefs on every
launch and the server dropped them, starting Firefox on an empty temporary
profile. Everything worked - pages loaded, clicks landed, tests were green -
and every stealth declaration the package exists to make was absent. It was
caught by a shadow root, because that engine patch is gated on
StealthEngineActive(): the same probe found the root through _juggler directly
and lost it through the public API, and the only difference was who wrote the
profile.

Three more defects the shadow tests exposed. evaluate() ran in the UTILITY
world, so user code did not see the page's own globals - caught by the
assertion that the PAGE cannot see a closed root, which failed because the code
asking was not running as the page. evaluate() also mishandled the function
form: Playwright sends "1+1" and "() => x" down the same field, and evaluating
the raw string returned a function object, so the caller got None with no error.
And a serialised container needs an id, or parse_value raises a bare KeyError
several frames from the cause.
2026-08-27 23:47:28 +02:00
feder-cr ef413f8a04 The public API drives a page without Node
This is the seam. PipeTransport spawns node cli.js run-driver and speaks the
Playwright protocol over a pipe; InProcessTransport answers the same protocol
from this process. Everything above it - channels, guids, ChannelOwner, the sync
and async facades, the 823 generated methods - is untouched, because from up
there nothing can tell whether the answer crossed a pipe.

Every shape in server.py was measured, not deduced. scripts/capture_protocol.py
records a real session against the Node driver: 113 messages, 13 object types,
and the initializers come from that recording. Reading _impl tells you which
fields are CONSUMED; it cannot tell you which are SENT, and the gap is where a
future code path breaks.

Three things the recording said that a guess would have got wrong. goto, click,
fill, title, content and querySelector go to the Frame, not the Page. mouseMove
goes to the Page and arrives nineteen times for one click, because the cursor
travels. And a BrowserContext is born with three children already alive -
Debugger, Tracing, APIRequestContext - each announced before the context that
names them, then re-parented with __adopt__; _browser_context.py resolves all
three inside its constructor, so leaving them out raises before any page exists.

Threads are not optional. send() is called on the asyncio loop and every Juggler
operation blocks, so running one inline deadlocks the sync facade rather than
slowing it. send() enqueues; a pool runs the work and posts replies back with
call_soon_threadsafe.

The driver is NOT deleted yet, and that is deliberate: it is the judge of the
Python server. Both answer the same protocol, so the only honest check is the
same session through both. INVPW_TRANSPORT picks, an unknown value is refused
rather than falling back, and the default stays the driver until the judgement
says otherwise.

Also: Lifecycle.wait_for_main_frame, because the main frame arrives as an event
and reading the attribute right after attaching is a race that passes on a free
machine.
2026-08-27 22:57:02 +02:00
feder-cr f98717c910 English only, and a gate that says so
The repo is public and the owner asked for it to be all English. It was not:
549 lines written today in the _juggler client plus 852 lines across 33
pre-existing files - launcher.py, async_api.py, _session.py, ci_font_gate.py,
three CI workflows, the CHANGELOG and the pyproject.

scripts/check_english_only.py now refuses Italian mechanically. It looks for
two distinct Italian function words in one file: one is a proper noun or a
quotation, two is prose. Nine mutations killed, nine cases that must not fire.

Two exemptions, both stated and both narrow. This file carries its own
known-bad corpus, and test_fork.py reproduces the JavaScript comment that broke
the bundle on 2026-08-24 - the defect IS the trailing apostrophe of an Italian
word, so translating it would leave a test that can no longer fail.

And vendored is not a blanket exemption. _pw/ and _driver/ are upstream, but
they hold OUR patches, and seven of those blocks were Italian and invisible:
one of them in _playwright.py, which every user imports. The gate now reads the
marked blocks inside excluded folders. Two shapes of that were wrong first: a
fixed line span reached past a one-line comment into somebody else's code, and
a line is not a unit in a bundled file whose longest line is 320,820
characters.

The marker itself moved from MODIFICATO to MODIFIED, so the generator, the
extracted injected.js and the two tests that name it moved with it.

Three defects the translation exposed rather than caused. A two-argument event
handler where three arguments arrive, in a test marked e2e that the default
selection never ran - it could not pass, and _deliver swallowed the TypeError
without a trace, so Connection now records handler_errors and the test reads
them. A walk over the protocol tree whose two keys were renamed: it stopped
descending and stayed GREEN, because a smaller set is still a subset, so it now
asserts how many nodes it visited. And a Lifecycle method that ended up with
three different names because the glossary described a method as an attribute.
2026-08-27 22:48:07 +02:00
feder-cr 6d87108b90 Input and pointer, and the hit target that closes the race
The whole input group: mouse primitives, keyboard, dblclick, check/uncheck,
focus/blur, select option, dispatch event, press, type, set files, tap, drag.

Three defects found by measuring instead of assuming.

The buttons mask is not one-shifted. Firefox wants left 1, RIGHT 2, MIDDLE 4,
read in the bundle. The code had 1 << button, which gives 1 for left and is
therefore wrong for the other two without ever failing.

The keyboard sent code "" and keyCode 0 for every character. The event fires,
the text lands, the action succeeds and the tests pass, while the page reads
an empty event.code on a key every real Firefox names. The US layout is now
extracted from the bundle by scripts/gen_key_layout.py, 111 entries, and the
keyCode field carries keyCodeWithoutLocation.

A bare string never reached the option filter. It starts from matches = true
and narrows only on valueOrLabel, value, label or index, so a plain string
matched everything and selected the FIRST option: measured, ["b"] answered
['a'] and left the value at a.

And the hit target. Between the actionability check and the event the page can
move: a page that reveals a block at 1200 ms made dblclick land nineteen pixels
high, with the action succeeding and the page seeing nothing. Every click now
runs under setupHitTargetInterceptor, and a wrong target is a retryable
condition, not a failure.
2026-08-27 21:50:23 +02:00
feder-cr 6bef5d7287 Le letture del DOM, tutte dal mondo di utilita'
Il gruppo "lettura del DOM" della voce 6: stato (i sette is_*), innerText,
innerHTML, input_value, get_attribute, title, content, bounding_box.

Tre punti che non sono ovvi e che il codice porta scritti accanto:

elementState non torna un booleano ma {matches, received}, e su un nodo
staccato received vale error:notconnected. Letto come booleano darebbe vero
per qualunque dizionario non vuoto, cioe' sempre. Il noto-cattivo e' proprio
quello: rimessa la lettura ingenua, il test che chiede stati diversi sullo
stesso elemento diventa rosso.

input_value rifiuta su un nodo che non sia input, textarea o select, invece
di tornare undefined in silenzio; e stato rifiuta un nome fuori dagli otto
che elementState conosce davvero, letti nel suo codice.

bounding_box passa da Page.getContentQuads, non da getBoundingClientRect:
quel getter appartiene al sito, e chiamarlo sarebbe contabile.
2026-08-27 20:40:11 +02:00
feder-cr 9c7be77062 Il ciclo di ritentativo, e un noto-cattivo che passava per la ragione sbagliata
Voce 5c: risolvi, verifica, agisci, e se il DOM ti e' cambiato sotto
ricomincia. Il selettore si risolve DA CAPO a ogni giro - riusare l'handle
del giro precedente e' l'errore che rende il ciclo inutile, perche' quello
punta a un nodo che il DOM puo' aver sostituito e l'azione va a vuoto senza
dire niente. E un timeout dice il motivo dell'ultimo giro, perche' un
TimeoutError nudo su un ciclo di ritentativi e' la cosa meno utile che si
possa stampare.

Misurato sul binario spedito: il click arriva alla pagina, il ciclo aspetta
un elemento che compare dopo 1,2 secondi invece di fallire, e su un selettore
inesistente dice "il selettore non trova niente" mentre su un bottone
disabilitato dice "manca enabled" - due casi che un messaggio solo
confonderebbe.

LA PARTE CHE VALE. Il primo noto-cattivo sugli eventi fidati PASSAVA, e
passava per la ragione sbagliata. Mutando dispatchTrustedInputEvents in un
dispatch dallo script iniettato, il test restava verde: quella riga non
veniva mai eseguita, perche' su un input di TESTO injected.fill torna
needsinput e il testo si digita, e gli eventi dei tasti sono fidati comunque.
Il percorso di B175 e' l'altro, quello degli input il cui valore si IMPOSTA.

Aggiunto un input type=date alla pagina di prova, la mutazione adesso muore, e
l'output e' la firma esatta di B175: TTTTTFF, cinque fidati dai tasti e due
falsi dal valore impostato, mescolati sullo stesso form.

E due contratti letti nel C++ invece che indovinati: dispatchKeyEvent conosce
solo keydown e keyup - un keypress alza Unknown type e fa fallire l'intera
digitazione - e un keyup con text alza keyup does not support text option.

Piu' una correzione al commento della connessione, che citava una misura
falsa. Diceva che un comando nudo costava 26,8 ms: quel comando era
Heap.collectGarbage, che raccoglie davvero la spazzatura. La latenza vera
della pipe e' 2,4 ms per Runtime.evaluate("1") e 4,3 ms per getContentQuads.

Suite a 488 verdi, il wheel si installa e si importa.
2026-08-27 20:15:03 +02:00
feder-cr 03d2ab7cef Il docstring del pacchetto diceva "contiene solo protocol.py"
Era vero stamattina. Adesso ci sono anche connection, lifecycle, injected e
il blob JavaScript, e la riga era diventata falsa per via di cio' che ho
fatto dopo averla scritta - la stessa classe di riga che questa cartella
esiste per non avere.

Al suo posto una tabella dei cinque moduli, e le due cose che vanno sapute
prima di toccarli: nessun modulo del prodotto importa ancora questo
pacchetto, quindi e' inerte per costruzione; e cio' che vive qui arriva
all'utente, mentre un attrezzo che serve solo a noi va in scripts.
2026-08-27 19:58:13 +02:00
feder-cr 71760d7a9f Lo script iniettato risponde a Python, e non attraversa
Voce 5b: l'actionability. Non e' stata riscritta e non poteva esserlo - i
motori di selettori e i controlli di stato lavorano sul DOM, e Python non e'
nella pagina. Il JavaScript resta JavaScript; qui c'e' il modo di caricarlo
nel mondo giusto e di chiamarlo.

Il mondo di utilita' non si crea con un comando: si manda setInitScripts con
uno script VUOTO e un worldName, e Juggler annuncia il contesto con
executionContextCreated. Il nome e' __ctx_aux__ e non e' quello di upstream,
perche' il nostro fork lo ha rinominato: c'e' un test che lo pinna, o
divergere dal driver romperebbe l'aggancio in silenzio.

Misurato sul binario spedito: i motori css, text, testid e xpath trovano
tutti, querySelectorAll conta tre su tre, e l'azionabilita' DISTINGUE - il
bottone abilitato passa, quello disabled dice manca enabled, il div con
display:none dice manca visible, e l'input dice editable.

E la verifica che conta piu' di tutte: il nostro client NON attraversa. La
pagina-trappola del gate degli attraversamenti, venti trappole armate nel
primo script e verificate vive, pilotata con _juggler invece che con
Playwright: zero su tutte le azioni, risoluzione di selettori, actionability,
lettura del testo ed evaluate compresi.

Due righe tengono fuori i tell e hanno il loro test: isUtilityWorld vero, o
il costruttore installa tredici listener sull'addEventListener della pagina;
e isUnderTest falso, o pianta window.builtins enumerabile.

Otto test, tre senza browser. Il noto-cattivo e' l'azionabilita':
checkElementStates e' asincrona, e senza await tornerebbe una Promise, che e'
un oggetto vero, quindi ogni elemento risulterebbe azionabile e il controllo
direbbe sempre si'. Mutazione eseguita: tolto l'await, quel test fallisce e
gli altri quattro restano verdi.

Lo script iniettato si estrae dal bundle con gen_injected_source.py, che
rifiuta se l'estratto non porta le nostre modifiche - 312.225 byte, quattro
marcate. Non e' ancora tagliato: il perimetro lascia fuori 87.468 byte, ed e'
un passo a se'.

Suite a 486 verdi, il wheel si installa e si importa da un venv vuoto.
2026-08-27 19:55:46 +02:00
feder-cr 7bd07a8e7e Il ciclo di vita, e il difetto che il banco ha trovato al primo giro
Voce 5 del piano, quella che decide se lo stacco sta in piedi: albero dei
frame, navigazioni, i quattro load state (commit, domcontentloaded, load,
networkidle). Provato su una pagina vera con un iframe: i quattro stati si
raggiungono, l'albero e' giusto, networkidle aspetta davvero il silenzio.

IL DIFETTO, che vale piu' del codice. Azzerare gli stati su
navigationStarted NON basta. Page.navigate risponde col navigationId PRIMA
che navigationStarted arrivi, e in quella finestra il frame porta ancora
commit, domcontentloaded e load del documento precedente: chi aspetta commit
li trova e torna. Misurato al primo giro del banco: la prima
naviga(aspetta="commit") tornava in 0,01 secondi con url=about:blank, cioe'
prima ancora di partire.

Il rimedio non e' aspettare un attimo, che sarebbe una pezza: e' pretendere
che gli stati appartengano ALLA NOSTRA navigazione. Finche' f.navigazione e'
un'altra, quello che vediamo non e' nostro qualunque cosa dica. E il
messaggio di timeout lo dice, perche' altrimenti il caso "gli stati ci sono
ma non sono tuoi" sembrerebbe un browser che non risponde.

Sedici test, quindici senza browser, ed e' voluto: una macchina a stati si
prova dandole gli eventi, e questo difetto si riproduce in tre righe qui
mentre con un browser vero si vedrebbe quasi mai. Il noto-cattivo e'
test_GLI_STATI_DI_UNA_NAVIGAZIONE_NON_VALGONO_PER_UN_ALTRA, e la mutazione e'
stata eseguita: tolta la guardia, quel test fallisce con DID NOT RAISE e gli
altri quattordici restano verdi.

Piu' le altre cose che si scoprono solo scrivendole: sameDocumentNavigation
NON azzera niente perche' e' lo stesso documento; load implica
domcontentloaded; frameDetached porta via il sottoalbero e non il solo nodo;
il contatore delle richieste in volo non scende sotto zero, o networkidle
diventerebbe irraggiungibile per sempre; e networkidle si sblocca per
scadenza di silenzio, quindi l'attesa non puo' dormire fino al prossimo
evento perche' resterebbe ferma proprio nel caso che deve riuscire.

E la connessione ora consegna il sessionId insieme all'evento: senza, gli
eventi di due pagine aperte insieme sono indistinguibili e chi aspetta un
load prende quello dell'altra scheda.

Suite a 483 verdi, il wheel si installa e si importa da un venv vuoto.
2026-08-27 19:39:35 +02:00
feder-cr 4c7e7608d2 Python parla a Juggler senza Node
La prova su cui poggia tutto lo stacco, fatta sul binario spedito
(firefox-21, BuildID 20260827000135): pipe collegata, riga di prontezza
vista, Browser.enable che risponde, un contesto creato, una pagina creata, e
l'evento Browser.attachedToTarget ricevuto. Nessun driver, nessun Node,
nessun Playwright.

Il contratto e' letto in juggler/pipe/nsRemoteDebuggingPipe.cpp, non dedotto:
messaggi JSON delimitati da un BYTE ZERO e non da un a capo; su POSIX i
descrittori sono cablati a 3 e 4; su Windows non esistono descrittori ma
HANDLE letti dall'ambiente con atoi, quindi in decimale e resi ereditabili. E
i nomi sono dal punto di vista del BROWSER: il suo PW_PIPE_READ e' dove noi
scriviamo.

Due cose che si scoprono solo provandole, e che restano scritte accanto al
codice. La prima: _winapi.CreatePipe di CPython passa security attributes
NULL, quindi gli handle NON sono ereditabili, e metterli in handle_list cosi'
com'erano fa fallire CreateProcess con WinError 87, che non nomina la causa.
Si duplicano chiedendo l'ereditarieta'. La seconda: chiudere la pipe E' il
comando di uscita, perche' ReaderLoop chiama Disconnected quando la lettura
torna zero e Juggler spegne il browser. Non si comincia da terminate(), che
su Windows colpisce lo stub del launcher e lascia vivo l'albero - in questo
progetto sono gia' stati contati 88 orfani cosi'.

Cinque test. Tre senza browser sul protocollo generato, e due e2e: il
percorso minimo, e l'input noto-cattivo, cioe' che un comando inventato venga
RIFIUTATO dal browser e non ingoiato. Se tacesse, ogni deriva del protocollo
diventerebbe un timeout muto invece di una riga che nomina il comando.

Suite a 468 verdi, il wheel si installa e si importa da un venv vuoto.
2026-08-27 19:27:13 +02:00
feder-cr bd25ec8594 Il protocollo Juggler si genera dal binario, invece di scriverlo a mano
Primo pezzo dello stacco da Playwright. `scripts/gen_juggler_protocol.py`
legge `Protocol.js` DAL BINARIO SPEDITO e produce
`_juggler/protocol.py`: 71 comandi e 34 eventi in cinque domini, con i
riferimenti ai tipi risolti (browserTypes.UserPreference espanso) e gli otto
combinatori annidati.

Legge lo spedito e non l'albero del sorgente apposta. Oggi i due file sono
byte-identici, verificato, ma possono divergere, e generare dall'albero
produrrebbe un client per un browser che nessun utente esegue. Il modo di
fallire sarebbe quello a mondo chiuso: il browser rifiuta un campo non
dichiarato a runtime, la sessione muore alla creazione del contesto, e la
build resta verde. In questo progetto quella classe e' gia' costata 97 test
su 133.

Il Juggler sta in due layout - omni.ja su Windows, albero sciolto
./chrome/juggler/ su Linux - e il generatore li prova entrambi dicendo quale
ha risposto.

--check e' un gate e porta il suo input noto-cattivo: otto mutazioni sul
Protocol.js in memoria, otto uccise, piu' tre casi che devono NON scattare.
Una mutazione che non tocca il testo si dichiara INERTE invece di contarsi
fra le uccise.

Il modulo e' inerte: nessuno lo importa ancora. Verificato che il wheel si
installa e si importa da un venv vuoto, e la suite resta a 465 verdi.

Non sostituisce protocol_drift_check.py nel repo del sorgente: quello chiede
cosa manda un client vero, questo confronta la nostra dichiarazione con se
stessa. Servono tutti e due.
2026-08-27 19:17:11 +02:00
feder-cr e5a0461559 Il mondo MAIN non tocca piu' niente della pagina
Due punti in cui l'automazione passava dai prototipi del sito invece che
dall'Xray, trovati misurando con una pagina che avvolge gli accessori nel suo
primo script e conta.

Il primo: il costruttore di InjectedScript chiamava senza condizioni
_setupGlobalListenersRemovalDetection e _setupHitTargetInterceptors, che
usano this.window.addEventListener. Nel mondo di utilita' quella window si
vede attraverso un Xray e la chiamata finisce sul nativo; nel mondo MAIN e'
quella della pagina. bounding_box() e' l'unica operazione che costruisce
l'oggetto nel mondo MAIN, e installava TREDICI listener che un sito puo'
contare: un __ctx_ping__ piu' i dodici intercettori di hit-target. Ora le due
installazioni girano solo se _isUtilityWorld, che e' il flag calcolato dalla
riga immediatamente sopra. Costo zero: nel mondo MAIN quei listener erano
gia' inerti, perche' _hitTargetInterceptor lo imposta solo il percorso delle
azioni.

Il secondo: l'anteprima di un ElementHandle la calcola previewNode, che legge
element.textContent. La riga diceva `const utility = await
this._context.injectedScript()` - il nome prometteva il mondo di utilita' e
il codice prendeva il contesto dell'handle. Ora passa da evaluateInUtility,
che era gia' li' poche righe sotto. L'anteprima resta completa anche per un
handle del mondo MAIN.

Misurato prima e dopo: bounding_box() da 13 attraversamenti a 0, le altre 22
operazioni gia' a 0 e rimaste a 0. Verificato con test_fork 11 su 11, il
controllo di fumo, il gate degli attraversamenti a zero su 20 trappole e 16
sonde, e run_e2e.py sul binario spedito: 146 passed, 2 xfailed, 0 failed.
2026-08-27 18:56:20 +02:00
Federico 53aac8e896 Merge pull request #96 from feder-cr/ledger/0.7.4
record 0.7.4 as published
2026-08-27 14:11:40 +02:00
feder-cr d929fac325 Tocca il ramo per far girare la CI
Il push che ha creato questo ramo viene dal token della Action, e GitHub non fa
partire i workflow su quei push. Il contesto RICHIESTO `gate` non arriva mai,
quindi la PR del ledger resta bloccata per sempre - e con enforce_admins non la
puo' fondere nemmeno il proprietario. Un commit vuoto con credenziali vere fa
partire la CI.
2026-08-27 13:57:23 +02:00
feder-cr fcefb6c7a3 record 0.7.4 as published 2026-08-27 11:26:53 +00:00
Federico 401533676c Merge pull request #95 from feder-cr/rilascio/0.7.4
0.7.4: il pin passa al motore firefox-21, e l'xfail del file chooser se ne va
2026-08-27 13:21:55 +02:00
feder-cr 4d5c5fb79c L'xfail del file chooser se ne va come aveva promesso: firefox-21 e' quel rilascio
La sua ragione diceva che il rimedio sta nel MOTORE - PageAgent.js ascolta
`file-input-picker-opening` invece di `juggler-file-picker-shown` - da un commit
POSTERIORE a firefox-20, e che sarebbe diventato verde da solo al primo
firefox-N che include quel commit.

Misurato il 2026-08-27 contro il binario SPEDITO, estratto dall'archivio della
release: BuildID 20260827000135, lo stesso che il sigillo dichiara. Il caso
torna XPASS, quindi il marcatore esce e l'asserzione diventa dura: 1 passed.

Gli ALTRI DUE restano xfail, e non e' una svista: sono [B178], che questa
release non tocca. Verificato invece che assunto - nessun commit fra firefox-20
e HEAD del sorgente nomina setFileInputFiles.

La ragione rimossa non e' stata cancellata: e' diventata la docstring del caso,
perche' un marcatore che sparisce senza lasciare traccia toglie a chi legge il
motivo per cui quel test era rosso.
2026-08-27 09:11:26 +02:00
feder-cr 7f89e84ff6 0.7.4: il pin passa a invisible-core 21.16.0, cioe' al motore firefox-21
Il sigillo del core e' stato rotolato a firefox-21 (tre gambe, digest
319babc718c6) e la sua versione e' diventata 21.16.0; questo consumatore ne
segue il pin, come pretende sync_core_pin.py.

CORE_REVISION non si muove: la regola dice di alzarlo per un rilascio a MOTORE
INVARIATO, e qui la versione cambia comunque perche' cambia il tag.

⛔ Questo commit NON va spinto come tag prima che invisible-core 21.16.0 sia
sull'indice: il gate di publish.yml rifiuta un rilascio il cui pin esatto non
risponde 200, ed e' il rifiuto giusto - un consumatore puo' usare solo cio' che
l'INDICE ha, mai cio' che l'albero del core ha.
2026-08-27 04:53:08 +02:00
Federico 996f4a6147 Merge pull request #94 from feder-cr/fix/font-gate-prefs-nel-profilo
Il font gate scrive le prefs nel profilo: sul protocollo il motore le rifiuta
2026-08-27 04:23:41 +02:00
feder-cr f6898155dc Il font gate scrive le prefs nel profilo: sul protocollo il motore le rifiuta
I tre job `gate` di firefox-21 sono usciti rossi sul FONT GATE con

  BrowserType.launch: Protocol error (Browser.enable):
  Browser.enable no longer applies preferences. They are written into the
  profile before startup.

Il drive gate era VERDE su tutte e tre le gambe, quindi il binario si pilota:
a cadere e' solo questo script, che passa `firefox_user_prefs` a un Playwright
UPSTREAM.

Il rifiuto del motore e' voluto e corretto. Prima quelle prefs arrivavano DOPO
l'avvio, quindi il primo lancio inizializzava gfx e font coi default e il
secondo con le prefs attive: due percorsi diversi, che sono la causa di [B150].
Ignorarle sarebbe stato peggio - un browser senza le prefs che il chiamante
crede di aver impostato, e nessun errore. Quindi il rimedio sta qui, non nel
motore: un `user.js` nel profilo piu' un contesto persistente, che e'
esattamente cio' che il messaggio indica.

VERIFICATO, e non solo "il gate passa":
- il guasto riprodotto in locale sullo stesso juggler: launch(firefox_user_prefs)
  rifiutato, launch() nudo OK, contesto persistente con user.js OK;
- la pref ARRIVA davvero: dopo il lancio la mia riga e' ancora in user.js
  (Playwright non lo sovrascrive) e la pref compare in prefs.js, che Firefox
  scrive dai valori VIVI - quindi e' stata letta all'avvio;
- il gate rifatto contro il binario locale: FONT GATE OK, 71 famiglie su 71,
  fuga dall'host 0, generici mappati.

⛔ E la mutazione (non scrivere user.js) e' SOPRAVVISSUTA su Windows, come il
commento in questo stesso file gia' prevedeva: li' i default di Gecko coincidono
per caso con la persona dichiarata, quindi i generici mappano bene comunque. La
prova discriminante e' su Linux, e la da' la CI. Scritto qui perche' un verde
locale su Windows non dimostra che la pref sia arrivata - lo dimostra prefs.js.

Corretto anche il commento in launcher.py che descriveva il meccanismo VECCHIO
come attuale ("the prefs travel over the protocol instead"). Ora e' al passato,
con quello che vale oggi: il fork scrive user.js nel profilo e passa -profile,
e manda Browser.enable senza userPrefs. Il PRODOTTO quindi non e' toccato -
verificato nel bundle vendored, dove il campo userPrefs sparisce dalla richiesta
e le prefs vengono scritte nel profilo con un errore esplicito se non ci riesce.
2026-08-27 04:13:07 +02:00
Federico aec3a11e5e Merge pull request #93 from feder-cr/fix/post-rilascio-0.7.3
Changelog 0.7.3, e i due test che cercavano un playwright che non c'e' piu'
2026-08-26 18:48:33 +02:00
feder-cr 9e1f7aa34d Il changelog di 0.7.3, e i due test che cercavano un playwright che non c'e' piu'
Tre rossi che l'e2e ha trovato DOPO la pubblicazione, tutti conseguenze corrette
del rilascio e non regressioni.

Il changelog non aveva la voce 0.7.3: il gate lo dice a voce
("published and undocumented"), ed e' un passo del rilascio che ho saltato.
Aggiunta, con il fork vendorizzato, la fine del supporto macOS, il doppio giro
corretto e pyee/greenlet.

E due test leggevano `version('playwright')` in un venv pulito. Da quando il
client e' vendorizzato quel pacchetto NON e' piu' una dipendenza, quindi in un
venv vero non esiste e la riga alzava PackageNotFoundError: i test vivevano
ancora nel mondo di prima. Il primo ora legge la versione dal client
vendorizzato. Il secondo aveva perso la sua domanda - confrontava la versione
risolta col vincolo `playwright>=...` di pyproject, che non c'e' piu' - e la
domanda vera oggi e' un'altra: il client VENDORIZZATO sta nell'intervallo che il
SEAL dichiara per questo motore? E' quello che assert_playwright_range fa a ogni
import; qui si verifica dal di fuori, in un venv vero.

Verificato nella condizione in cui fallivano, non a ragionamento: nel venv con
0.7.3 installata dall'indice il client e' 1.61.0 e il seal dichiara 1.55.0 ..
1.61.0.
2026-08-26 18:17:47 +02:00
Federico d986a7ca32 Merge pull request #92 from feder-cr/ledger/0.7.3-manuale
record 0.7.3 as published (ledger)
2026-08-26 18:15:27 +02:00
feder-cr 60a08313f3 Rilancia la CI su uno sha nuovo: le run del commit precedente restano in action_required perche' quel commit nasce da una Action 2026-08-26 17:43:19 +02:00
feder-cr 2475dc1191 Tocca il ramo per far girare la CI (il push della Action non la triggera) 2026-08-26 17:00:56 +02:00
feder-cr 958da170c3 record 0.7.3 as published 2026-08-26 14:58:27 +00:00
Federico e89ac2b26c Merge pull request #90 from feder-cr/feat/fork-e-srflx
Release 0.7.3: il fork diventa il client vero, allineato al core 20.16.0
2026-08-26 16:51:29 +02:00
feder-cr e5982d2e26 Il test dell'installazione pulita dice cosa NON copre
Non cambia comportamento: installare dall'indice verifica che la versione
pubblicata resti installabile, ed e' una domanda vera. Cambia che ora lo dice:
il bersaglio predefinito e' l'INDICE, quindi questo test NON puo' vedere un
wheel rotto che stai per pubblicare, ed e' stato verde due volte il 2026-08-26
mentre il wheel 0.7.3 non si importava.

Rimanda al gate che quella domanda la fa davvero, tests/gates/wheel_si_importa.py
nel workbench: costruisce il wheel dal codice di adesso, venv vuoto, install,
import. Non puo' stare qui perche' tutta questa suite gira su un'installazione
editable del working tree, dove ogni file esiste per definizione.
2026-08-26 16:39:49 +02:00
feder-cr 6ffc8dd4bc La riga di .gitignore che escludeva _repo_version dal wheel se ne va davvero
Il commit precedente TRACCIAVA il file ma non toglieva la riga da .gitignore:
`git add -f` mette in stage un file ignorato, e io ho verificato con
`git archive HEAD` che il file ci fosse - e c'era, perche' un file tracciato
entra nell'archivio comunque. La riga di ignore invece e' rimasta, e hatchling
la rispetta ANCHE su un file tracciato: da qui 68 file nel wheel invece di 69,
e ModuleNotFoundError su _pw._repo_version per chi installa.

E lo strumento con cui mi ero convinto del contrario era sbagliato:
`git check-ignore` TACE su un file gia' tracciato, quindi rispondeva "non
ignorato" mentre la regola era li'. La domanda giusta e' `grep` sul file di
ignore, oppure - meglio - guardare cosa finisce nel WHEEL.

La correzione e' togliere la riga, non aggiungere il file a
[tool.hatch.build] artifacts: quella sarebbe una seconda regola che contraddice
la prima sullo stesso file, cioe' due posti che dicono cose opposte. La riga non
ha ragione di esistere qui: il commento "don't track" vale nel repo di
Playwright, dove setuptools-scm rigenera il file a ogni build; da noi e'
vendorizzato e nessuno lo rigenera.

Misurata la CLASSE, non solo il caso: 92 file del fork sul disco, 91 nel wheel,
e l'unico mancante era questo. Nessun altro file del fork e' nella trappola.
2026-08-26 16:32:23 +02:00
feder-cr 2651a53dd8 pyee e greenlet vanno dichiarate: erano transitive di playwright, che non c'e' piu'
Il wheel 0.7.3 si installava e non si importava: `No module named 'pyee'`. Chi
vendorizza eredita le dipendenze di cio' che ha vendorizzato, e togliendo
`playwright` dalle dipendenze sono sparite con lui anche le sue transitive, che
il client in _pw/ importa lo stesso - pyee per gli emettitori di eventi,
greenlet per l'API sincrona.

Verificato come lo vede un utente, non a ragionamento: venv pulito, install del
wheel, `import invisible_playwright` -> ora IMPORT OK 0.7.3 e `pip check` senza
requisiti rotti. Gli intervalli sono quelli che playwright 1.61 dichiarava, per
non inventare un vincolo diverso da quello con cui il client e' stato provato.

Perche' la CI lo mascherava, ed e' la parte che vale: il job e2e fa ancora
`pip install playwright` per il solo `install-deps` (le librerie di SISTEMA di
Firefox su un runner nudo, sottocomando che il fork non espone apposta), e quel
comando si tirava dentro pyee e greenlet dalla porta di servizio. Il passo ora
dice a voce che quel pacchetto e' uno strumento di sistema e non una dipendenza
del prodotto, e rimanda a tests/test_fork.py per la garanzia che nessuno lo
importi.
2026-08-26 16:19:22 +02:00
feder-cr 7d1b19c402 _repo_version.py del fork va TRACCIATO: senza, il pacchetto si installa e non si importa
La CI ha colto il difetto piu' grave di questa tornata, e su un checkout pulito
(che in locale non si vede mai): ModuleNotFoundError su
invisible_playwright._pw._repo_version, 32 errori in collection su ogni gamba.

Causa mia, quando ho vendorizzato il fork: il file dice in testa "don't track in
version control" e l'ho aggiunto a .gitignore fidandomi di quella riga. Quel
commento pero' vale nel repo di Playwright, dove setuptools-scm lo RIGENERA a
ogni build. Da noi e' vendorizzato, nessuno lo rigenera, e _engine.py lo importa
a runtime (assert_playwright_range legge la versione del client da li'). In
locale il file c'era sul disco, quindi tutto passava; su un clone nuovo no.

E' esattamente la classe della issue #14: si installa, e si rompe solo
dall'utente. Il rilascio 0.7.3 lo avrebbe spedito a tutti.

Tolto da .gitignore e tracciato. Verificato con `git archive HEAD`: il fork ora
ha 68 file piu' questo, ed e' l'unico file del fork che mancava.
2026-08-26 16:07:10 +02:00
feder-cr 47278fa5c3 Il test del filechooser e' xfail sul binario che il seal pinna oggi
L'e2e sulla coppia SPEDITA (wrapper 0.7.3 + core 20.16.0, che pinna firefox-20)
usciva 1 failed: test_expect_file_chooser_riceve_levento andava in timeout
aspettando l'evento filechooser.

Non e' una regressione di questa patch. Il rimedio sta nel MOTORE ed e'
posteriore a firefox-20: PageAgent.js ascolta `file-input-picker-opening` invece
di `juggler-file-picker-shown` da un commit che quel binario non ha. Misurato il
2026-08-26: contro firefox-20 l'evento non arriva, contro la build locale che
porta il commit lo stesso test passa.

Marcato xfail(strict=False) come i suoi due fratelli nello stesso file, con la
ragione e la misura scritte accanto: diventa verde da solo al primo firefox-N che
include quel commit. Lasciarlo rosso avrebbe insegnato a ignorare l'e2e, che e'
il modo in cui un banco smette di servire.
2026-08-26 16:00:49 +02:00
feder-cr a02e68578e Il fork diventa il client vero, e il wrapper si allinea al core 20.16.0
Il fork di Playwright era vendorizzato ma non ancora CABLATO: launcher e
async_api importavano ancora il pacchetto playwright installato, quindi il codice
eseguito non era quello che spediamo. Ora l'import e' invisible_playwright._pw, e
playwright esce dalle dipendenze di pyproject: il client Python e il driver Node
vivono dentro il pacchetto. _node.py risolve il runtime Node per il driver.

E l'allineamento al core 20.16.0, che e' la ragione per cui questo lavoro non
poteva restare in sospeso: il core ha spostato zoom.stealth.webrtc.disable_ipv6
da pref a variabile d'ambiente e ha cambiato i pref humanize, quindi il wrapper
committato non era piu' compatibile col pin nuovo. Il pre-push lo aveva rifiutato
al tentativo di rilascio, correttamente: il pin diceva 20.16.0 e i test dicevano
20.15.0. Adesso _session, launcher e async_api parlano il contratto nuovo, e la
decisione sul srflx si legge da SessionGeo.srflx_da_dichiarare() invece di essere
ricalcolata.

Versione a 0.7.3 con pin invisible_core==20.16.0, gia' sull'indice: l'ordine
core-prima e' rispettato. 465 test verdi. Nuovi test: test_fork.py (nessuno
importa il playwright installato, il client vendorizzato e' quello che si usa) e
test_file_chooser.py.
2026-08-26 15:41:08 +02:00
Federico ba18d53cc4 Merge pull request #89 from feder-cr/mac/rimozione-macos
Il fork di Playwright entra nel repo, e macOS esce
2026-08-26 12:30:07 +02:00
feder-cr 1769635baa Il test delle piattaforme del README riconosce macOS come RITIRATA
Conseguenza corretta della rimozione macOS: il README ora dichiara Win+Linux, ma
il seal PINNATO e' ancora firefox-20, che il mac ce l'aveva, quindi il seal
sovra-spedisce rispetto a cio' che si supporta d'ora in poi. Il test asseriva
"piattaforme del README == piattaforme del seal" e andava rosso.

Aggiunto l'insieme DROPPED (le due gambe macOS): il test non pretende piu' che il
README le dichiari, e in piu' - gate positivo, non silenzio - pretende che il
README DICA che macOS non e' piu' supportato finche' il seal le spedisce ancora,
o un utente Mac non capirebbe il rifiuto. L'altra meta' (dichiarare cio' che non
si costruisce) resta vietata. 465 test verdi.

Parte della rimozione macOS del 2026-08-26 (voce 29 di 72-next-steps).
2026-08-26 06:06:19 +02:00
feder-cr 24deaeecf5 macOS fuori dalle note di rilascio e dal README
Le due superfici che nessun gate protegge, corrette a mano prima del prossimo
firefox-N: gen_release_notes.py scriveva "Builds: ... macOS arm64, macOS x86_64"
e le istruzioni xattr/Gatekeeper in OGNI corpo di release futuro - ora elenca le
tre gambe Win+Linux e niente Gatekeeper. Il README dichiarava macOS fra le
piattaforme supportate: ora dice che il mac non e' piu' supportato (le release si
sono fermate a firefox-20) e che su un Mac il pacchetto rifiuta al lancio con un
messaggio chiaro invece di scaricare un binario che non esiste piu'.

Parte della rimozione macOS del 2026-08-26 (voce 29 di 72-next-steps.md nel
workbench). Il core rifiuta al confine, il sorgente non produce piu' l'asset
mac, e queste due righe erano gli ultimi punti che avrebbero mentito all'utente.
2026-08-26 05:51:31 +02:00
feder-cr 6547cba40a Il fork di Playwright entra nel repo: senza, il pacchetto si installava e non si importava
launcher.py importa da invisible_playwright._pw, ma _pw e _driver erano sul
disco e non in git: nessuna voce di .gitignore li generava, erano semplicemente
non tracciati. Un wheel costruito da un checkout non li conteneva, quindi ogni
import invisible_playwright alzava ImportError. E' la classe di danno della
issue #14: un pacchetto che si installa e si rompe solo dall'utente.

Con loro entra anche tutto il lavoro sul bundle del driver che finora viveva
solo qui: il rimedio a set_content [B177], i 643 KB tolti (android, electron,
bidi, recorder, chromium, webkit), la neutralizzazione di _exposeConsoleApi e la
console.debug rimossa.

E' codice Apache-2.0 dentro un repo il cui codice e' MIT, e non si nasconde:
pyproject dichiara gia' "MIT AND Apache-2.0", il driver porta a monte LICENSE,
NOTICE e ThirdPartyNotices, ho aggiunto la stessa Apache LICENSE al client _pw
che non ce l'aveva, e THIRD_PARTY_FORK.md dice da dove viene il fork, quale
versione (1.61.1) e cosa e' stato modificato.

Fuori restano i .pyc (li ignora gia' .gitignore) e _pw/_repo_version.py, che
setuptools-scm rigenera e che dice esso stesso di non tracciarlo: aggiunto a
.gitignore.

Sblocca la voce 23 di 72-next-steps.md nel workbench. Il push resta una
decisione a parte, con il gate completo: qui e' solo il commit, su un ramo.
2026-08-26 04:43:31 +02:00
Federico 11892c4985 Via l'attesa dopo ogni scheda nuova: la causa e' chiusa nel motore (#88)
Via l'attesa dopo ogni scheda nuova: la causa e' chiusa nel motore
2026-08-23 12:51:58 +02:00
feder-cr 5f222f38f0 I due gate della CI girano nella configurazione che il prodotto spedisce
ci_drive_gate lanciava con sei prefs che spegnevano il newtab e ci_font_gate con
quattro, e il commento diceva che la seconda lista rispecchiava la prima: erano
gia' divergenti da chissa' quando. Il prodotto quelle prefs non le spedisce piu'
dal revert del 20 agosto, quindi un banco che le impone misura un'altra cosa con
lo stesso nome.

Fra il 20 e il 23 agosto ci_drive_gate aspettava _NEWTAB_SETTLE al posto loro.
Quella costante non esiste piu': il pericolo che descriveva non era Fission che
ricarica la pagina, era il browser preallocato della nuova scheda che si
prendeva il canale, ed e' corretto nel motore. Adesso nessuno dei due gate
aspetta niente e nessuno dei due ha liste da tenere in pari.

Provati sul binario con la correzione dentro: DRIVE GATE OK in modalita' full,
cioe' http piu' click piu' mousemove piu' tastiera piu' determinismo del canvas,
e FONT GATE OK con 71 famiglie su 71 e zero fughe dall'host.

CONTRIBUTING mandava i contributori sul ramo stealth/150, che non e' quello su
cui si lavora da un pezzo.
2026-08-23 01:40:37 +02:00
feder-cr 87dd3b4af3 Via l'attesa dopo ogni scheda nuova: la causa e' chiusa nel motore
Le due API dormivano 0,4 s dopo ogni tab creata per non farsi dirottare la
prima goto() da una navigazione ad about:newtab. Quella navigazione non era del
browser: era il browser preallocato della nuova scheda che si prendeva il canale
della pagina, perche' JugglerFrameParent riconosceva il target confrontando un
browserId con l'id di un BrowsingContext. Corretto nel motore, misurato dopo:
10 giri su 10 senza nessuna attesa.

Il ritardo non copriva niente. Con l'attesa vera, cioe' aspettando che
about:newtab fosse arrivato e caricato, la goto riusciva 0 volte su 9; i 0,4 s
riuscivano solo quando vincevano la corsa, perche' la navigazione interna si
impegna a 1,06-1,36 s mentre new_page() ritorna a 0,42 s. Tenerlo adesso
sarebbe un secondo rimedio per una causa sola.

Il test che pinnava il valore diventa un gate che impedisce di rimetterlo:
legge il codice di _patch_new_context_defaults nelle due API e rifiuta
qualunque sleep, non il nome della costante. Provato con la mutazione
noto-cattiva, un time.sleep(0.4) rimesso dentro patched_page, che lo fa
diventare rosso.
2026-08-23 01:03:11 +02:00
feder-cr b59bfd940c Il gate del mouse provava la sola piattaforma su cui il difetto non puo' accadere
Nuovo livello --click: un mouse.move e un click, con l'asserzione che siano
arrivati alla pagina. Niente altro.

Esiste perche' la motivazione di --full era falsa. Diceva: il codice di
interazione e' JS identico su tutte le piattaforme (vive in omni.ja), quindi
provarlo su una gamba affidabile basta per tutte. Misurato: una build
MOZILLA_OFFICIAL mostra il modale dei termini d'uso, che copre il viewport e
mangia ogni evento di mouse mentre la tastiera continua a funzionare, e
browser/app/profile/firefox.js spegne il preonboarding sotto #ifdef XP_LINUX.
Linux e' immune. L'unica gamba che provava il mouse era l'unica che non poteva
vedere il difetto: cinque gambe verdi su un binario col mouse morto su Windows
e macOS, cioe' sulla piattaforma bersaglio.

Resta leggero apposta: la fragilita' che aveva confinato --full a Linux veniva
da una sequenza pesante di interazioni, non da un click solo, e questa classe di
difetto produce ZERO eventi invece che eventi sbagliati.

Validato con un artefatto, non con un ragionamento: un firefox-21 con
termsofuse.acceptedDate rimessa a "0" dentro omni.ja passa SMOKE e fallisce
--click, mentre il binario riparato e quello precedente passano entrambi.
2026-08-19 23:25:35 +02:00
Federico 57f50f8b80 Le due voci piu' vecchie del changelog puntavano a tag mai esistiti (#86)
[0.1.1] e [0.1.0] rimandavano a compare/v0.1.0...v0.1.1 e releases/tag/v0.1.0.
Nessuno dei due tag esiste: 0.1.0 e 0.1.1 precedono l'arrivo su PyPI, dove
l'indice parte da 0.3.5, e il riempimento dei tag mancanti fatto a suo tempo era
guidato dall'indice, quindi non poteva raggiungerle. Due 404 in fondo a un file
che i lettori aprono per capire cosa e' cambiato.

La prova di dove vivevano c'era: git log -S sul pyproject da 7a983e9 per 0.1.0
("feat: initial public release") e 589c848 per 0.1.1.

Avrei potuto creare i tag, e NON l'ho fatto per un rischio concreto. publish.yml
si innesca sui tag v*, e per una versione che l'indice non serve
already-published non corto-circuita: un tag nuovo su 0.1.0 puo' far partire un
tentativo di pubblicarla. Un link rotto in un changelog storico non vale quel
rischio.

I due link puntano ai commit, che sono la stessa informazione senza inneschi, e
la ragione e' scritta nel file accanto perche' il prossimo che li vede diversi
dagli altri non li "sistemi" trasformandoli in tag.

Verificati entrambi: 200.
2026-08-18 20:57:30 +02:00
Federico 932d8b33b0 Remove ScrapeOrbit from the repo (#84)
The landing page, its stylesheet, its script and the company list it
fell back on, plus the two banner images. Nothing else referenced any
of them.

docs/index.md loses its permalink override and becomes the site home
again: index.html was the root, and without it the root would 404
while every other page kept working. Nothing linked to the old
/overview.html path - the declaration was its only occurrence.
2026-08-18 16:16:52 +02:00
Federico 65b72741a9 Drop the ScrapeOrbit banner from the README (#83)
The empty h2 under it goes too: it was the divider for the promo block,
not for the content, and on its own it renders as a rule above nothing.
2026-08-18 15:30:36 +02:00
Federico 835d6d2904 Il controllo sul registro andava rosso su un rilascio riuscito (#82)
Quarta occorrenza della stessa forma trovata stanotte, e questa non l'ho cercata
io: e' uscita da un audit che ha letto 363 controlli chiedendo a ognuno se puo'
essere verde mentre un rilascio e' a meta'.

Il sotto-controllo sul registro dentro test_the_published_version_has_a_github_release
confronta PUBLISHED.json, letto dall'albero, con le versioni che l'indice serve.
Ma il registro non puo' arrivare su main insieme alla pubblicazione: publish.yml
pubblica su PyPI e poi prova a spingere PUBLISHED.json, main e' protetto e la
spinta diretta viene rifiutata sempre per costruzione, quindi la voce finisce su
un ramo ledger/<versione> la cui PR resta bloccata da sola per il difetto B136
gia' aperto. Fra la pubblicazione e il merge a mano l'indice ha la versione e il
registro no, e il caso e' rosso su un rilascio andato a buon fine.

Nello stesso file, poche righe sotto, c'era gia' l'esenzione scritta un'ora prima
per il gate del changelog: la stessa cura, sul controllo accanto, mai applicata.

Esente e' solo la versione che l'albero DICHIARA nel suo pyproject, e il buco si
richiude da solo: se quel ramo del registro non viene mai unito, al rilascio dopo
la versione rimasta indietro non e' piu' quella dichiarata, ricade in unrecorded
e il caso torna rosso. E' lo stesso modello che il commento accanto descrive gia'
per version_gate, dove una pubblicazione fuori dal cancello resta invisibile fino
al rilascio successivo che la rifiuta.

Provato con l'input noto-cattivo: tolta 0.7.0 dal registro, il caso diventa
rosso; rimessa, torna verde.
2026-08-18 13:46:07 +02:00
github-actions[bot]andfeder-cr 35688cab0f record 0.7.2 as published (#81)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-08-18 11:33:37 +02:00
Federico 2073975413 0.7.2: il pin sale a invisible-core 20.15.0, e il badge dei lanci se ne va (#80)
* 0.7.2: il pin sale a invisible-core 20.15.0, e il badge dei lanci se ne va

Il pin porta agli utenti la correzione del core: un endpoint http:// o https://
passato a build_launch_plan non produceva NESSUNA pref di proxy, e il browser
usciva dall'indirizzo della macchina mentre il livello geografico aveva gia'
risolto fuso, lingua ed egress attraverso il proxy.

Questo wrapper non e' mai stato toccato e chi lo usa non deve fare niente:
consegna l'endpoint a Playwright, ed e' stato misurato - lo stesso IP di uscita
di curl attraverso lo stesso proxy, in http e in socks5. Il pin sale perche' un
consumatore che pinna in modo esatto non puo' restare indietro sull'unica
versione del core che quel difetto non ce l'ha.

Il badge `browser launches` esce dalla README. Il contatore dietro non era un
numero che calcolavamo: era un asset di release ospitato su un repository
cancellato il 2026-08-18, quindi la serie e' ferma sull'ultimo valore vero e il
renderer avrebbe ridisegnato quel numero ogni mattina. Un dato congelato
presentato come corrente e' peggio di nessun dato. La storia non e' toccata e
l'SVG sul ramo badges resta, perche' le pagine PyPI gia' pubblicate lo servono.

Nota sul gate del changelog: fra questo commit e la pubblicazione risulta rosso
con "documented and never published", perche' e' simmetrico e rifiuta anche il
caso opposto. Torna verde quando 0.7.2 e' sull'indice. Non e' stato aggirato.

* Due test dell'aggiornamento erano rossi per costruzione durante ogni rilascio

test_a_hand_pinned_old_core_is_reported_by_pip_check installa il wrapper
DALL'INDICE e poi prendeva cores[-2], la penultima versione del core pubblicata,
dandola per scontata come "piu' vecchia di quella che pinniamo". Quella
assunzione vale solo se la piu' recente sull'indice e' quella che il wrapper
pubblicato pinna, e cade per tutta la durata di un rilascio fatto nell'ordine che
il progetto impone: il core si pubblica PRIMA del consumatore.

Misurato oggi. Pubblicato invisible-core 20.15.0, sull'indice il wrapper era
ancora 0.7.1 che pinna 20.14.0, quindi cores[-2] era proprio 20.14.0: il caso
installava la versione GIUSTA chiamandola sbagliata, pip check rispondeva pulito
perche' l'ambiente era corretto, e il test leggeva quel pulito come una cecita'
del pin. Rosso su un prodotto sano. Il secondo caso, che riusa la stessa fixture,
cadeva di conseguenza: nessuna riparazione da fare, quindi "il core e' ancora
20.14.0".

Corretto all'origine: la versione sbagliata non si sceglie piu' dalla POSIZIONE
sull'indice ma da cio' che il wrapper installato PRETENDE, letto dal suo
Requires-Dist, che e' la sola fonte che non dipende da quante versioni ci siano
ne' dal loro ordine.

Dentro la finestra di rilascio la versione diversa dal pin risulta piu' NUOVA
invece che piu' vecchia. Il meccanismo sotto esame e' il rilevamento di un
DISACCORDO, e un disaccordo verso l'alto e' un disaccordo uguale; il nome del
caso resta com'e' perche' i documenti lo citano e un gate lo verifica.

* Il gate del wheel chiedeva dei file spariti sei settimane fa, e non girava mai

test_built_wheel_has_no_duplicate_entries asseriva che nel wheel ci fossero dei
.json, col commento "the Bayesian data files must still be packaged". E' falso
dal 2026-07-03: il commit 76e41e2, quello che ha creato invisible_core, ha
portato quei dati nel core, e questo pacchetto non ne ha piu' nessuno.

Ha continuato a chiedere una cosa inesistente per sei settimane senza che niente
lo segnalasse, e la ragione e' che il caso e' marcato slow: la selezione di
default lo deseleziona, quindi in CI non ha MAI girato. E' saltato fuori solo
perche' oggi ho lanciato la suite con -m "not e2e", che gli slow li include. Un
gate che non gira e' indistinguibile da uno che passa.

La regressione per cui il caso era stato scritto resta e non e' stata toccata:
un vecchio force-include in pyproject.toml scriveva ogni JSON due volte nello
zip, e PyPI rifiuta un wheel con nomi duplicati. Cambia solo il controllo di
sanita' accanto, che ora chiede cio' che deve valere per QUESTO pacchetto: che
il modulo sia dentro il wheel. E' la stessa classe di guasto - packages che
smette di puntare al sorgente - verificata su una cosa che esiste.

Provato con l'input noto-cattivo: con packages = ["src"] il caso diventa rosso.

* Il gate del changelog rendeva impossibile una PR di rilascio verde

Il gate rifiuta una versione documentata che l'indice non serve, e ha ragione:
esiste perche' un changelog che si ferma a quattro rilasci fa e' peggio di
nessun changelog. Ma la voce di una versione deve stare nel commit che alza la
versione, e in quel momento l'indice non la serve ancora. Quindi ogni PR di
rilascio nasceva rossa, e nessuna sequenza di passi poteva evitarlo: pubblicare
prima di mergiare significherebbe pubblicare da un ramo non mergiato.

Misurato oggi sulla PR #80, dove dopo aver corretto gli altri due difetti questo
era l'UNICO rosso rimasto, su 141 test passati.

La via comoda era togliere la voce dal commit e aggiungerla dopo. Sarebbe stato
curare il sintomo ricreando esattamente il buco che questo gate esiste per
impedire: 0.7.1 e' rimasta senza voce per un giorno intero proprio cosi'.

Corretto all'origine: la versione che l'albero DICHIARA nel suo pyproject e' il
rilascio in corso, non un'invenzione. Ogni altra versione documentata e mai
pubblicata resta un errore, le date restano confrontate con l'upload, e quando
il rilascio atterra quella riga torna sotto la regola generale come le altre.

Provato con due input noto-cattivi, perche' un'esenzione e' il punto in cui un
gate diventa cieco senza dirlo:
  una versione inventata diversa da quella in volo  -> rosso
  una versione pubblicata senza voce                -> rosso
2026-08-18 10:43:27 +02:00
Federico d5d92e8689 0.7.1 era pubblicata da un giorno e non era nel changelog (#79)
* record 0.7.1 as published

* 0.7.1 era pubblicata da un giorno e non era nel changelog

Il gate che confronta l'indice con CHANGELOG.md esiste da tempo e ha fatto il suo
lavoro, ma e' marcato e2e e la selezione di default lo deseleziona: e' scattato
alla prima corsa e2e completa DOPO il rilascio, e quella corsa e' avvenuta per
una ragione che col rilascio non c'entrava niente. Un gate che gira solo quando
qualcuno decide di girarlo non protegge il momento in cui serve.

Nel resto: tolti i riferimenti operativi a invisible_firefox, cancellato il
2026-08-18. Il CHANGELOG resta com'era, perche' e' storia: una riga che dice
"allineato con invisible_firefox 0.2.0" descrive un fatto vero di allora. Sono
cambiate solo le frasi che parlavano al presente di tre repo o due consumatori,
compresi un commento in tests.yml e uno in pyproject.toml, piu' il badge dei
lanci nel README che puntava a una pagina ora 404.

446 test verdi, 0 skipped. e2e sul binario firefox-20: 144 verdi.
2026-08-18 02:52:21 +02:00
github-actions[bot]andfeder-cr 25d7b73659 record 0.7.1 as published (#78)
Co-authored-by: feder-cr <85809106+feder-cr@users.noreply.github.com>
2026-08-17 22:12:22 +02:00
Federico 353df4faac 0.7.1: the two gates that approved without looking (#77)
Il font gate confrontava le famiglie contro una lista che era rimasta a 68 mentre
il manifest ne dichiara 71, e la deriva non produceva un rosso: produceva un
verde. La sonda interroga la lista e nient'altro, quindi una famiglia tolta smette
anche di essere cercata, il conto torna da solo e il gate approva restando cieco.
Misurato sul binario vero. Ora un test confronta quella lista con cio' che il core
dichiara, e quel test prima esisteva solo nei documenti.

E il test su enumerateDevices ha due limiti invece di uno, perche' con una soglia
sola una risoluzione soltanto lenta veniva riportata come blocco: il verdetto del
prodotto scritto sopra quello della macchina. Il muro del blocco resta assoluto
perche' un blocco e' infinito; la lentezza si misura contro la macchina.

Il pin punta al core di firefox-20, gia' sull'indice.
2026-08-17 21:59:40 +02:00
Federico d599a95a92 firefox-20: the font gate stops approving while blind, and the media test tells slow from hung (#76)
* Forget the remembered chrome window geometry before a persistent relaunch

Relaunching a persistent profile on Windows succeeded 2 times out of 8. The cause
is in juggler: awaitViewportDimensions resolves only when innerWidth and
innerHeight equal the requested values exactly, it has no timeout, and it re-runs
its check only from a resize or navigationcommitted event. On a relaunch Firefox
restores the chrome window from the profile's xulstore.json, so the corrective
resizeBy computes a null delta, no resize is emitted, and the check is never
re-evaluated. The first launch never hits it because the window starts at the
default size, far from the target.

Confirmed with one difference on the same binary and profile: keeping the
geometry gave 3/6, deleting it 6/6, and successful relaunches went from 20-155s
to 7-10s. After the fix the gate reports 6/6 at about 7s each.

Only the five geometry keys are removed, not the file: the rest of xulstore is UI
state unrelated to this defect.

This acts on the trigger, not on the origin, and says so: the origin is the
unbounded wait, which lives in engine code re-synced from upstream at every
rebase.

Two comments corrected because they asserted things the code does not do. The
first claimed Playwright writes user.js on every launch, which is false on the
Juggler path - writePreferences lives in server/bidi/ and the base
prepareUserDataDir is empty - and that false belief is what made the
first-launch/second-launch asymmetry look impossible. The second named
INVPW_BINARY_PATH in resolve_executable, which never reads it.

Not a fingerprint change, and measured rather than argued: on a reused profile a
page sees inner=[1920,947] outer=[1920,1032] and outer-inner=[0,85], identical to
the first launch and to the declared model.

* Withdraw the cause I wrote for the persistent-relaunch hang: it is false

A dump() probe inside awaitViewportDimensions, with the remedy disabled at
runtime so the defect would reappear: over 8 relaunches the 6 that worked ran
that check twice and matched exactly on the first try every time, and the 2 that
hung never reached it. So that wait never mismatches, and the stall happens
before a target exists.

What stays measured is the correlation: 12 relaunches out of 12 with the geometry
keys removed against 5 out of 14 with them kept. But a real effect does not prove
a mechanism - deleting a file also changes timing, and on a startup race a timing
perturbation improves things for the wrong reason.

So this call is a declared patch, and worse than the patch it was first written
as: then the cause seemed known and the refactor deferred; now the cause is
unknown and this removes a trigger without explaining it.

* Remove the geometry remedy: the origin was found and it lives in the core now

The cause of the persistent-relaunch hang turned out to be Windows occlusion
tracking declaring our chrome window occluded and never revoking it, and the fix
is a pref invisible_core now applies to every session. So this file goes back to
having no remedy of its own: the function, its constant, the call and its five
tests are gone.

Measured before removing them: with the pref and this code deleted, and the
persisted window geometry deliberately KEPT, 10 relaunches out of 10 succeed at
about 7 seconds each. Keeping both would leave two places knowing the same fact,
which is what rule 16 forbids.

And the note in _session.py that presented INVPW_TRUE_HEADLESS as the escape
hatch for this hang now carries the mechanism instead of the symptom: true
headless was reliable because there is no window to occlude. It stays as a
deliberate choice of a different rendering path, not as a workaround.

Full account, including the two causes I wrote before this one and how each was
falsified: 71-bug-archive.md [B150].

* The e2e strips INVISIBLE_CORE_PIN, because one of its tests asserts what that variable disables

Setting it is the normal way to drive a locally built engine, so it is usually already
exported in the shell that starts a run, and the venv subprocess that the upgrade test
spawns inherits it. That test deliberately breaks an environment and requires importing
the wrapper to repair it. With the variable set the repair correctly declines, the version
does not move, and the test fails for a reason that has nothing to do with the binary.

Measured: one failed and a hundred forty three passed in fourteen minutes, and the same
file re-run with the variable unset gave four passed in two minutes. Refusing up front
costs a second, and discovering it costs the whole run plus the time spent believing the
product was broken.

It is stripped rather than merely warned about, because a warning at the top of a
fourteen minute run has scrolled away long before the failure appears. The line that says
it was stripped prints only when it was actually set.

* La lista delle famiglie nel font gate era rimasta a 68, e la deriva dava verde

Il manifest e' passato a 71 famiglie il 16 agosto, aggiungendo le due Segoe di
icone e Twemoji Mozilla. La lista dentro scripts/ci_font_gate.py e' rimasta a
68, quindi il gate non cercava piu' tre famiglie che spediamo.

La parte che conta non e' la deriva, e' cosa produce. Misurato sul binario vero:
la sonda interroga EXPECTED piu' i nomi dell'host e nient'altro, quindi una
famiglia tolta dalla lista smette anche di essere CERCATA. Con le tre mancanti
il gate stampa "detected 68 families (expected 68)" e FONT GATE OK, uscita 0, su
una build che ne espone 71. Un gate d'accordo con se' stesso non vede la propria
deriva, e nessuna mutazione del gate l'avrebbe scoperta.

La lista resta un letterale, e non per pigrizia: il job di release.yml che
esegue questo gate fa il checkout di questo repo ma installa soltanto playwright,
quindi importare invisible_core li' uccide ogni rilascio. La derivazione e'
stata scritta e provata, funziona in locale, ed e' stata ritirata per quello. E
anche se un giorno quel job installasse il core, quando la pipeline gira il core
pubblicato e' ancora quello del rilascio precedente: si misurerebbe il binario
nuovo contro la dichiarazione vecchia.

Quindi cio' che tiene onesto il letterale e' un test, non l'attenzione di chi lo
edita, e quel test non esisteva. Era documentato come esistente, con nome e file,
e nell'albero non c'era: e' esattamente per questo che la lista ha potuto restare
indietro per un giorno. Ora c'e', e la sua mutazione e' stata eseguita: tolto un
nome diventa rosso, rimesso torna verde.

Verificato sul binario locale: 71 famiglie rilevate su 71 attese, zero fughe
dall'host, i generici mappano su font Windows.

* Il test riportava un blocco dove c'era solo una macchina carica

Con una soglia sola, una risoluzione lenta di enumerateDevices veniva riportata
come MAI RISOLTA: scriveva il verdetto del prodotto sopra quello della macchina.
Adesso i limiti sono due e i messaggi distinti.

Il muro del blocco resta assoluto a 120 secondi, perche' un blocco e' infinito e
non deve scalare con niente: sono 83 volte la mediana e 24 volte il peggior tempo
mai osservato quando la chiamata funziona. La lentezza invece si misura contro la
macchina: la pagina cronometra ventimila microtask e il limite e' un multiplo di
quel tempo, con un pavimento e un tetto sotto il muro.

Due difetti della prima stesura di questo rimedio, colti misurando e non
rileggendo. Il riferimento contava cinquanta giri di setTimeout e a macchina
scarica dava 2624 ms, cioe' cinquantadue per giro: non era carico, era il clamp
dei timer, che Firefox applica comunque. Un riferimento va scelto per cio' che
misura, e un timer clampato misura il clamp. E da quel numero il limite di
lentezza usciva sopra il muro del blocco, quindi la prima asserzione scattava
sempre prima e la seconda era irraggiungibile: un'asserzione morta che sembrava
una protezione. Da li' il tetto.

Entrambi gli input noto-cattivi eseguiti: muro a un millisecondo fa scattare il
messaggio del blocco, pavimento e multiplo a uno quello della lentezza.

* Il messaggio del gate andava in errore proprio quando serviva

Il messaggio dell'asserzione usava un % dopo una concatenazione con +, quindi
quel % si legava solo all'ultimo gruppo di letterali adiacenti, che non ha
segnaposti, e alzava TypeError. Un messaggio di asserzione viene valutato solo
quando l'asserzione fallisce, percio' il difetto si manifestava esattamente
nell'istante in cui serviva la spiegazione: in CI e' comparso un TypeError al
posto della differenza fra le due liste.

Ora i valori si concatenano gia' resi con repr, che non ha questo modo di
sbagliare, e il messaggio dice anche cosa guardare se scatta durante un
rilascio: la CI installa il core PUBBLICATO, non quello dell'albero, quindi un
gate aggiornato prima che il core sia sull'indice vede il manifest vecchio.

Cercato lo stesso schema negli altri quattro file di test toccati oggi: nessuna
altra occorrenza.

* Il pin punta al core di firefox-20

invisible_core 20.14.0 e' sull'indice, quindi la condizione che il workflow di
pubblicazione pretende e' soddisfatta: il pin esatto risponde 200 prima che il
rilascio parta.

Il numero non e' scritto a mano da nessuna parte. La versione del core e'
derivata dal suo sigillo, e sync_core_pin la legge da li' e la porta qui, cosi'
non esiste un punto in cui qualcuno possa dimenticarsi di alzarla.
2026-08-17 21:38:47 +02:00
Federico b16b9c9438 Ask for a Telegram handle instead of an email in the scrape panel (#75) 2026-08-17 05:13:29 +02:00
Federico 5aa8c68b4e Refine the scrape panel: higher contrast, clearer fields, a gradient CTA (#74) 2026-08-17 03:00:00 +02:00
Federico 049476ad43 Drop the empty-state search hint under the search bar (#73) 2026-08-17 02:45:14 +02:00
Federico 9e650968f6 Replace the scrape chat with a single smart instruction panel (#72) 2026-08-17 02:34:53 +02:00
Federico f3814b6bb1 Replace the Telegram handoff with an in-page scrape chat (#71) 2026-08-17 02:15:34 +02:00
Federico 0dd6dd2a38 Rework the demo: click dissolves the scene into the scraped products.json (#70) 2026-08-17 01:45:14 +02:00
Federico 429798f70e Smooth the ScrapeOrbit demo to 25fps for less mechanical motion (#69) 2026-08-16 23:04:33 +02:00
Federico d486660604 Trim the ScrapeOrbit banner to the demo and one call to action (#68) 2026-08-16 22:01:21 +02:00
Federico b9f35c0bcb Animate the ScrapeOrbit banner and switch on global company search (#67)
Swap the static banner for a short looping demo (type a company, get the
real result with its logo, hit Scrape) and add a badge row under it. Set
the Brandfetch client id so the search covers every company, not only the
bundled index.
2026-08-16 21:20:14 +02:00
Federico 5fef7cc316 Add ScrapeOrbit landing page and point the README banner to it (#66)
New static page under docs/ served at the site root: a company search with logos and a scrape button that opens a direct chat. The top of the README now shows the ScrapeOrbit banner linking to it, in place of the group link.
2026-08-16 19:44:25 +02:00
Federico 7278427aa8 I test dell'installazione ereditavano l'ambiente di chi li lanciava (#65)
env=None in subprocess.run non vuol dire ambiente vuoto: vuol dire eredita.
Quindi PYTHONPATH e INVISIBLE_SEAL_FILE entravano nei venv che questi test
costruiscono, e il venv importava il core del banco invece di quello installato
o cercava un sigillo locale. Sedici rossi in un giorno, nessuno del prodotto.

Il verso pericoloso e' l'altro e resta il motivo per cui vale la pena: questi
due file sono l'unica cosa che verifica cosa riceve un utente, e un verde che
arriva da un ambiente che nessun utente ha non dimostra niente.

Adesso il default e' l'ambiente ripulito, e il messaggio di errore dice cosa ha
tolto: una variabile rimossa in silenzio e' lo stesso difetto di una ereditata
in silenzio, col segno cambiato. Ripulite anche le due subprocess.run dirette,
cosi' non resta un'eccezione da ricordare.

La duplicazione fra i due file resta, ed e' voluta: un modulo condiviso qui
sarebbe un errore di raccolta sul runner, che ha solo pytest. A tenere allineate
le due copie c'e' un test che le confronta fra loro, insieme al controllo che
riproduce il mondo di prima - con env=None la variabile deve passare, altrimenti
a essere rotto e' il banco e non il rimedio.
2026-08-14 11:25:48 +02:00
Federico f777798a7c Il ripiego del ledger non ha mai girato, e i tag non avevano release page (#64)
Due difetti nello stesso job, tutti e due misurati oggi.

Il primo: quando la protezione rifiuta il push su main, il passo dovrebbe
mettere la voce su un ramo e aprire una PR. Non e' mai successo. Da HEAD
staccato, `HEAD:ledger/1.2.3` non e' risolvibile - il ramo non esiste ancora e
la sorgente e' un commit, quindi git non sa se gli si chiede un ramo o un tag e
rifiuta con "not a full refname". Sotto bash -e il passo muore li', quindi la PR
non veniva nemmeno tentata e nessuna delle due annotazioni veniva stampata. E'
per questo che non e' mai esistito un ramo ledger/* su nessuno dei tre, in
quattro corse rosse su release che erano invece andate a buon fine.

Il secondo: creare la PR richiede anche l'impostazione "Allow GitHub Actions to
create and approve pull requests", che e' spenta su tutti e tre. Il
pull-requests: write del job serve ma non basta. Quindi la PR ora e' best
effort: appena il ramo e' spinto la voce e' salva, e il run non diventa rosso
per una comodita' che un'impostazione puo' togliere. Rosso solo se la voce si
perde davvero, che e' quello che il commento diceva gia' e il codice no.

E la release page: dopo tre tag, quattro versioni su quattro non ce l'avevano, e
le ha trovate un gate DOPO la pubblicazione. Ora la crea il workflow dal tag,
con il corpo preso dal CHANGELOG dove c'e' e generato dove non c'e'. Idempotente:
un tag rispinto o una pagina fatta a mano sono un no-op, non un rosso.

Eseguiti tutti i rami di entrambi i passi contro un remoto che rifiuta il ramo
di default come fa la protezione: push accettato, rifiutato con PR creata,
rifiutato con PR vietata da 403, tutto rifiutato. Il codice vecchio, sullo stesso
banco, riproduce parola per parola l'errore del log di produzione.
2026-08-14 04:24:04 +02:00
Federico 63752e12ec Il badge delle stelle non lo ricalcolava nessuno dal 19 luglio (#63)
Era stato disegnato a mano quando ho tolto shields.io e da allora nessuno
script lo toccava piu': diceva 1.8k con 1886 stelle vere, cioe' mancavano
14 stelle perche' diventasse semplicemente falso sulla prima pagina.

Ora lo genera lo stesso renderer del badge dei lanci, dallo snapshot
giornaliero, e legge dal ramo badges come l'altro. Il ramo serve perche' main
richiede il check gate e un commit diretto dell'API viene rifiutato con 409.
2026-08-14 03:18:27 +02:00
Federico 88e955afe5 Il badge dei lanci si pubblicava su un branch protetto (#62)
Il README mostrava 1,64M mentre il numero vero e' 1,78M. Il badge viene
aggiornato ogni giorno da un'attivita' pianificata che usa l'API dei contenuti,
cioe' fa un commit diretto su main; da quando main richiede il contesto `gate`
con enforce_admins quella chiamata fallisce con

  HTTP 409 - Could not update file: Required status check "gate" is expected.

Il difetto era invisibile perche' la stessa attivita' salva anche il CSV dei
download, e quella parte continuava a funzionare: si vedeva solo come esito 1
nell'Utilita' di pianificazione, e come un badge fermo su un numero vecchio.

Un'automazione non puo' aprire una PR e aspettarne il merge, quindi il badge
adesso vive sul branch `badges`, che non e' protetto. Verificato end to end: la
pubblicazione riesce e l'attivita' esce 0.

Effetto collaterale desiderabile: main non riceve piu' un commit al giorno per un
file che nessuno legge nella storia.
2026-08-14 02:49:12 +02:00
Federico bd6a5f7960 Su Windows GitHub usa PowerShell: shell bash sul job di caccia (#61)
Il primo lancio della caccia su windows-latest e' morto in cinque minuti con un
ParserError di PowerShell sulla riga `if [ "$RUNNER_OS" = "Linux" ]`. GitHub
esegue i blocchi `run:` con pwsh sui runner Windows, non con bash.

La cosa da ricordare non e' il difetto, e' che la verifica non lo aveva visto.
La regola dice di estrarre ogni blocco `run:` dallo YAML ed ESEGUIRLO, e l'avevo
fatto: due giri verdi escono 0, un impiccamento simulato si ferma ed esce 1. Ma
l'avevo eseguito in bash sulla macchina di chi scriveva, cioe' con un interprete
diverso da quello del bersaglio. Eseguire il blocco non basta se lo si esegue con
la shell sbagliata.

`defaults: run: shell: bash` sul job, cosi' entrambi i bracci usano lo stesso
interprete e i blocchi restano quelli gia' provati.
2026-08-13 20:21:43 +02:00
Federico c651f8e286 Il banco di caccia sceglie il sistema operativo (#60)
Sulla macchina di sviluppo i test di interazione producono ritentativi (41 su 17
giri) mentre su Linux non ce n'e' nemmeno uno in 36. Sembrava un difetto di
piattaforma, ma quel confronto e' CONFUSO: i giri Linux stavano su runner
dedicati, quelli Windows su una macchina dove prima girava la suite di chi
misurava e poi e' tornato il proprietario col suo lavoro. Il primo giro
"pulito" e' uscito con 25 processi estranei contro un riferimento di 10.

Un runner Windows dedicato separa piattaforma da contesa senza chiedere a
nessuno di stare fermo sei ore. firefox-launch-matrix.yml dimostra da mesi che
il browser parte sui runner Windows, quindi la strada esiste gia'.

Tre cose per farlo funzionare su entrambi: xvfb condizionato a runner.os ==
'Linux'; le prove sotto prove/ nello spazio di lavoro invece che in RUNNER_TEMP,
che su Windows contiene backslash e non attraversa bash in modo affidabile; e il
prefisso del comando in una variabile, vuota fuori da Linux.

Eseguito, non riletto: il ramo per sistema da xvfb-run su Linux e vuoto su
Windows, e il ciclo intero gira su quel braccio in entrambi gli esiti - due giri
verdi escono 0 con l'avviso, un impiccamento simulato al secondo giro si ferma,
esce 1 e stampa l'ultimo test piu' lo stack.
2026-08-13 19:48:33 +02:00
Federico 1d841b295c Il README non consiglia piu nessun provider di proxy (#59)
Escono le due raccomandazioni sponsorizzate: il blockquote sotto "Still
seeing captchas or anti-bot?" e il paragrafo in coda alla sezione Proxies.
Quello che resta sulle sezioni e' la spiegazione del problema, senza un
nome da cliccare.
2026-08-13 17:11:13 +02:00
Federico 7b912f6729 Il test della sessione lunga riceve la sua scadenza (#58)
Misurato sullo stesso commit: 4,3 secondi su Linux in CI e oltre 300 su Windows,
mentre l'intera suite su Windows e' solo 3 volte piu' lenta. E' il difetto aperto del
layout che non mette in cache i font fra documenti.

Con la globale a 420s una macchina piu' carica lo ucciderebbe, e un test legittimo
ucciso dalla protezione produce un rosso identico all'impiccamento che la protezione
cerca. Il marcatore si toglie quando il difetto si chiude.
2026-08-13 16:48:13 +02:00
Federico 61a15f9d69 Strumenti per debuggare l'impiccamento dell'e2e dove succede, su CI (#57)
Il difetto vive su Linux sotto xvfb e si presenta nel 12% delle corse, quindi gli
strumenti stanno su CI: una caccia sulla macchina di sviluppo gira su Windows e un
negativo li' non direbbe niente di questo ambiente.

Un cane da guardia che a 150s dentro un test scrive lo stack di ogni thread su FILE
(pytest redirige i descrittori a livello di sistema, quindi stderr si perde quando il
processo viene ucciso), l'artifact che lo porta fuori, un passo che dimostra che era
armato, e e2e-hunt.yml che cicla la suite fino a catturare.

Ogni blocco run: e' stato estratto dallo YAML ed eseguito in tutti gli esiti. Cosi' e'
venuto fuori che il controllo del cane da guardia moriva su ogni corsa VERDE, perche'
grep -c che conta zero esce 1 sotto bash -e.
2026-08-13 13:02:18 +02:00
Federico 2770891acd Una scadenza non e' un flake, e va presa con un thread (#56)
Causa dell'impiccamento del job e2e a 40 minuti, due volte. --only-rerun conteneva
`Timeout`, scritto per il TimeoutError di Playwright, e cattura anche
subprocess.TimeoutExpired: misurato, due test producono 4 rerun. I test di
release/upgrade vivono dentro pip install con timeout fino a 300s, quindi uno che
scade costa 900 secondi; la somma dei loro timeout e' 10.050 s, ritentati 30.150,
contro un tetto di 2.400.

Due --rerun-except (TimeoutExpired, `Timeout >`) piu' --timeout 420. Il metodo e'
thread e non il segnale predefinito: misurato, il segnale NON interrompe questo
blocco, perche' l'API sincrona di Playwright attende sul socket del driver e il
gestore non trova mai un confine di bytecode. Validato contro un socket in accept()
che nessuno connette: col thread il test e' nominato e lo stack indica la riga.
2026-08-13 03:34:25 +02:00
Federico 707720b691 L'e2e nomina il test su cui si pianta, e non parte su PR di sola documentazione (#55)
Due impiccamenti, il 4 e il 12 agosto: job ucciso dal timeout di 40 minuti contro
una durata normale di 4:47. Sullo stesso commit il tentativo 2 e' verde in 5, quindi
e' intermittente e non dipende da cio' che si spedisce.

Il log non diceva su quale test, e non era il buffering: PYTHONUNBUFFERED e python -u
c'erano gia' ed entrambe le corse hanno stampato la stessa riga al 50% a 78 secondi.
Era la granularita' di -q, un carattere per test su righe da 72. Con -v sono 144 righe
nominate, verificato sul run di questa PR.

E paths-ignore era su push e non su pull_request, per questo la #54 di sola
documentazione ha bruciato i 40 minuti interi.
2026-08-13 02:49:53 +02:00
Federico 33cebafd84 Via il sito Pages: la wiki e' la superficie che ranka (#54)
Il sito su github.io e' stato eliminato. Sui 313 articoli Google aveva 262 pagine
dalla wiki e 30 da Pages, e le due copie portavano lo stesso testo (95-96% di
sovrapposizione), quindi competevano sulle stesse query.

Se ne vanno il workflow di deploy, la configurazione Jekyll, il file di verifica di
Search Console e i breadcrumb JSON-LD che puntavano a URL ora inesistenti. docs/
resta: e' la sorgente da cui publish-wiki.yml genera la wiki.
2026-08-13 02:30:07 +02:00
feder-cr 93a2df7612 One aggregating gate job, and skipped is not failed
Branch protection here required four contexts, and one of them -
`pytest (windows-latest, py3.11)` - is EXCLUDED by the matrix a few lines
above where it is declared. A required context that no job can produce means
the protection could never be satisfied; with enforce_admins false every push
went through regardless and nobody noticed. Measured 2026-08-13, same shape in
the core and the manager.

A list of matrix names drifts every time the matrix changes, which is exactly
how this happened. This job depends on the whole matrix and its name never
changes.

The part specific to this repo: `unit` is deliberately SKIPPED when
core-on-index reports the pin is not on the index yet - during that window no
install can succeed, and the workflow chose to skip rather than fake green. A
gate demanding `success` would turn that choice into a red on release day, and
the first reaction would be to remove the protection. So it refuses on
`failure` and `cancelled`, never on `skipped`.

The `run:` block was executed against every outcome before pushing.
2026-08-13 01:11:51 +02:00
feder-cr 01d692be2a badge: browser launches at 1.64M 2026-08-12 09:00:06 +02:00
feder-cr 8180b624f1 README: say what the project is in the words people search for
The opening described the project in our own vocabulary. Keyword research put
real numbers on that: headless browser and playwright headless are the terms
with both volume and a reachable SERP, captcha bypass carries most of the
captcha demand, and the project name itself has none. Reword the hook, the
tagline and the two questions to lead with those, naming the challenges people
actually meet. Only the top of the file moves - Google attributes roughly the
first thirty lines to the repo home and the rest to the README blob, so this is
where the words count.
2026-08-12 07:55:40 +02:00
feder-cr 22b53847f0 CHANGELOG: 0.7.0
The gate caught it, not a person: test_the_changelog_documents_every_version
_it_claims_to_cover reads what the index serves and refuses a published
version the file does not mention.
2026-08-11 18:14:39 +02:00
feder-cr 5e5d0f516d Back-fill the 0.7.0 ledger entry the publish run could not commit
Third time today across the three repos, same cause: the upload succeeds,
branch protection declines the workflow's ledger commit, the run reports
failure for a release that shipped. Verified with check --verify-index,
which answers exit 5 - byte-identical to what the index serves.
2026-08-11 18:00:29 +02:00
feder-cr 5ed8dd6ba2 The core pin follows the seal to 19.14.0
firefox-19 is public, the core rolled its seal onto it, and the pin moves
with it. Written by scripts/sync_core_pin.py rather than by hand, which is
what keeps the two spellings - invisible_core== in the file, the hyphenated
one in every comment about it - from drifting into a gate that greps for
the wrong one.
2026-08-11 17:35:21 +02:00
feder-cr 7ca67819c6 The font gate asked a question whose answer could not mean anything
Two defects, one cause. It launched the binary raw, and it inferred "did
this face load" from a number we declare ourselves.

The raw launch used to be fine and stopped being fine when the generic
family map moved out of compiled C++ and into a declaration. An engine
without its declarations does not invent them, by design, so the gate was
measuring engine rule 7 working and calling it a defect. Measured on one
binary: raw on Linux, serif, sans-serif, monospace, cursive and fantasy
all collapse onto Arial and Arial disappears from the family list. The gate
now hands in that one declaration - zoom.stealth.fonts.generics, constant
across seeds - and the generics map to Times New Roman, Arial, Consolas and
Comic Sans on both platforms. It is a copy, and it is the only copy in the
project, so a test binds it to what the core produces and goes red if they
separate.

The .ttc check was unanswerable rather than wrong. It asked "does this
family measure differently from NO font", and the no-font face is itself
one of the bundled families: Microsoft YaHei IS the CJK fallback, proven
at the pixel level. YaHei therefore failed its own check, and so did
MingLiU-ExtB and PMingLiU-ExtB, whose cmaps cover none of the probe
characters - falling back is correct there, read from the font files. It
passed for a year on a coincidence: the fallback's line height was 91 and
theirs 95. Line heights are declared now, the fallback landed on 95, and
the coincidence ended.

What replaces it is structural. Group the families by their measureText
ink box and assert WHICH families share a face, not what the numbers are.
A face that fails to load falls into the fallback group and the grouping
changes, which is the failure the check exists for. The numbers themselves
are deliberately not asserted here: raw on Linux they come back as
FreeType's grid-fitted integers while Windows returns fractions, and they
only agree once the browser has all its declarations - so cross-OS value
parity belongs in a check that runs under the wrapper, not in this one.

Green on three binaries launched exactly the way CI launches them: this
build on Windows, this build on Linux, and the released firefox-18 Linux
asset as a known-good reference. Validated by moving one family between
groups, which turns it red and names both sides of the move. One mutation
SURVIVED and is written into the file rather than hidden: deleting a name
from EXPECTED also deletes it from what gets probed, because a page cannot
enumerate system fonts, only ask name by name.
2026-08-11 12:31:14 +02:00
feder-cr 28b6a2ccd7 Two e2e tests for failures the suite could not see
A session that dies under heavy text shaping, and a frame that reports
its parent's screen origin instead of its own. Neither was reachable by
the existing e2e tests: they open a page, assert one thing and close, so
none of them shapes enough text or lives long enough, and none looks at
geometry from inside a nested frame.

Both were validated by reintroducing the real defect in the engine and
rebuilding, not by reasoning about them. The frame test fails with
"the iframe reports mozInnerScreen (0, 235) instead of (220, 235)" and
only on the axis that was broken, which is what says it measures the
right thing.

The long-session test reads its font families from the profile manifest
rather than a list written here, so a change to the bundle moves the
test with it. Its navigation timeout is large on purpose: this engine
reloads the declared faces on every document, so 30s is a coin flip
rather than a margin, and a timeout would report a dead session for a
browser that was only busy.
2026-08-11 12:15:42 +02:00
feder-cr 5c1e5fdb88 0.7.0: the core pin moves, and one public signature changed
Minor rather than patch, because seed_recaptcha_cookies_sync, its async twin and
build_cookies now take locale= where they took timezone=. Anyone calling them by
keyword has to move, and that is what the bump is for.

The pin goes to invisible_core==18.14.0, which carries the fix for the pref that
killed a second browser context on Windows. A consumer whose pin moved has
changed and has to be published, or it pins a core its users cannot resolve.
2026-08-11 12:15:42 +02:00
feder-cr 98788cbf4a A shipped doc described navigator.buildID as doing the opposite of what it does
The page said "the property returns whatever the binary was actually compiled
from", and built an argument on it. Measured by reading the property from a page
on the real binary: it returns 20181001000000, the fixed constant every release
Firefox reports. Gecko flattens it in Navigator.cpp for any non-system caller
outside a mozilla.org origin - not gated on resistFingerprinting, not gated on
any profile pref.

The correction matters in the direction it was wrong: the doc described this
build as carrying a value nobody else carries, when what it actually does is the
same thing every Firefox does. That is the stronger position and the one the
rest of the page argues for.

Also here: the `or "en-US"` at the CONSENT call site is gone. consent_region_lang
has that fallback in its own body, so pre-empting it meant the core never saw a
falsy locale and its decision never ran - a second place deciding the same fact,
in the same file where a 22-row timezone table was deleted for the same reason
hours earlier.
2026-08-11 12:15:42 +02:00
feder-cr 46c4e43e54 Delete the timezone table the CONSENT cookie used, and derive from the locale
_TZ_TO_REGION mapped 22 IANA zones to a country and a language for the Google
CONSENT cookie. The session locale is resolved in invisible-core from the
egress country against 55 countries. Two tables for one fact, in two
repositories, and they drifted the way two tables do: a Romanian session
reported ro-RO as navigator.language and en+FX in the cookie, because
Europe/Bucharest was not one of the 22. A page that reads both sees a Romanian
browser claiming to be a non-EU English one.

Deleting beats extending here. Deriving from the locale covers every locale the
core can resolve, including the countries nobody has added to a list yet, and
the only finite part left - which countries get their own token rather than FX
- lives in the core as one set.

The old rows still give the same answer (it-IT, de-DE, en-GB, ja-JP). One
deliberate difference: Norway moves from "no" to "nb", because the locale we
declare is nb-NO and the coherence worth having is with our own language.

The new test pins Romania, which is the case the old table got wrong.
Mutation-tested: shrinking the country set to the three the old table really
covered fails exactly that case.

Needs invisible-core on the index first: consent_region_lang is a new name.
2026-08-11 12:15:42 +02:00
feder-cr 2f5f6c7869 Read the window chrome from the profile, and stop asserting the invented value
_CHROME_W = 14 and _CHROME_H = 91 were module constants here. Stock Firefox
151 answers 0 and 85 to the same two subtractions. The declaration lives in
invisible-core now, as Profile.screen.chrome_w / chrome_h, and both viewport
sites read the profile rather than the module.

The test is the part worth reading. test_chrome_offsets_are_positive_ints
asserted _CHROME_W > 0, reasoning that "any zero/negative value would let
viewport bleed past screen bounds". That is false - a viewport exactly as wide
as the screen is inside the bounds, not past them - and the false reasoning is
what kept the invented number alive through every run. It now asserts the
invariant that sentence was reaching for, on a real profile, and lets the
horizontal chrome be zero.

Needs invisible-core on the index first: CHROME_W and CHROME_H are new names
there.
2026-08-11 12:15:42 +02:00
feder-cr d3b514cf4b The font manifest travels as an env var, and the CI list had gone stale
Two leftovers from the manifest handover, committed together because they
are the same change seen from both ends.

build_env carries the manifest. The engine builds its font list during app
startup, inside InitSharedFontListForPlatform, and on this path the prefs
have not reached the profile yet - Playwright sends them over the
connection after the process is up, so a pref cannot work here no matter
how early it is written. The manifest goes as STEALTHFOX_FONT_MANIFEST
pointing at a content-addressed file, verified against the engine's own
face files first, because metrics for a font that is not there are worse
than no metrics.

The CI list had gone stale in the direction that matters. It still named
Arial Black, Franklin Gothic Medium, Segoe Fluent Icons and Segoe MDL2
Assets, which came out of the bundle on 2026-08-07 because a real Windows
Firefox does not expose them as family names to a page - measured against
the retail install with a throwaway profile. 68 now, not 72. It is a
hand-kept copy of the manifest's F| records, the docs already call that a
drift risk, and it was an audit that caught it rather than the gate.
2026-08-11 12:15:42 +02:00
feder-cr d784dbbfba The taskbar was a fourth constant here, at 40, while everyone else said 48
launcher.py carried _TASKBAR_H = 40. invisible_core.constants said 48 and
the engine's compiled floor in nsScreen.cpp said 48, so the default
viewport was derived from one number and screen.availHeight from another.
A page reads both off the same window.

Both use sites now take p.screen.taskbar_px, which is a profile field and
pinnable like anything else. _TASKBAR_H survives only as an alias of the
core's name, because async_api and two tests import it - it resolves to
the same declaration instead of competing with it.

The old test asserted the viewport against _TASKBAR_H, which by
construction could not see any of this: it passed with 40 and with 48
alike. It now asserts against the profile field, and a second test pins
72 and requires the viewport to follow. Mutation-proved - putting
_TASKBAR_H back in the expression fails the pinned case.

Needs invisible-core with TASKBAR_PX on the index before release.
2026-08-11 12:15:41 +02:00
feder-cr c813380366 Six knobs that existed and were documented nowhere
The voices, the fake media devices, the storage booleans, the generic-family
table, the accessibility overrides and the taskbar height all became Profile
fields today and stopped there. An undocumented knob is one nobody uses, and it
gets deleted by whoever next reads the code as dead.
2026-08-11 12:15:41 +02:00
feder-cr 72fb16d728 Nine knobs that existed and were documented nowhere
The screen colour depth, maxTouchPoints and the seven rasterisation parameters
became Profile fields yesterday and stopped there: not in the pin table, not on
this page, so they could be neither pinned nor found. An undocumented knob is
one nobody uses, and it gets deleted by whoever next reads the code as dead.

The test that says so was already written and was already failing.
2026-08-11 12:15:41 +02:00
feder-cr 7361ed08a2 docs: title these pages the way people search for them
The titles led with the project name, which nobody searches for, and left out
the phrase they do type. Keyword research on autocomplete and related searches
put 'playwright stealth' at over a thousand demand points and the project name
at zero. Lead with the subject instead, on the fourteen pages where the gap was
widest. Only the title and H1 move; slugs, URLs and content are untouched.
2026-08-11 12:15:41 +02:00
feder-cr c6c45cd8ff badge: browser launches at 1.56M 2026-08-11 09:00:06 +02:00
feder-cr 06096159b0 badge: browser launches at 1.48M 2026-08-10 09:00:07 +02:00
feder-cr b6c74fca67 badge: browser launches at 1.41M 2026-08-09 09:00:06 +02:00
feder-cr 14050be60b badge: browser launches at 1.34M 2026-08-08 09:00:06 +02:00
feder-cr a5f3356f94 security: serve the detector bundle from a preloaded map, not a built path
The is_relative_to containment check did not satisfy CodeQL's path-injection
query - the tainted request name still flowed into a filesystem path. Preload
the vendored files into a name->bytes dict at server start and serve by exact
key, so no path is ever constructed from the request. Same behaviour, and no
path for a crafted request to traverse.
2026-08-07 12:34:54 +02:00
feder-cr 07a931c3e3 security: clear the six CodeQL findings on main
- firefox-launch-matrix.yml declared no permissions, so its token
  defaulted wide. Add an explicit least-privilege block (contents: read).
- test_webrtc_realness sdp IP regex used (?:\d|\w)+ and (?:\d|\w|.|:)+ -
  overlapping alternatives that backtrack. Same character sets as \w+ and
  [\w.:]+, which match linearly. Behaviour is identical (v4, v6, mDNS).
- test_detectors_e2e's local vendor server built a path from the request.
  .name already dropped any directory part; make containment explicit with
  an is_relative_to check so the path provably cannot escape the vendor dir.
2026-08-07 12:28:24 +02:00
feder-cr e3219d9271 badge: browser launches at 1.29M 2026-08-07 09:00:07 +02:00
feder-cr d55bc06e68 docs: add Search Console verification file for the Pages site
Google Search Console URL-prefix verification token for
https://feder-cr.github.io/invisible_playwright/ - a public verification
handle, not a secret. Served as a static file by Jekyll.
2026-08-07 04:16:07 +02:00
feder-cr 062fea1d0a ci: trim the heaviest matrices to stop saturating the runner queue
A burst of pushes was queuing more jobs than the account can run at once,
so runs sat pending and got cancelled. Cut the redundant load:
- tests runs the full Python range on ubuntu but only 3.12 on Windows
  (8 jobs down to 5; the scarce Windows runners drop from 4 to 1). This is
  a pure-Python package, so the OS matrix does not need every version twice.
- firefox-launch-matrix, a firefox.exe-launches smoke test, runs one Python
  across the three Windows versions instead of three (9 jobs down to 3).
- user-install moves from a daily to a weekly cron.
No test coverage of behaviour is dropped; only duplicate OS/Python cells are.
2026-08-06 22:22:44 +02:00
feder-cr 0e026eb7f5 ci: cancel superseded tests/e2e runs cleanly with a concurrency group
A burst of pushes left older tests and e2e runs with their queued jobs
cancelled one at a time, which marked the whole run failed even though no
test had failed. Give each workflow a concurrency group keyed by workflow
and ref so a newer push cancels the older in-flight run as a unit; tests
and e2e keep separate groups so they never cancel each other.
2026-08-06 21:34:36 +02:00
feder-cr 0fea48789e ci: build and deploy Pages via Actions instead of the legacy branch builder
The legacy Pages builder started hanging in the building state for this
repo and never finished, so every deploy timed out while the site stayed
on an older build. The Jekyll build itself is fine, so this builds the
docs/ site in Actions and publishes the artifact directly, and Pages is
switched to the workflow build source.
2026-08-06 19:47:24 +02:00
feder-cr e61a60d9ee docs: a playbook pass over the final block of articles
Last block of the review (articles 201-301 alphabetically), completing a
full pass over the site: tightened each section's opening answer, kept the
FAQ and see-also blocks, and linked the primary source (Playwright docs,
MDN, a spec, or the relevant RFC) where a claim rests on one. Eleven pages
were already in good shape and were left untouched. No claim was changed.
2026-08-06 16:10:11 +02:00
feder-cr 6d21f5ffe8 docs: a playbook pass over the next 100 articles
Second block of the review (articles 101-200 alphabetically): tightened
the opening answer of each section, kept the FAQ and see-also blocks in
place, and linked the primary source (Playwright docs, MDN, a spec, the
relevant RFC, or the Python docs) where a claim rests on one. Nine pages
were already in good shape and were left untouched. No claim was changed.
2026-08-06 15:01:35 +02:00
feder-cr 532dd36a79 docs: a playbook pass over the first 100 articles
Went through the first hundred articles against the site's writing guide:
tightened the opening answer of each section so it reads on its own,
made sure the FAQ block and a see-also line are present, and linked the
primary source (MDN, a spec, the relevant RFC, or Playwright's docs)
where a claim rests on one. Eight pages were already in good shape and
were left untouched. No technical claim was changed.
2026-08-06 10:37:47 +02:00
feder-cr 5499a17fcf docs: cite the primary source next to API and protocol claims
Pages that describe a specific web API, spec, or network protocol now
link the authoritative reference (MDN, the WHATWG/W3C spec, the relevant
RFC, or Playwright's docs) inline at the first mention of the claim.
Pages resting on our own measurements are left as they are - no citation
was added where there is no external source behind the statement.
2026-08-06 10:00:16 +02:00
feder-cr d1c2a0fc56 docs: trim the over-long meta descriptions to a length that shows in full
72 pages had a description past ~175 characters, which search engines cut
off mid-sentence in the result snippet. Shorten each to about 150-160,
keyword first, keeping the same meaning. Only the description front matter
changes; titles and bodies are untouched.
2026-08-06 09:48:24 +02:00
feder-cr f2cd7e5424 badge: browser launches at 1.25M 2026-08-06 09:00:07 +02:00
feder-cr dcf56a9b41 guides: turn the category pages into real hubs that link their sections
Each guide landing page listed its topic but linked almost none of the
pages under it, so most articles had no internal link pointing in. Give
every category page a grouped, glossed index of the pages it covers, so a
reader on the hub can reach each one and each page gets an inbound link
from its section. No article bodies change, only the ten landing pages.
2026-08-06 04:01:28 +02:00
feder-cr 62c5649f99 pinning: write the storage-quota formula in ASCII
The quota row showed 1024 with a Unicode superscript two; render it as
1024**2 so the docs page stays plain ASCII like the rest of the table.
2026-08-06 03:37:34 +02:00
feder-cr 489d4f44b3 the wiki converter reads subdirectories, and the links into them
docs/ grew an integrations/ directory with nine pages. The converter listed
only the flat level, so all nine were missing from the wiki AND every link into
them pointed at a page that did not exist: nine dead links across eight pages,
invisible because the pages carrying them rendered perfectly.

A wiki has no directories, so a subdirectory page takes its own slug and a
directory's index takes the directory's name, which is also what a ](dir/) link
needs to land on. Two pages wanting the same flat name is now a refusal rather
than one silently overwriting the other; the case was run and it refuses.

324 pages out, zero unresolved links, against 315 and nine before.
2026-08-06 03:23:01 +02:00
feder-cr 3fcea64f9f document the download deadline, with the number checked against the seal
INVISIBLE_DOWNLOAD_DEADLINE shipped in invisible-core 18.13.0 and appeared in
no user-facing page, so the one way out of a slow-link refusal was reading the
source. The first draft of this section said the engine is about 110 MB and
that the default covers 60 KB/s; the seal says 217 to 238 MB depending on
platform, and the installation page has said ~238 MB all along. A figure that
contradicts the page next to it is worse than no figure.
2026-08-06 03:14:20 +02:00
feder-cr b70947992f the ledger goes to a pull request when protection declines the push
Every publish run on all three repos ended in failure yesterday, on releases
that had already shipped, at the step committing PUBLISHED.json back to main.
It is not a misconfiguration: the required contexts are correct and the matrix
produces them. It is inherent. A required status check cannot have passed on a
commit that does not exist yet, and this token has no bypass where a maintainer
push does, so the direct push can never succeed while main requires checks.

Adding a long-lived PAT would put a credential back into the one job holding
the OIDC one, which is what trusted publishing was adopted to remove. So the
push is tried, and when declined the entry goes to a ledger/<version> branch
and a pull request. Green when the entry is preserved, red only when it is
lost: a red run on a release that shipped is the misreading this replaces.

All three branches were executed, not read: a bare remote with a pre-receive
hook declining refs/heads/main and a stubbed curl. Push succeeds -> notice,
exit 0, no branch. Push declined, PR opens -> error annotation naming the
branch, exit 0. PR also fails -> exit 1.
2026-08-06 02:31:47 +02:00
feder-cr c53f15d9ec docs: SEO/GEO optimization pass over the final 58 older pages
Completes the answer-first optimization pass across the remaining older pages (meta descriptions in range, direct self-contained answers per section, comparison tables where apt, and - applying the methodology's cite-your-sources lever - descriptive-anchor internal links plus a handful of authoritative external citations to RFCs, MDN, the WHATWG DOM spec, Khronos and Playwright's own docs). Conservative: no fabrication, technical claims and honest caveats preserved, no keyword stuffing, one internal symbol and any residual pool detail generalised. With this, every existing page has now had the pass or was written to the methodology.
2026-08-06 01:33:12 +02:00
feder-cr 682983f393 docs: SEO/GEO optimization pass over 120 more existing pages
Extends the answer-first optimization pass (tightened meta descriptions, direct self-contained answers per section, comparison tables where apt, descriptive-anchor internal links) across 120 more of the older pages. Conservative: no new factual claims invented, technical claims and honest caveats preserved, no keyword stuffing, and a couple of pre-existing internal-detail mentions were generalised. The remaining older pages were left for a later pass.
2026-08-06 00:13:14 +02:00
feder-cr fa6cd61648 docs: 55 more guides - AI agents, Playwright APIs, detection surfaces, proxies, comparisons
Adds an AI-agent cluster (computer-use vs DOM agents, MCP browser server, per-seed reproducible and parallel agent identities, the agent timing signal, running headless on a server, persistent sessions, and honest fit notes for smolagents/Stagehand), a Playwright API set (page.route interception and mocking, HAR record/replay, tracing, video, storage_state, cookies, geolocation/permissions per context, http_credentials, context isolation, drag_to, resource blocking, waiting on a response), detection-surface explainers (WebGPU, color-gamut/HDR, Battery, Network Information, Gamepad, sensors, keystroke and mouse-dynamics biometrics, scrollbar width, storage quota), network/proxy topics (residential vs datacenter vs mobile, sticky vs rotating, DNS/DoH leaks, HTTP/3 QUIC, ASN reputation, IPv6, proxy chaining), and comparisons/migrations (Selenium and Puppeteer to Playwright, HTTP client vs browser, and several open-source tools). Every page answers honestly with a real usage example and the caveat that a real-looking browser does not fix IP, quotas, rate limits or behaviour.
2026-08-05 23:44:12 +02:00
feder-cr 48c47a1083 docs: an SEO and GEO pass over ten of the most-linked pages
Applies the answer-first structure across ten pillar and high-intent pages: tightens each meta description into the snippet range, front-loads a direct self-contained answer in the intro and per section (so an AI answer engine can quote a passage in isolation), adds comparison tables where the topic is comparative, and adds descriptive-anchor internal links to existing pages. No new factual claims were invented; a few figures were pulled in from sibling pages that already state them, and one page's description of how fingerprints are generated was generalised. Voice, technical claims and honest caveats are unchanged.
2026-08-05 23:40:20 +02:00
feder-cr 115666fb0b ci: mirror the docs site to the wiki on each release
Adds scripts/build_wiki.py, which renders docs/ into a GitHub wiki checkout (strips the Jekyll front matter, rewrites internal links to the wiki's extensionless form, names each page by its slug with index.md becoming Home.md, and regenerates _Sidebar.md from the parent and nav_order tree), and .github/workflows/publish-wiki.yml, which runs it on a published release or a manual dispatch and pushes the result to the wiki repo. Also generalises two older pages that described the fingerprint generator in more internal detail than the rest of the set.
2026-08-05 21:52:29 +02:00
feder-cr 39a5b4c55d docs: 55 scraping how-tos by category, data type, and technique
Extends the Scraping with Playwright cluster with category guides (real estate, jobs, e-commerce, prices, hotels, flights, classifieds, cars, rentals, reviews, news, directories, events, restaurants, finance, social, forums, images, video, maps, sports, crypto, deals), data-output guides (CSV, JSON Lines, SQLite, Excel, JSON-LD, Open Graph, links, RSS, images, article text, DataFrame, sitemap), and techniques (search forms, map search, autocomplete, date pickers, list-to-detail crawl, lazy images, canvas charts, wizard flows, resume, incremental, 403/429 backoff, load-more, nested pagination, SPA history). Each names the category's real structural challenge and pairs it with an honest stealth caveat.
2026-08-05 20:13:50 +02:00
feder-cr f3b300b43a docs: 53 detection answers, integrations, and tool comparisons
Adds informational answers to the questions people actually search (how do websites detect bots, what is a browser fingerprint, does a VPN stop fingerprinting, can a website detect a VM or a datacenter IP, is changing the user agent enough), the Playwright-specific versions of the same (is Playwright detectable, does it set navigator.webdriver, does it change my fingerprint), a set of integration how-tos (with BeautifulSoup, pytest, asyncio, GitHub Actions, Celery, cron, Xvfb, Airflow, httpx, FastAPI, Jupyter, and an LLM agent), three more fingerprint-surface explainers, and six tool comparisons checked against each project at source. Every page answers honestly, with a real usage example and the caveat that a real-looking browser still does not fix IP reputation, quotas, or behaviour.
2026-08-05 19:52:13 +02:00
feder-cr bfc8144bf9 record 0.6.1 as published
The workflow could not: branch protection declines the Actions token, so the
step that commits the ledger back was refused after a successful upload.
Corroborated against the wheel the index serves, all 28 files matching.
2026-08-05 16:10:13 +02:00
feder-cr e2deaa5059 0.6.1: pin invisible-core 18.13.0
Carries the wall-clock bound on the engine download. Nothing in this package
changes behaviour, which is why it is a patch.
2026-08-05 15:56:02 +02:00
feder-cr 713d501b3a README: the divider is the border line, not the 4px bar
`---` renders as GitHub's hr, which is .25em of solid colour and reads as a
slab. An empty h2 gets the same 1px border GitHub draws under a heading, which
is the line the rest of the page already uses. Inline CSS is not an option
here: the sanitiser strips the style attribute and returns a bare <hr>.
2026-08-05 15:21:54 +02:00
feder-cr 75f407b124 docs: 55 more guides, from navigator tells to scraping how-tos
Expands the guides across every group: browser-identity properties (buildID, platform/oscpu, vendor/productSub, Accept-Language, devicePixelRatio, maxTouchPoints), render surfaces (emoji, font width probing, shader precision, audio sample rate), network and WebRTC (SOCKS5 vs HTTP, IPv6 leak, HTTP/2, TLS-vs-UA, about:webrtc, offline geo), the automation layer (new_page vs new_context, TargetClosedError, dialogs, downloads, uploads, connect_over_cdp, mobile emulation, isTrusted), a set of practical scraping how-tos (pagination, downloads, uploads, cookie banners, popups, screenshots, PDF, waiting, retries, parallel, rate limiting, tables, iframes, shadow DOM, XHR capture, geotargeting), detector explainers, and comparisons verified against each project at source. Each carries a real measurement or mechanism from the notes, not a generic recipe.
2026-08-05 15:14:49 +02:00
feder-cr f3e54a6bbe README: a rule under the Telegram block
Without it the invitation and the first line of the project ran together as one
column of centered text. The rule makes it read as its own thing above the fold.
2026-08-05 13:56:45 +02:00
feder-cr 5a8ef19726 docs: a scraping how-to cluster, from blocked to behind a login
Adds a Scraping with Playwright guide group and eight practical pages: why a scrape gets blocked and in what order to check, headless machine tells, infinite scroll, proxy rotation with a matching exit, sessions behind a login, running in Docker undetected, using the package in Docker, and avoiding bot detection. Each one uses the real two-line launch and carries a specific mistake we measured rather than a generic recipe.
2026-08-05 03:16:18 +02:00
feder-cr 60b3111340 README: badges at the bottom, not above the fold
They are status, not an argument for reading on, and six of them ahead of the
first line of prose is a lot of pixels spent saying nothing new. They sit under
the footer now, where somebody who wants to check the build can still find them.
2026-08-05 03:00:53 +02:00
feder-cr 3193b819ae README: a Telegram header that asks something
It was a badge with a caption under it, which reads as decoration and gets
scrolled past. Now the first thing on the page names the problems people
actually arrive with, then says where to ask, then gives a button to press.

The banner carried about 180px of empty margin it was paying for in vertical
space, so it is cropped to the artwork.
2026-08-05 02:27:19 +02:00
feder-cr 9d9b584324 readme: say what the group is for, not just that it exists
"join the group" tells nobody why they would. The button now says join the
community and carries one line under it naming what gets asked there: proxies,
fingerprints, captchas, and getting more out of the package the reader is
already looking at.

The line is tailored per repository, because "getting more out of
invisible-playwright" is not what somebody reading the profile manager wants to
hear.
2026-08-05 01:57:54 +02:00
feder-cr 20210fddec readme: the group button first, above everything
It went into the badge row, which is not the top: it is the seventh thing in a
line people skim. Now it is the first element of the file, centred, above the
title and above the other badges.
2026-08-05 01:23:03 +02:00
feder-cr b64f800095 readme: the Telegram group as a badge, not a paragraph
Three lines of prose became one button in the header row, next to the others.
A link people have to read past is not an invitation; a button in the badge row is
where anyone already looks.

The SVG is committed here rather than pulled from shields.io, which is the same
choice every other badge in these repos already makes: nothing in the header
depends on a third-party service being up, and the file is the one this repo
serves.
2026-08-05 01:21:41 +02:00
feder-cr 00441aba97 the e2e step printed nothing for 39 minutes, then the timeout killed it
Not a nicety. Python block-buffers stdout when it is a pipe, so
`xvfb-run -a python scripts/run_e2e.py` produced ZERO output between the step
starting and the 40-minute timeout cancelling it on 2026-08-04. A run with no
verdict and no way to tell where the time went, which is the same shape this
repository keeps paying for: a job whose silence is indistinguishable from
progress.

PYTHONUNBUFFERED is set on the step rather than only passing -u, because the
output that matters comes from the pytest subprocess run_e2e.py spawns, and the
variable is inherited while the flag is not.

This does not explain WHY the run exceeded 40 minutes. It makes the next one able
to say.
2026-08-05 00:55:10 +02:00
feder-cr 8ad766a1a3 a removed flag lived on in the one test that actually runs the CLI
`test_release_e2e.py` still called `fetch --force` three days after `--force`
went with four of the six subcommands in 0.5.0. Every run of that file exited 2
on "unrecognized arguments", and the default suite stayed green the whole time
because the test is e2e-marked and therefore deselected. One stale argument, and
three red workflows: `e2e` on main, and `user-install` on two release tags.

Nothing is lost by dropping it. `fetch` verifies every cached tree against the
seal on every run, which is what --force was for, and the test builds a fresh
venv with an isolated cache root, so there is no warm tree to force past. The
rest of that run was green: 138 passed, which is also the first full e2e this
package has had since new_page started applying the profile's context.

A guard already forbade `--force` in the engine-mismatch MESSAGE. It checked what
the package tells a user to run and never what the tests themselves run, so the
flag survived in the one place that executes it. The new gate validates every
`-m invisible_playwright` invocation in the suite against the real parser, rather
than against a list of removed names that the person who forgot the call site
would also have to maintain.

It took two corrections before it worked, both of them shapes this repository has
recorded before: it flagged its own explanatory comment, and it treated `--help`
as a defect because argparse exits for that too. Exit code 0 is help, 2 is a
parse error, and only the second is a bug.

README: the third-party ad banner is gone and there is a link to the Telegram
group instead. Promotional text in a README has to be related to the project
being hosted, which an ad network is not and a group about this work is.
2026-08-05 00:04:50 +02:00
feder-cr 097671495e the job holding the credential stops installing what it does not need
The upload job carries the OIDC token and `contents: write`, which is the widest
permission set in these repositories: it can push to the default branch. It was
installing the dev extra, which pulls pytest, ruff and - in the wrapper - the
whole of Playwright, into exactly that job.

`record` needs the package importable and a build backend. Verified by running it
with `-e . build hatchling` and nothing else: same eight-field entry, same
digests. So that is what it installs.

Nothing about this was broken. It is the surface of the one job worth keeping
small, and it was large because the step was written by copying the line above
it.
2026-08-02 05:01:26 +02:00
feder-cr b096a9db6b the release walk gains its fourth record, the ledger
The index, the tag, the GitHub release and PUBLISHED.json are four independent
statements about one event, and today each of them was wrong about a different
subset: eleven versions had no release, eight had no tag, one tag sat on a commit
building a different version, two versions were missing from the ledger entirely
and twenty-one entries were missing a field.

Every one of those was found by looking at a single pair, one at a time, over
several hours. The walk now checks all of it in one pass.

The ledger dimension costs no API call - it is a file in this repository. The
publish gate compares it to the index too, but only on a release, so a version
published outside the gate stays invisible until the NEXT release is refused by
it. That is precisely how the 2026-08-02 gap surfaced: a tag push refused for a
reason nobody was looking for. Here it surfaces on every run of the install job.

Mutation: an entry deleted from the ledger. Caught, by version, with the
back-fill rule in the failure message - from the artifacts the index serves,
never from the tree.
2026-08-02 04:43:40 +02:00
feder-cr b61f82ef52 fill requires_dist on the entries recorded before it was written
The recorder omitted it until today while the hand-written back-fills included
it, so nine entries of fourteen could say which core that version asked for and
five could not. Read from the wheel the index serves, with the gate's own reader.

The chain is now readable end to end: 0.4.6 -> core 18.6.0, 0.4.7 -> 18.8.0,
0.4.8 -> 18.9.0, 0.4.9 and 0.5.0 -> 18.11.0, 0.6.0 -> 18.12.0.
2026-08-02 04:41:26 +02:00
feder-cr 8357ed7077 record what was published, and commit it back
The manager's first OIDC upload shipped 0.3.1 and wrote no ledger entry: the
upload goes through pypa/gh-action-pypi-publish, which does the token exchange,
while the thing that writes PUBLISHED.json is invisible_core.release. This
workflow has the same shape and would have done the same on its first release.

record after the upload rather than publish instead of it - the action holds the
credential, and twine cannot do the OIDC exchange itself. Recording the tree is
correct in that job and only there: it is checked out at the tag.
2026-08-02 04:19:16 +02:00
feder-cr 9ed0e035b3 the gate armed the hooks before installing what arming imports
Third real defect this workflow has surfaced by running, and all three were
ordering or wiring that only a run can show:

  1. the pin grep looked for `invisible-core==` while both pyprojects write
     `invisible_core==`, so it exited 1 on a correct file;
  2. it ran the suite in a clone whose hooks it never armed, and the suite
     asserts they are armed;
  3. and the arming step went in BEFORE the install, so `install_hooks.py` - which
     imports invisible_core - died on ModuleNotFoundError.

The install is its own step now, in the order ci.yml has had all along: install,
arm, suite. This file simply had never executed, because every tag before it named
a version the index already served and `already-published` short-circuited both
downstream jobs.

That is the fourth workflow in two days found broken at its first real execution
while looking green. The shape is always the same: a job that no-ops is
indistinguishable from a job that passes.
2026-08-02 04:09:10 +02:00
feder-cr 9facf961f5 the publish gate ran the suite in a clone whose hooks it never armed
`test_the_hooks_are_armed_in_this_clone` asserts core.hooksPath is set. A fresh
checkout has none, ci.yml arms them with `install_hooks.py`, and publish.yml did
not - so the gate job went red on that one test while every other workflow in the
repository was green.

Found by running it. This workflow had never executed its gate: the tags before
it named versions the index already served, so `already-published` short-circuited
and both downstream jobs were skipped.

It is also the same defect the 0.4.8 changelog records, three days later and one
workflow over: "only the core workflow ran install_hooks.py, so both consumers
went red on it". A rule that lives in one file gets re-broken in the next one,
which is the argument for the step carrying its reason rather than just its
command.
2026-08-02 04:00:51 +02:00
feder-cr 6c4d431ce9 record the hand-published version in the ledger, from what the index serves
The gate refuses a release when the index carries a version the ledger does not:
"those were published outside this gate, so there is no record of what shipped
under them and a re-release with different bytes would go unnoticed."

That is what today produced. Trusted publishing was not registered yet, so 0.6.0
and 0.3.0 went out through twine by hand, and the path that writes the ledger
never ran for them. The gap was invisible until a tag push hit the gate and was
refused - which is the machinery working, not failing.

The entry is rebuilt from the ARTIFACTS PYPI ACTUALLY SERVES: both files
downloaded and digested with the gate own functions. Not from today tree, which
has moved on - a record saying "this is what shipped" about bytes nobody received
is worse than the gap, because the gap is visible and the lie is not. There is
precedent in this same file: the 0.2.0 entry carries the same note from the
2026-07-25 backfill.

The first attempt wrote four of the nine fields and the gate refused it by name:
"released[8] has no wheel_filename ... it is the only thing in the entry that
corroborates the version string". seal_tag and requires_dist are read out of the
wheel too, so they come from the published wheel rather than from the tree.
2026-08-02 03:52:21 +02:00
feder-cr e4ca2b5027 docs: the pages that describe a CLI, an API and a proxy that all changed
Every proxy example on the site used `socks5://...` with no port. Since
invisible-core 18.12.0 that is refused with a ValueError instead of launching
unproxied, so the examples would now raise: they carry a real port.

The pinning page offered `fonts` and `locale` as things to pin. Neither is a
profile field and both raise `pin key ... is not valid`, so the page was handing
readers two errors. Replaced with fields that exist.

The integration pages that named removed subcommands are corrected. Two that had
their "written against 0.4.6" line bumped to 0.6.0 by the pass are back at 0.4.6:
nobody re-ran those integrations today, and a version banner nobody made good on
is the same defect in a smaller frame.

The scrapy page said `socks5://` works on both routes. It does not. Playwright's
own proxy option reaches Firefox as a browser-level proxy whose filter answers
with host and port only - the credentials it carries are for an HTTP 407
challenge, while the SOCKS handshake reads its credentials from the proxy prefs,
which only this package's own proxy argument writes. Authenticated SOCKS works on
route one and cannot work on route two, and the page now says so.
2026-08-02 02:43:29 +02:00
feder-cr d7bcb56af3 the changelog stopped four releases ago, and nothing was checking
It sat at [0.4.7] while 0.4.8, 0.4.9, 0.5.0 and 0.6.0 were on the index. 0.5.0 is
the release that cut the CLI from six commands to two, the most breaking change
this package has shipped, and a reader upgrading across it had nothing to read.

Six entries added, reconstructed from the git log rather than from memory. Two of
them - 0.3.6 and 0.4.1 - were found by the gate below, not by the reconstruction:
somebody filling gaps by hand fills the recent ones.

The gate is bounded from BELOW by the file itself. This changelog does not reach
back to the first release and does not need to; what it must not do is stop short
of the present. Every version on the index at or above the oldest documented one
needs a heading, no heading may name a version above the first published one that
the index has never served, and the dates are compared against PyPI's upload
because a date written by the person writing the entry is a small lie a reader
can check.

Its first run found three real things and one defect of its own: it flagged
fifteen pre-PyPI versions as invented. Those nine releases existed on GitHub
before this package went to the index and their entries are history, so the rule
now applies only above the first published version. The three real ones: 0.3.6
and 0.4.1 undocumented, and 0.3.5 dated a day before its upload.

Mutation: the 0.5.0 entry deleted. Caught, by name.
2026-08-02 02:01:22 +02:00
feder-cr 0bba55987d every published version needs a release, not just the latest one
The test that guards it read `info.version` - the LATEST - so the moment a
release went out without its page, the next release hid the omission: the check
moved on and the old gap stayed behind it. Its own docstring said "every version"
from the first line while the code checked one, which is the third time in two
days that a claim written beside the code turned out not to be the code.

Measured 2026-08-02: ELEVEN published versions across the three packages had no
release page and EIGHT had no tag at all, three of them published after the
backfill this test exists to protect. All 36 are backfilled now.

The walk found two things a one-call check could not:

  * invisible-playwright 0.4.4 was uploaded from an UNCOMMITTED working tree.
    PyPI records the upload 8 minutes before the only commit that carries that
    version, and the guard it was meant to ship did not make it into the
    artifact. The next release message says so: "0.4.5 - 0.4.4 shipped without
    the import guard and cannot be corrected";
  * its tag pointed at the commit that builds 0.4.5.

Two mutations, both of which changed the code:

  * deleting an OLD release passed. A rate-limit 403 two versions later hit an
    unconditional `pytest.skip`, throwing away the violation already in hand. A
    gate that discards its own findings on an unrelated error is worse than no
    gate, because it reports PASS. It now fails with what it found and skips
    only when it found nothing;
  * unauthenticated, with the limit already spent, it skipped on the FIRST call
    while saying "all clean so far" - green because it never ran, the shape this
    project met three times in two days. That skip now says NONE were checked,
    and CI passes GITHUB_TOKEN so the walk is authenticated: 60 calls an hour per
    runner IP does not cover one call per version across three repositories.
2026-08-02 01:56:35 +02:00
feder-cr a8cbe9be6c the publish gate looked for the pin by the spelling used in the comments
`invisible[-_]core==`, both separators. PEP 503 normalises the two to the same
project, and this pyproject writes the dependency with the UNDERSCORE while every
comment about it uses the hyphen. The gate was written against the prose, so the
grep matched nothing and the step exited 1 on a perfectly correct file - it would
have refused every release, for a reason that had nothing to do with the release.

Found by RUNNING it. Three workflows in two days turned out to be broken at their
first real execution while looking fine: a step reading a version out of a
pyproject that declares it dynamic, a job that had only ever been skipped, and
now this. So each step of this file was extracted from the YAML and executed
against the working tree, with mutations: a pin naming an unpublished version
(refused, 404), the pin removed entirely (refused), a tag not matching the
version (refused), and the correct state (allowed).
2026-08-02 01:10:24 +02:00
feder-cr 01c2512771 0.6.0
browser.new_page() now gives the page the same context as browser.new_context():
the profile's viewport, screen, DPR, colour scheme, locale and timezone. It did
not, because Playwright's new_page forwards to the implementation object, whose
own new_page calls new_context on ITSELF, so the wrapper installed on the api
object was never consulted. Measured in a browser with one seed: innerWidth 1280,
Playwright's stock viewport, against a fingerprint reporting screenWidth 1920 -
and a dark-pinned profile came back light.

That is a behaviour change on the call this package's README, class docstring and
every example use, which is why this is a minor bump and not a patch. A page from
new_page() is now the size the fingerprint says it is.

build_prefs takes the core's single prefs composition, so the three entry points
that used to stack layers in their own order now agree, with the difference
asserted as an exact set.

Also: the engine-mismatch message no longer tells you to run a flag that was
removed, eight dead imports are gone, four tests marked unit stopped making real
network calls and waiting out a ten-second deadline, and CI runs 3.11 through
3.14 on both platforms.
2026-08-02 00:11:40 +02:00
feder-cr eee4bd9fed build_prefs takes the core's composition, and the pin moves with it
The third of the three places that stacked layers on top of
translate_profile_to_prefs in its own order. The core composes it now; what stays
here is this path's delivery and its two decisions - the cloak, which only
Windows and macOS need, and which generator draws the pointer path.

max_seconds_for is applied HERE rather than passing humanize through, and the
test that pins it says why: humanize=0 with the binary engine selected is a cap
of nothing, not a request to disable motion, and passing it straight to the core
would make it falsy and switch the generator off. That is a different browser,
and it is the kind of edge a delegation quietly changes.

Four tests, one of them the wrapper's arm of the comparison the core added: the
same seed through build_prefs and through get_default_stealth_prefs must produce
the same prefs, with the allowed difference asserted as an exact set. It lives
here because this package pins invisible-core== exactly and the core's suite
cannot import a consumer.

Mutations: humanize passed through unmapped, and the cloak applied
unconditionally. One test each.
2026-08-01 23:09:04 +02:00
feder-cr 08cc7a90c6 publish from a tag through OIDC, and run 3.13 and 3.14
Uploaded by hand until now, from one machine, with a long-lived PyPI token on
it. The credential is the pypi environment's OIDC trust relationship now, minted
per run, and the upload job is behind a gate that checks three things a person
had to remember: the tag names the version being built, the invisible-core== pin
is already on the index, and the suite passes - a tag push does not trigger the
ordinary test workflow, so without that last one tagging is a way to publish code
no job has run.

The matrix covers every version requires-python promises. 3.13 and 3.14 have
never run here.

Before the first run this needs a GitHub publisher registered on PyPI (owner
feder-cr, repo invisible_playwright, workflow publish.yml, environment pypi).
Until then the upload fails with invalid-publisher, which is the correct failure.
2026-08-01 22:21:45 +02:00
feder-cr c735a975b3 dead imports, a message naming a removed flag, and four unit tests doing real work
Eight imports in launcher.py and async_api.py were unused. The ninth,
IANA_TO_POSIX_TZ in _session.py, is not: the import IS a probe that turns an old
core into a message about a version instead of a message about a symbol. It gets
a noqa with the reason, not a deletion.

_engine.py told a user with an engine mismatch to run `fetch --force`, three days
after that flag was removed with four of the six subcommands. A test pinned the
old string, so both were wrong together. The test now requires the fix line to
name a command the CLI actually has and no flag at all, which is a check the
string could not fail on its own.

Four tests marked unit drove __enter__ with Playwright mocked and made two real
network calls each - the geo lookup and the locale lookup, the second imported
inside the function, so patching the launcher's namespace does nothing for it -
then sat out the lifetime guard's full 10s deadline waiting for a browser tree
that a MagicMock never produces. 45.6s -> 0.34s for that file.

utcfromtimestamp returns a naive datetime and is deprecated since 3.12, which
matters now that the CI matrix is about to reach 3.14.

pytest-mock and responses were declared and never used by any test in this
package. ruff was NOT declared and CI pip-installed it unpinned on every run: the
tool that gates every push could change under us between two pushes. It is in the
dev extra now, in all three, and CI uses that one.

The suite-boundaries docstring said ten shims and named two modules that are not
shims by its own derivation, three lines below it.
2026-08-01 22:10:00 +02:00
feder-cr 060914971d browser.new_page() opened a page with the stock viewport, not the profile's
The wrapper installs the profile's viewport, screen, DPR, colour scheme, locale
and timezone as defaults on browser.new_context. new_page never went through it.

Playwright's Browser.new_page forwards to the IMPLEMENTATION object, and the
impl's own new_page does `context = await self.new_context(**params)` - itself,
the impl - so a wrapper installed on the api object is never consulted. Read on
the installed Playwright and then measured in a browser: with the seed the e2e
uses, new_page gave the page innerWidth 1280, Playwright's stock viewport,
against a fingerprint reporting screenWidth 1920, while new_context gave 1906.
A dark-pinned profile came back light on the same path.

new_page is the call in the README, in the class docstring and in every example
this package ships. A viewport that contradicts screen.width is not a missing
feature, it is the kind of internal inconsistency the package exists to remove.

Both APIs, because they have drifted apart before. Written through the public
new_page rather than by reaching into the impl, so Playwright's own ownership
wiring - closing the page closes the context it owns - stays intact instead of
being reimplemented against private attributes. The about:newtab settle applies
to this tab too: it is the same race, and a caller doing `page =
browser.new_page()` goes straight to goto(). That 0.4 is now one named constant
shared by both APIs.

Four unit tests and one e2e. The unit tests fail with the patch removed (three of
four); the e2e fails in a real browser with the exact 1280-vs-1906 difference,
which is what turns this from a reading of Playwright's source into a measurement.
2026-08-01 21:45:33 +02:00
feder-cr d737cf7d68 ruff: select F601 beside F821 and F811
A dict literal with a repeated key silently keeps only the last one and Python
does not warn. It cost an hour in the core, where a contract row added under a
key that recurred later in the same literal was discarded without a word while
the test it was meant to satisfy kept failing and naming that very entry. Zero
violations in the three repos when it went in.
2026-08-01 21:22:46 +02:00
feder-cr 6d6b45c112 badge: browser launches at 1.16M 2026-08-01 20:08:38 +02:00
feder-cr 3bfeb9535f badge: browser launches at 1.16M 2026-08-01 19:56:34 +02:00
feder-cr 9e7be64592 ledger: 0.5.0 2026-08-01 19:36:40 +02:00
feder-cr 0477dcdf3c release: 0.5.0 - six commands become two, and fetch does the checking
The CLI was fetch, fetch --force, path, version, clear-cache and doctor. Every
one of them was a step somebody had to know to take, in a package whose whole
promise is that the browser handles itself. None of the behaviour is gone.

doctor now runs inside fetch, on every run, before the download rather than
after. That ordering is the point: a cached tree that no longer matches the seal
is the case worth catching, and it is invisible to a "download if missing" that
only looks at whether a file exists. It was the thing most worth doing and the
thing least likely to be typed, which is the worst combination a subcommand can
have.

--force is unnecessary once every run verifies: a tree is replaced because it
does not match the seal, not because a flag was passed.

path is the last line of fetch's stdout, so `$(invisible-playwright fetch)` is
the scripting form - and unlike path it guarantees the thing it names exists and
matches. The mismatch report goes to stderr so it can never end up inside a
captured path.

clear-cache is deliberately NOT folded in. The cache root is shared with
invisible_firefox, so pruning trees no seal points at would delete the other
product's engine on a machine running both. `version` prints the location
instead; removing a directory is a thing a person can do without a subcommand.

The tag argument went with them. The seal decides which engine a build runs and
verify_engine refuses anything else, so a tag on the command line could only ever
name something that would then be rejected.

Breaking for anybody scripting the four that are gone, which is why this is a
minor rather than a patch. They fail loudly rather than being ignored, and a test
asserts that.

The surface is asserted as an EXACT set, not a subset: a subset check passes
while the CLI grows back one convenience at a time, which is how it reached six.
Three mutations: the verification removed, a third command added, and a line
printed after the path.

426 passed.
2026-08-01 19:36:15 +02:00
feder-cr c407928dd2 readme: drop the sponsor heading, keep the sponsor
The block reads fine without a section title above it, and the title was the first thing on the page.
2026-08-01 19:27:44 +02:00
feder-cr 2942dc4ac4 docs: the launches badge shows a real number again, and links where it lives
The badge SVG has read a hand-written 1M since it was made. It is now rendered
from the snapshot data: the total counted before 22 July plus the live counter,
which is a sum, and a download count cannot be transferred to a new asset.

The link went to the old release, whose count froze on 22 July when the ping
URL stopped resolving to it. It now points at the release the binaries actually
GET.
2026-08-01 19:14:49 +02:00
feder-cr ff5afb86ba ledger: 0.4.9 2026-08-01 18:53:10 +02:00
feder-cr 29e3dadb11 release: 0.4.9 - the pin follows the core past a shape that lasted one release
invisible-core 18.10.0 classified a 404 on the engine archive instead of raising a
bare HTTPError, which is issue #51, and 18.11.0 removed the part of it that ran
`pip install --upgrade` on the caller's environment. A library that installs
things while it is running mutates an environment nobody asked it to touch,
ignores whatever lockfile chose that version, and inside a container rewrites an
image layer at runtime.

What reaches a user of this package: a 404 on the engine now says whether the
release was retired on purpose - in which case no retry will find it and the
message carries the upgrade command - or whether the tag is current and the fault
is ours.

Nothing here changed. This release is what lets an install resolve that pair.

428 passed.
2026-08-01 18:52:56 +02:00
Federico 22f86499a6 docs: add GitAds sponsor snippet 2026-08-01 02:46:17 +02:00
Federico b6bf924edc chore: add GitAds verification code 2026-08-01 02:41:53 +02:00
Federico f505113151 docs: remove sponsor badge 2026-08-01 02:08:08 +02:00
Federico b324b27723 docs: add sponsor badge 2026-08-01 02:01:29 +02:00
feder-cr af895b9b25 docs: generate BreadcrumbList JSON-LD from a Jekyll include, not per-file
Every article had a hardcoded <script type="application/ld+json">
block right after its front matter. On the built Pages site this
renders invisibly in <head> as intended. On github.com's own blob
view - the exact page type this project has spent this whole session
converting README links toward, for its dofollow authority - GitHub's
markdown renderer doesn't execute <script> tags but also doesn't hide
them: it printed the raw JSON as visible text at the top of every
single article, right above the actual content.

Moved the breadcrumb generation into docs/_includes/head_custom.html,
the theme's documented custom-head extension point (a plain Liquid
include, not a Jekyll plugin, so it's fully compatible with GitHub
Pages' safe build mode). It reads page.parent/page.grand_parent/
page.title from front matter and emits the identical BreadcrumbList
schema into <head> at build time - same output on the live site,
nothing left in the markdown source to render badly on GitHub.

Verified the new template reproduces every existing hardcoded block
byte-for-byte by simulating it in Python against all 82 files that
had one, before removing any of them. That check caught two
pre-existing, unrelated bugs along the way: cross-origin-iframe-
unreachable.md was missing its breadcrumb script entirely, and
slow-browser-launch-timeout-budget.md's script pointed at a 404'd
slug (guides-testing-and-troubleshooting.html instead of the real
guides-testing-troubleshooting.html) and its front matter was
missing grand_parent: "Guides", which the sidebar nav depends on.
Both are now fixed automatically by the shared template; the missing
grand_parent field is also corrected directly in front matter.

Stripped the now-redundant hardcoded script block from all 82 files
that had one.
2026-07-31 22:02:37 +02:00
feder-cr 07c3e85ad9 docs: why a plain Python requests scraper gets blocked before it sends a header
New article for the non-browser scraping audience, tool-agnostic
rather than Playwright-specific: python-requests carries its own TLS
fingerprint via Python's ssl/OpenSSL stack, distinct from any real
browser's, and a site checking JA3/JA4 rejects the connection before
any header, cookie, or user agent the script sets even exists as part
of it. Names curl_cffi as the legitimate impersonating-client fix for
non-JS scraping, and points to a real browser for anything that needs
JavaScript execution. Cross-linked from ja3-ja4-tls-fingerprint.md,
the browser-side version of the same argument.
2026-07-31 21:45:42 +02:00
feder-cr e57be7b945 docs: why web scraping keeps getting blocked even with good proxies
New article targeting the broad 'web scraping getting blocked' search
space directly, tool-agnostic rather than Playwright-specific, since
that space is dominated by generic proxy/delay advice from scraping-
API vendors. The angle this site can argue better than that content:
a proxy only changes the exit IP, and a growing share of sites cross-
check that IP's country against the browser's own timezone, language
and number formatting - a mismatch that survives every proxy quality
upgrade because proxy quality was never the variable it depends on.
Summarizes and points to the existing Playwright-specific field-by-
field breakdown in timezone-proxy-mismatch.md for readers who want
the full detail, and is cross-linked from there.
2026-07-31 21:32:34 +02:00
feder-cr e53308b67d docs: invisible_playwright vs playwright-with-fingerprints, whose device and whose engine
New comparison article: playwright-with-fingerprints injects values
sourced from a remote paid service (FingerprintSwitcher) rather than
generating them locally - a genuinely different answer to where a
fingerprint comes from. Its own README states three separate facts
worth naming: Windows-only, pinned to a specific and already-ageing
Chromium build (146.0.7680.80 against a current default several
versions ahead), and self-described as beta. Same injection-layer
limitation as every other page-level tool on this site, plus an
external-service dependency none of the locally-seeded approaches
have. Cross-linked from vs-fingerprint-suite.md and added to the
top-level README's Related projects list.
2026-07-30 15:58:21 +02:00
feder-cr 50e9d92be7 docs: why automating the login form is riskier than reusing a session
New article from a real automation pain point rather than a tool-status
check: the login flow is the most heavily monitored sequence on most
sites, and Playwright's storage_state lets a script skip it entirely
by reusing a session captured from a real login. Covers the one hard
requirement that makes this safe rather than a false sense of
security: the fingerprint replaying the session has to match the one
that created it, since some sites bind a session to more than the
cookie. Cross-linked from persistent-profiles.md as the storageState
half of the same identity-continuity question.
2026-07-30 15:16:55 +02:00
feder-cr bfe801fede docs: Playwright's Chromium-vs-Chrome codec gap closed in 1.57, Widevine didn't
Significant, verified update to a cornerstone comparison article. As
of Playwright 1.57, the default managed Chromium binary (no channel
set) is Chrome for Testing, not the old custom-compiled open-source
build - confirmed against Playwright's own release documentation.
Checked directly in a live session: H.264 and AAC now play on the
current default, closing the codec half of this page's original
argument. Widevine does not: requestMediaKeySystemAccess still
rejects with NotSupportedError, because Chrome for Testing carries
Chrome's codecs but not its DRM module. Rewrote the article around the
surviving Widevine-specific gap rather than the now-partially-outdated
codec claim, and propagated the same correction to the two other
articles that repeated the old 'Chromium has no H.264' framing
(firefox-vs-chromium-antidetect.md, vs-patchright.md).
2026-07-30 14:22:04 +02:00
feder-cr 476e2f9816 docs: a real CreepJS score from an unmodified session, tightly scoped
Second live-detector run this session. CreepJS's headless module
returned 0% headless / 0% stealth (25% 'like headless' partial score)
against a stock Playwright Chromium session with no stealth layer
applied at all. Reported only the safe, aggregate percentages -
deliberately excludes everything else CreepJS collected in that run,
including real network-identifying data that has no place in a public
article. Scoped explicitly as one session's result, not a general
claim about Playwright's default detectability.
2026-07-30 13:56:49 +02:00
feder-cr e3d7bf87b0 docs: a real, live run against sannysoft, carefully scoped
Ran a live Playwright-driven Chromium session directly against
bot.sannysoft.com via the available browser tooling rather than
describing the page from memory. All eleven group-one rows passed,
including WebDriver and WebDriver Advanced, through a genuinely
native, unpatched getter reporting false on its own. Added as a
tightly scoped observation - explicit that this describes one
directly-checked session, not a guarantee about every Playwright
launch configuration, consistent with the page's own point that
clearing this table is the easy part regardless of how it happened.
2026-07-30 13:44:57 +02:00
feder-cr ec7ab894f5 docs: checked a circulating claim about a Playwright global marker, found nothing
A claim repeated by several current SEO-content pages describes a
'window.__playwright' marker as a Playwright-side equivalent of
Selenium's cdc_ variable. Checked directly in a live Playwright-driven
Chromium session by enumerating every own property on window: no such
property, and nothing resembling it. Updates the FAQ answer to state
this as a checked finding rather than a vague 'every stack has its own
artefacts' non-answer, consistent with the page's own point that a
claim should be verified by opening a real session rather than
repeated from a description of one.
2026-07-30 13:29:46 +02:00
feder-cr 2d9ae0ea5b docs: invisible_playwright vs fingerprint-suite, same generation model different layer
New comparison article: Apify's fingerprint-suite generates a coherent
fingerprint with a Bayesian network, close to this project's own
seed-to-fingerprint approach, then injects it via Playwright/Puppeteer
into a running Chromium or Firefox instance - same generation
philosophy, different layer. The injection mechanism carries the same
overwrite-signature limitation as every other page-level tool covered
on this site, independent of how realistic the underlying values are.
Cross-linked from vs-playwright-stealth.md and added to the top-level
README's Related projects list.
2026-07-30 01:51:42 +02:00
feder-cr 94faa93cba docs: rebrowser-patches independently converges on Patchright's CDP fix
New comparison article: rebrowser-patches fixes the same Runtime.enable
CDP leak Patchright addresses, on the same protocol, by close to the
same technique (manual execution-context management instead of the
automatic call), arrived at with no shared code between the two
projects. Neither reaches Firefox; both explicitly scope themselves
away from fingerprinting per their own docs. Generalized the vendor
names their own README uses for the detection side, per the site's
naming ceiling. Cross-linked from vs-patchright.md and
playwright-stealth-levels.md's existing passing mention, and added to
the top-level README's Related projects list with the same treatment
as the other five entries.
2026-07-30 01:39:01 +02:00
feder-cr 5736c9769b docs: pyppeteer's own maintainer recommends Playwright, and why that's not just staffing
New article: pyppeteer's own README opens with an unmaintained notice
pointing to playwright-python. Unpacks why the recommendation lands
on Playwright specifically rather than a more active Puppeteer fork -
Playwright's driver abstraction covers three engines through whatever
protocol each one actually supports, a wider foundation than a
CDP-only port can be extended into. Separates that maintenance
argument from the unrelated question of whether switching drivers
fixes automation detection on its own (it doesn't). Added to the
top-level README's Related projects list and cross-linked from
vs-playwright-stealth.md, same authority treatment as the other four
comparison entries.
2026-07-30 01:21:20 +02:00
feder-cr f773022a6f docs: fake-useragent's 2026 archive, plus a playwright-extra clarification
New article: fake-useragent (Python, 4k+ stars) was archived by its
own maintainer in 2026, verified directly via GitHub's archive flag -
the strongest possible signal, no inference needed. Covers the
practical break (frozen string database) and the more durable point:
a realistic string was always one claim among many that get
cross-checked, so a stale database makes the tell cheaper to find
rather than creating a new problem. Cross-linked from
playwright-user-agent.md and selenium-stealth-unmaintained.md.

Also adds a one-line clarification to the puppeteer-extra-plugin-stealth
article: playwright-extra ships from the identical repository, so a
reader searching that term specifically gets a direct answer instead
of having to infer it.
2026-07-30 00:47:32 +02:00
feder-cr 8c6652bb7a docs: AI agent detection stopped being theoretical in 2026
Adds a section to the existing AI-browser-agents article covering a
real, current development found through keyword research: a
commercial fingerprinting vendor shipped a dedicated AI agent
detection product in early 2026, and recent academic work has been
building multi-layer fingerprints specifically targeting LLM-driven
browsing sessions. Reinforces the article's existing agent-timing-
signal section with a concrete, dated reason it now matters at
production scale rather than as an edge case.
2026-07-30 00:23:22 +02:00
feder-cr 0d1236b244 docs: add the two new comparison articles to the top-level Related projects list
puppeteer-extra-plugin-stealth and selenium-stealth were written up
this session but only cross-linked between docs pages, missing the
same top-level README authority treatment every other comparison
article already gets. Added both under the Chromium side list,
matching the existing format and tone.
2026-07-30 00:16:48 +02:00
feder-cr e6a2215544 docs: selenium-stealth's real maintenance status, verified
Second keyword-research-driven article this batch. selenium-stealth
still appears in current tutorials for hiding Selenium automation;
its actual repository has had no commits since December 2021, over
four and a half years, verified directly. Same structure as the
puppeteer-extra-plugin-stealth piece: separates the staleness question
from the durable architectural ceiling shared by every page-level
property-patching approach. Cross-linked from cdc-variable-explained.md,
which covers the adjacent Selenium-specific detection surface.
2026-07-30 00:11:17 +02:00
feder-cr f69f26a45e docs: puppeteer-extra-plugin-stealth's real maintenance status, verified
New comparison article targeting a real, currently-searched keyword
gap identified through explicit keyword research: 'puppeteer stealth'
carries heavy search volume dominated by scraping-vendor content, but
the actual home repository behind the plugin (berstend/puppeteer-extra)
has had no substantive commits since July 2024, verified directly
rather than assumed. Separates the maintenance question (a frozen
patch list against evolving detection) from the durable architectural
ceiling (page-level property patching, current or not, never touches
TLS, GPU output, or font rendering). Cross-linked from
vs-playwright-stealth.md at its existing puppeteer-extra-plugin-stealth
mention.
2026-07-30 00:05:06 +02:00
feder-cr ad8827f397 docs: a packaged Firefox build that launched fine but Playwright couldn't drive
New article: a browser build passing every manual smoke test
(launch, screenshot) still failed for Playwright specifically, with
TargetClosedError and a chrome://juggler load failure. Root cause was
a packaging manifest that assembled the shipped archive from an
explicit file list and never listed the automation-layer directory
alongside its sibling component, even though the developer build
output had it. Every existing gate tested the developer output path,
never the actually-packaged artifact a user receives. Fixed with one
manifest entry plus a gate that drives the real packaged binary
instead of a proxy for it. Cross-linked with the other two release-
gate-blind-spot articles from this session.
2026-07-29 23:21:38 +02:00
feder-cr 82f148c9d3 docs: why a per-request timeout didn't bound an occasionally slow launch
New article: a launch-time network resolution step tried up to three
endpoints in sequence, each individually timed out and working
correctly, with no bound on the sequence as a whole. One launch in six
hit the worst case. Fixed with a shared budget across the step rather
than tuning any single timeout, and a failure message that reports how
many endpoints were reached before the budget ran out. Cross-linked
from orphaned-browser-process-windows.md as the same lesson in the
same layer: individually correct pieces, no bound on their sum.
2026-07-29 23:10:37 +02:00
feder-cr f082f46b0f docs: a second, distinct gap behind the same green WebRTC gate
The article already covers assertions too weak to fail on a dead
feature. Adds the separate, later discovery that even after fixing
those assertions, the test suite had been exercising a config the
wrapper's own shipped baseline never actually turned on by default -
same outward symptom (green gate, feature unavailable to real users),
opposite cause. Fixed by making the baseline match what the test
already assumed instead of the reverse.
2026-07-29 22:31:01 +02:00
feder-cr 496be20fe9 docs: why a killed test runner leaks Firefox processes on Windows
New article on the automation-layer side of process management: a
killed parent process never runs any in-process cleanup code, so a
job-object-based fix is needed at the OS level rather than in a
try/finally. Covers the wrong first diagnosis (the exception path
never actually leaked, measured by controlled A/B before trusting
the fix), the correct one, exact token-based process identification
to avoid killing a concurrent session's browser by mistake, and a
vacuous test that passed with its own guard removed. Cross-linked
from how-to-test-bot-detection.md as an example of the same false-
pass trap showing up inside a test rather than a fingerprint check.
2026-07-29 20:57:48 +02:00
feder-cr 4bd2d02668 docs: the macOS font gap that needed two separate fixes, not one
Adds the concrete macOS story behind the article's brief 'the same
check runs in CI, and it has passed there too' line: a missing
CoreText hook (found by code review, no local Mac available) and a
build-configuration default that silently disabled the whole bundled-
fonts subsystem on that one platform, which also compiled out the
hook that had just been added to fix layer one. The first fix looked
complete and was not; only an automated run on the real OS caught the
second layer.
2026-07-29 20:51:43 +02:00
feder-cr f27e2fb81b docs: how the window cloak was validated, and a crash it fixed for free
Adds the concrete validation behind the 'third option' section: the
window-hiding approach was latent-broken for several releases on
Windows (a thread-vs-process desktop-inheritance mistake, invisible
to the test suite because it happened to use the correct mechanism
itself) and never worked on macOS at all. Also documents an earlier,
unrelated-looking cross-process-navigation crash that the current
window-level cloak closed as a side effect, because it stopped
splitting a browser's processes across two desktops.
2026-07-29 20:46:11 +02:00
feder-cr 951863b94b docs: a closed cipher-drift bug as a worked example on the TLS page
One extra cipher suite in our build's ClientHello, versus stock Firefox
of the same version, traced to a channel-gated pref default that had
drifted out of sync with the currently shipped upstream release - the
TLS code itself was never touched. Fixed by forcing the pref to the
upstream-current default; JA3/JA4 and the full handshake came back
byte-identical to stock. Reinforces the article's real-browser claim
with a concrete measured gap and fix, and the maintenance point that
follows from it.
2026-07-29 20:39:44 +02:00
feder-cr 9493764cb3 docs: a closed enumeration-vs-rendering bug as a worked example
Adds a real, closed example to the bundled-fonts article: a .ttc
collection font on Linux enumerated correctly while rendering the
wrong face, because the table-reading code never checked for the
TTCHeader ttcf marker. Fixed by reading the requested face's own
offset from the collection directory instead of assuming a single-face
file. Ties directly into the article's existing gap list and the
project's enumeration-is-not-enough point, with before/after metrics.
2026-07-29 19:58:08 +02:00
feder-cr dedc60e411 docs: three Playwright failures on one iframe, one cause, two wrong fixes first
New article, mined from 71-bug-archive.md (a source file not touched before -
distinct from 70-known-bugs.md, which holds still-open bugs excluded by the
established rule; this archive holds only resolved ones, so it doesn't carry
the same disclosure risk).

The real content: content_frame() returning None, frame.evaluate() throwing
a cross-origin permission error, and frame_locator() timing out all read as
separate bugs on a cross-origin iframe, but share one root cause - Firefox's
site-isolation strategy can put that iframe in a separate process, and the
driver's parent-side frame tree only gets a placeholder for it, missing the
exact reference each of the three operations needs.

Kept the honest part of the story too: the first two fix attempts were
wrong, and worth explaining why rather than skipping past. One wrapped a
property read in try/catch for an exception that never fires, because the
property isn't exposed to that scope at all - nothing to catch. The other
compared two identifiers that were both unreachable from where the check
ran, so the comparison could never distinguish the broken case from the
working one. Neither fix was tested against a reproduction that failed
before and passed after; both shipped on a plausible theory alone.

Generalized away everything specific to the source incident that rule 13
excludes - a real target site's name, a reporter's GitHub username, and a
third-party consent-platform vendor name are not in the published version;
the technical mechanism (cross-origin iframe, site isolation, frame tree)
carries the whole article without any of them.

Wired into The Automation Layer (nav_order 9), cross-linked from
debugger-timing-detection.md's opening (same frame-tracking machinery,
different failure mode).
2026-07-29 19:46:10 +02:00
feder-cr bb6fc67b91 fix: exclude the thin README stub from the sitemap
docs/README.md is a 4-line pointer at the real site, kept only so browsing
the folder on github.com shows something. It was still being submitted in
sitemap.xml as thin, near-duplicate content of the real homepage
(index.md), which the sitemap already lists correctly at the site root.
jekyll-sitemap respects sitemap: false per page - added it here, nowhere
else needed it.
2026-07-29 10:16:10 +02:00
feder-cr 9e7b9fc1e2 docs: fix the last .html leaks and link every orphan page
Scanned all 83 pages for two things: relative .html links (dead on the
blob view, since blob serves the raw .md) and pages receiving zero inbound
links from sibling articles.

12 .html links found, all in the four Documentation pages
(installation/quickstart/configuration/cli-reference.md) - written before
the blob-vs-Pages distinction was found, so they'd missed the fix applied
to the hub pages earlier. Fixed the same way: .html to .md.

7 real orphan content pages found (three more flagged - README.md,
index.md, integrations/README.md - are entry points, not orphans, and
don't need inbound links). Added one genuine in-body link to each from a
naturally related sibling: bfcache-pageshow-persisted and
execution-context-destroyed from the detection checklist's automation-tells
section, measuretext-textmetrics-fingerprinting from canvas-fingerprint-noise
(same canvas element, different surface), permissions-api-consistency from
headless-vs-headful's observable-differences list, service-workers-storage-partitioning
from web-workers-fingerprint's ServiceWorker mention, vs-playwright-stealth
from tostring-native-code-detection's engine-argument section (a concrete
example instead of the abstract one), webrtc-ice-candidate-spoofing from
webrtc-leak-proxy's synthesized-candidate section.

Re-scanned after: 0 .html links, 0 real orphans.
2026-07-29 03:12:36 +02:00
feder-cr f77e2d5873 docs: BreadcrumbList structured data, not FAQPage - FAQ rich results are dead
Checked before building: Google deprecated FAQ rich results entirely on
2026-05-07, extending the August 2023 restriction (which had already limited
them to government/health sites) to nobody at all. Building the FAQPage
JSON-LD I'd planned would have added real engineering work for zero visible
benefit, so stopped before writing it to any file.

BreadcrumbList is still fully supported and fits this site better than FAQ
ever did: the hierarchy is already sitting clean in every page's own front
matter (parent/grand_parent), so this needed no markdown parsing at all,
unlike the FAQ approach would have. Generated a Home > Guides >
[sub-category] > [article] trail (or the 3-level Home > Comparisons/
Documentation/Integrations > [page] version) for every one of the 77 pages
that has a parent field, using the same title-to-URL mapping the site's own
nav already relies on.

Verified: all 77 generate syntactically valid JSON, the site verification
script still passes on all 83 pages (title==H1 unaffected, since this
inserts between front matter and the H1, touching neither), and no
forbidden names or secrets in the diff.

No GitHub Pages plugin needed - this is why it went in the page body as
inline JSON-LD rather than through a theme layout override: GitHub Pages'
safe build mode only allows a fixed plugin whitelist, so anything requiring
a custom Jekyll plugin to parse content at build time was off the table.
2026-07-29 01:55:34 +02:00
feder-cr 9fade94c7a docs: two openings led with another article instead of their own topic
Audited every article's H1 and opening paragraph specifically against how
Google's search snippet gets built when it ignores GitHub's generic blob
meta description: the first ~155 characters have to stand on their own,
because that's roughly the truncation point.

Found two pages, both mine, that opened by crediting a companion article
before saying what the page itself is about - bundled-fonts-cross-platform.md
led with "[Why headless browsers render different fonts] covers the
problem," and canvas-webgl-cross-platform-consistency.md did the same with
two links. Truncated to a snippet, both read as being about a different
page entirely. Reordered both to state their own value first, then point to
the companion piece afterward - same links, same content, just not the
first thing a truncated snippet shows.

Checked all 83 pages for this specific pattern (first line opening with a
markdown link) - only these two had it. Two other pages that looked flagged
by length alone (execution-context-destroyed.md, permissions-api-consistency.md)
turned out fine on inspection: both open with a code block that a naive
first-paragraph extraction stops at, but the real prose right after reads
well as a snippet on its own.
2026-07-29 01:45:36 +02:00
feder-cr d0e8e3b64a fix: hub pages linked .html on github.com, which is a 404 there
docs/index.md, documentation.md, guides.md and comparisons.md linked to
each other and to individual articles with the .html extension - correct
for the published Pages site, dead on GitHub's own blob view of the same
file, since blob serves the raw .md and .html simply does not exist there.
Verified: guides-browser-identity.html was a confirmed 404 on github.com
before this fix. Switched all four to relative .md links, matching every
other page on the site.

Also converted the individual article links in README.md's own guide list
and Related Projects section - previously all pointing at
feder-cr.github.io, which GitHub marks rel="nofollow" on every outbound
link (verified against the rendered page). Relative docs/x.md links from
README instead stay inside github.com, carry no nofollow (verified against
same-domain links elsewhere on the page, e.g. the LICENSE link), and put
the repo's own domain authority behind ~20 individual articles directly
from the single highest-traffic page in the project. Left the one link to
the bare Pages homepage as-is, since that's the genuine pointer to the
actual searchable site experience, not a page competing for the same
keyword as its own blob copy.
2026-07-29 01:19:10 +02:00
feder-cr 64f00d94ea the README made four claims nothing checked, and one of them was wrong
Audited by listing what the page asserts and asking which had a test. Sizes did.
CLI subcommands did, in both directions. The rest did not.

The engine version. "Firefox 151.0" in a badge alt text and again inside the
generated docs/badges/firefox.svg that nobody re-reads. Same defect as the
firefox-15 that was shipping in the profile manager's status bar, in a more public
place: a number the seal owns, copied, waiting for the next engine roll.

The supported platforms. Five archives in the seal, five platforms on the page,
nothing tying them together. A platform claimed but not built is a download that
404s for whoever believed the page; one built but not claimed is quieter and still
wrong.

The examples. Seven fenced python blocks and not one had ever been compiled. A
stray comma there costs a reader their first five minutes.

And the field count, which was simply wrong. "~400 fields" measured against a real
profile: 197 leaves on the most generous count, which treats every bundled font
name as a field; 155 prefs emitted; 157 including the stealth baseline. No reading
supports 400. Corrected to ~200 - the number, not the sentence.

Two of the four gates failed their own first mutation. The platform check accepted
a bare family name, so deleting the whole "macOS arm64 / x86_64" claim left it
green - the word macOS still appears in the Gatekeeper note two lines down, and a
passing mention satisfied it. Tightened to exact phrases. The other apparent
survivor was a bad mutation of mine: I broke a line inside a diff block and
expected the python-block scanner to see it.

428 passed.
2026-07-28 21:33:56 +02:00
feder-cr cd904bcdfb Revert "docs: prep_recaptcha was shipped and completely undocumented"
This reverts commit 9d21ce019b, on request.
Removes both additions cleanly: the "reCAPTCHA cookie pre-seeding" section
in configuration.md and the "Why this had to be built in Python, not C++"
section in recaptcha-v3-score.md. Nothing else touched either file since,
so this is an exact inverse.
2026-07-28 21:03:25 +02:00
feder-cr 5ba890bcc6 docs: the reason that produces no error anywhere, from the internals reference
Sixth reason on the list, from mining 90-firefox-internals.md: a preference
set correctly in the parent process can be silently empty in a content
process, and it's specific to string preferences. Numeric and boolean
preferences generated through Firefox's static-preference mechanism get
baked into a shared snapshot every content process receives at launch;
string preferences don't go through that snapshot unless explicitly allowed
through, and the failure mode is an empty string with no error rather than
anything that points at the cause.

Framed around what people actually hit this on - a spoofed string value,
not a flag or a number - since that's the case where "it works in
about:config but the page sees nothing" costs the most time. The existing
FAQ entry ("does about:config show the truth... not always what a content
process is using") already gestured at this without explaining the
mechanism; this section is what it was gesturing at.
2026-07-28 20:45:50 +02:00
feder-cr 52591e5524 docs: a measured example of noise failing a single-read check, not just a two-read one
Strengthens the existing "why substitution instead of noise" argument with
a concrete case found while mining 22-patch-port-history.md: an earlier
iteration used small per-pixel noise on WebGL readback specifically, and a
masking-detection check flagged it directly from a single read, because the
noise had a distinct high-frequency statistical signature rather than
needing two reads compared against each other. Replacing it with a
per-channel remap that resembles an ordinary GPU colour-profile difference
took a measured spike count from about 320 to near zero on the same probe.
Same lesson the rest of the article already makes, now with a number behind
it instead of just the reasoning.
2026-07-28 20:40:28 +02:00
feder-cr 9d21ce019b docs: prep_recaptcha was shipped and completely undocumented
Found while mining 22-patch-port-history.md: the wrapper has had a
prep_recaptcha=True parameter for a while - a real, tested feature
(29 unit tests internally) with zero mention anywhere on the site,
including Configuration, which is exactly where it belongs.

Added it in two places. Configuration.md gets the actual usage: the
parameter, what it does in one paragraph, the profile_dir interaction that
disables it automatically, and a pointer to the mechanism page.
recaptcha-v3-score.md gets a new section instead of just the parameter,
because there's a real engineering story behind why this lives in the
wrapper and not the engine: the first attempt wrote the cookies once in C++
before any page loaded, compiled and linked cleanly, and did nothing -
browser.new_context() gives each context its own isolated cookie jar, so
state written before a context exists has nowhere to land. Generalised and
cross-linked to playwright-proxy-per-context.md, since it's the same
isolation mechanism that separates proxies and storage between contexts.
2026-07-28 20:29:34 +02:00
feder-cr f93163d1ef docs: the font cross-platform fix, applied to canvas and WebGL pixels
Same shape as bundled-fonts-cross-platform.md, different surface: a
GPU-backed render target can crash rather than return data if read directly
in-process, which rules out patching the render itself. The fix intercepts
at readback instead - the small, enumerable set of export calls (toDataURL,
toBlob, getImageData, readPixels, the createImageBitmap chain) is the only
place content ever actually sees the pixels, for both canvas-2D and WebGL.

Kept the masking-safe design decision from the existing canvas noise
article explicit here too: a near-uniform reference probe (the kind a
masking-detection scanner uses) survives untouched, high-entropy real
renders get the full substitution, which is what stops a masking check from
immediately noticing every readback is intercepted.

The proof that generalises past "looks plausible": same seed, same canvas
and WebGL hash, byte for byte, on Windows and Linux, verified against a
commercial fingerprint scanner across multiple seeds with zero failures on
either OS - a stronger claim than a fingerprint that merely looks
consistent.

Named the honest limit at the end rather than implying completeness: this
is an enumeration problem by nature, and newer export/capture APIs need
their own coverage as the platform grows - stated generically, no specific
list of what is or isn't covered yet, consistent with the rule that an open
gap in our own shipped surface doesn't get a public roadmap.

Wired into Canvas/WebGL/Fonts/Audio (nav_order 9), cross-linked from
canvas-fingerprint-noise.md's existing consistency argument.
2026-07-28 19:46:05 +02:00
feder-cr 4fc723ae36 docs: the mouse-movement fix that had been testing the wrong call
New article, cross-linked from human-mouse-movement.md. The finding: a
humanized path validated against page.mouse.move() and the same path used
through page.hover() are not the same test, because hover's hit-target check
moves the pointer before the humanized dispatch runs and consumes almost all
of the distance first. Measured interleaved on the same page: 108 events on
a direct move() call, 3 through hover() - a teleport with two extra samples
on it, on the exact call almost every real script uses (hover, click,
dblclick, check all share the same path).

Two more measured fixes bundled in, because a good macro fix doesn't repair
what the stroke itself gets wrong: a +0.4976px systematic jitter bias
(should be zero-mean, now 0.00039px) and a duplicate-position rate measured
at a page-side listener instead of the planned path, which is the
methodological point as much as the number - 0.706 on the planned path,
0.069 measured where a detector would actually be counting.

Named what's still open rather than implying it's solved: idle-time
distribution and endpoint-always-clickable are macro-level patterns no
single stroke fix touches, stated generically since it's a property of
click-driven automation generally, not specific to one implementation.

Wired into The Automation Layer category (nav_order 8, no collisions).
2026-07-28 19:38:29 +02:00
feder-cr a483b73e3d README: the environment-variable table described things nobody does
Every row was something this package does by itself. It downloads the engine on
first use, verifies a sha256, caches it, and picks a cursor engine. None of that
is a step somebody takes, so a table of overrides in the README asks a reader to
hold five knobs in mind before they have run anything.

It was also the third copy: docs/configuration.md documents all five and
docs/installation.md two of them. The right home for an override is the
configuration page, which is where somebody looking for one goes.

The test that covered the table was covering the wrong artifact, and its subject
had already moved once. It hardcoded four names and asserted the README mentions
them, so with the section gone it failed on the README rather than on anything
real. It now reads the list OUT of docs/configuration.md and keeps the property
worth keeping: a documented knob that no shipped module reads is worse than an
undocumented one, because the reader sets it, sees no effect, and stops trusting
the page.

Deriving the list also fixed a gap the hardcoding hid: there were five knobs and
four rows, so a fifth could have been documented and read by nothing. Two
mutations: a variable removed from the page (the collapse guard fires), and one
documented that nothing reads.

424 passed.
2026-07-28 19:36:03 +02:00
feder-cr c464c11260 fix: jekyll-readme-index did not actually fix the root 404, use a real index.md instead
The previous commit added jekyll-readme-index to plugins: and the build
reported success, but the bare root still 404'd - it is evidently not on
GitHub Pages' safe-mode plugin whitelist here, so it silently did nothing
rather than erroring.

Removed it and did the reliable thing instead: docs/index.md is now the
actual homepage, with the exact content docs/README.md carried before.
docs/README.md is now a short pointer at the published site, kept only so
browsing the folder directly on github.com still shows something sensible
rather than the old full homepage duplicated in two places forever.
nav_exclude + search_exclude on it so it does not show up as a redundant
second "home" entry in the sidebar or search results.
2026-07-28 19:12:40 +02:00
feder-cr 895ea47176 fix: the bare site root 404s, and nobody had ever checked it
Every individual page built and served fine after the restructuring push -
verified guides.html, documentation.html, comparisons.html, README.html and
several article pages all return 200. Only the bare domain
(feder-cr.github.io/invisible_playwright/) and index.html returned a GitHub
Pages 404. Pre-existing, not something the restructuring introduced: nothing
in this project's verification history ever curled the root URL, only
specific article links, so a homepage that never worked went unnoticed.

jekyll-readme-index (part of the github-pages gem's plugin whitelist) is not
active by default the way jekyll-sitemap and jekyll-seo-tag are - it has to
be listed explicitly to serve docs/README.md at the root when no index.md
exists. Added it rather than adding an index.md, since docs/README.md
already carries the front matter and content the homepage needs.
2026-07-28 19:05:48 +02:00
feder-cr a33fc26f03 site: real sections instead of one flat sidebar, plus the product docs that were missing entirely
The site read as a pile of articles, not a site for this project specifically,
because docs/ only ever held the guides - everything about installing and
using the package lived exclusively in the GitHub README, which is not a page
on the published site at all. Anyone who landed on an article from a search
had nowhere to click for "how do I install this."

Five top-level sections now, all via just-the-docs' native parent/has_children
front matter, not folders - no URL changes, no broken links:

- Documentation (new): Installation, Quickstart, Configuration, Pinning
  fingerprint fields (existing page, re-parented), CLI reference. Adapted from
  the README's own Install/Usage/CLI content rather than duplicating it
  verbatim, since these needed to stand alone as pages rather than sections.
- Guides: the 48 existing explainers, grouped into 7 categories instead of one
  alphabetical list - Browser Identity (15), Canvas/WebGL/Fonts/Audio (8),
  Network/Proxy/WebRTC (7), The Automation Layer (7), AI Agents and Frameworks
  (3), Detectors Explained (5), Testing and Troubleshooting (3).
- Comparisons: the 7 "vs" and engine-choice articles, promoted to their own
  section rather than buried inside Guides, since "which tool" is the most
  direct search intent this site gets.
- Integrations: unchanged content, promoted to a top-level section; its 9
  pages had no front matter at all until now, so they also pick up real
  per-page titles/descriptions for the first time.

Each new category page is a real intro, not a bare index: why the group holds
together, not just what's in it.

Also fixed: docs/_config.yml's header comment still said "deliberately no
front matter on the pages," which stopped being true on 2026-07-27 when every
page got title/description front matter for its own meta description - the
comment now says why front matter exists and what it costs (a rendered table
on github.com) rather than the reversed decision. docs/README.md and the
top-level README's guide list were both cut down from a 40+ entry flat table
to pointers at the four new sections, since the sidebar and category pages
now do that job.

Verified: every parent/grand_parent reference resolves to a real page title,
every has_children page is referenced by at least one child, no broken
relative links, no forbidden vendor names, no secrets, title==H1 on every
page including the 15 new ones.
2026-07-28 18:51:02 +02:00
feder-cr 6370041c09 ci: a publish was racing its own verification
user-install.yml runs on `release:`, which fires seconds after twine finishes,
and PyPI does not serve a new version to pip immediately. Measured today:
invisible-firefox 0.2.6 was uploaded, the release created about forty seconds
later, and the pip install in that job still resolved 0.2.5. So the run reported
a forgotten publish that had happened two minutes earlier - the most expensive
shape of red there is, because it is indistinguishable from the real defect this
workflow exists to catch.

A bounded wait on the PER-VERSION endpoint, five minutes, scoped to the release
event. The aggregate `info.version` lags it by minutes and has its own trap, so
the poll asks for the exact URL. Scheduled and dispatched runs do not wait: they
are not racing anything, and waiting there would hide a real absence behind five
minutes of polling. It is bounded because an unbounded wait turns a genuinely
forgotten publish from a red run into a job that hangs to the runner timeout.

In the workflow rather than in the four install-e2e test files: the race exists on
one event, and those files cannot import a shared helper - the runner has no
invisible_core, on purpose. A test in the core asserts all three workflows have
the step, that it is scoped, and that it has a deadline. Three mutations, all
caught.
2026-07-28 17:47:52 +02:00
feder-cr 8497a980c4 ledger: 0.4.8 2026-07-28 17:28:55 +02:00
feder-cr d33361c862 release: 0.4.8 - the pin follows the core, and F821 found three names that resolve nowhere
The core moved to 18.9.0, which carries a clearer engine refusal (it used to
locate a missing juggler inside an omni.ja the tree does not have) and a publish
gate that no longer reports a mistyped command with the same exit code as a
broken gate. An exact pin means those reach a user only when this package's pin
moves, so this release is what delivers them.

The rest is this package's own, and none of it was findable by running tests.
Nothing here had ever run a linter. The first F821 pass found:

Renderer, used as an annotation six times in _behaviour.py and defined in no
module in the repository. It survives only because `from __future__ import
annotations` never evaluates an annotation, so the six were strings that looked
like a type - and a reader had no way to learn what the parameter accepts. It is
a real alias now, describing the one call site.

prof: Any in _motion.py, with Any unimported. Importing it would have widened
that module's deliberately tiny allowlist, which one of its own tests enforces -
and there was no need: prof is the cumulative distance table _profile_table
returns and _profile_at consumes, both annotated list[float] two functions away.

And a duplicate `import pytest` in a test file, which is only noise but is the
third thing nothing was looking for.

CI runs ruff with F821 and F811 selected, those two only: they catch a name that
cannot resolve, and neither is a style question. Zero violations here once the
three above were fixed, so it is a gate rather than a backlog.

423 passed. e2e 139 green on a real browser against the pinned engine,
CONSISTENCY PASS, ALL CRITICAL FLAGS CLEAN.
2026-07-28 17:28:31 +02:00
feder-cr 297e10d641 six annotations named a type that exists in no module
The first F821 run this repo has ever had found three things, all of them
invisible to the suite.

`Renderer` was used as an annotation six times in _behaviour.py and defined
nowhere at all. It survives only because `from __future__ import annotations`
never evaluates an annotation, so the six were strings that happened to look
like a type - and a reader had no way to learn what the parameter accepts.
It is a real alias now, describing the one call at line 346.

`prof: Any` in _motion.py had the same shape with an extra twist: `Any` was
also unimported, and importing it would have widened that module's deliberately
tiny allowlist, which one of its own tests enforces. No need - prof is the
cumulative distance table `_profile_table` returns and `_profile_at` consumes,
both annotated list[float] a few lines away. Naming it costs no import.

And a duplicate `import pytest` in test_launcher_config.py, which is only noise
but is the third thing nothing was looking for.

CI runs ruff with F821 and F811 now, those two only: they catch a name that
cannot resolve, which is not a style question and not findable by running tests.
Zero violations here once the three above were fixed. 423 passed.
2026-07-28 15:37:13 +02:00
feder-cr b2ffb14564 the install e2e imported a package the runner does not have
user-install.yml installs pip, pytest and packaging on the runner and nothing
else, deliberately: the package under test goes into a venv the fixture builds
from the index, and a second copy on the runner's path would mean every
assertion read the wrong one.

Both files here imported the venv helpers from invisible_core.testing, where
they moved so the three suites could share them. On a development machine that
is fine - an editable install is always on the path. On the runner it is
ModuleNotFoundError at COLLECTION: the job goes red having tested nothing, and
the message names a module instead of the mistake.

So the helpers are local again in these two files, with the reason written above
them. The duplication is the point, and the core's suite now parses every file
the user-install workflows name and refuses the import, so it does not depend on
that comment being read.

Verified the way it should have been the first time: a venv holding only pip,
pytest and packaging collects both files from this repo's root. 12 tests
collected, 423 passed in the ordinary suite.
2026-07-28 14:57:09 +02:00
feder-cr db1422fe41 ci: arm the hooks, because the suite asserts they are armed
The reminder that core.hooksPath must point at .githooks moved into
invisible_core.testing so all three repos could make it, and all three started
making it. Only the core's workflow ran install_hooks.py - it had needed that
step since the day its own copy of the test was written - so this repo went red
on every push, on all four matrix legs, with a message about an unset config
that reads like a developer's mistake rather than a missing CI step.

A GitHub checkout is a git work tree, so the helper's "skip outside a git
checkout" guard cannot cover this, and it should not: the honest arrangement is
for CI to do what a developer does once. It also means install_hooks.py is now
exercised on every leg instead of only on the one machine that ever ran it by
hand.

The comparison that was missing is in the core's tests now, so a fourth repo
adopting the assertion gets told about the step in the same run.
2026-07-28 14:22:08 +02:00
feder-cr 4b44acb49b docs: the Playwright wire protocol, and the release that broke 97 of 133 tests
Mined 30-upstream-playwright-patches.md, a source file not touched by any
earlier batch. Unlike the WebRTC/proxy deep-dive just done on request, this
one had genuinely new, safe material: a closed and validated fix rather than
an open bug, and about the driver/client contract rather than fingerprinting
or detection at all, so it doesn't carry the same disclosure risk.

The story: Juggler's command schema is closed-world, rejecting any
undeclared field at the moment a specific API is called rather than at
launch. A Playwright client release added fields to two viewport commands;
the first was patched by hand and felt like the fix, the second alone took
out 97 of 133 end-to-end tests in one run because every test builds a
context and only context-with-screen-size triggers that field. A bare
launch probe never sets a screen size, so the shallow check stayed green
throughout - the same shallow-probe-vs-real-usage gap the site's testing
article already names in a different context.

The decision worth keeping is declare-and-ignore over declare-and-honour:
accepting the field stops the rejection, but using its value would let a
client silently overwrite a screen dimension the fingerprint profile owns
for consistency reasons - the same principle pinning.md documents about
correlated fields. Closes on the gate that makes this repeatable: diffing
the client's actual wire behaviour against the declared schema in both
directions, validated by deliberately breaking it and confirming it flags
the break.

Wired into both indices; cross-linked from vs-patchright.md, since it's the
other half of "what Playwright's driver-side contract with Firefox breaks
on," unrelated to the CDP-specific tells that page covers.
2026-07-28 08:58:43 +02:00
feder-cr 70c8028214 README: the engine section was telling people about a step they never take
It opened with megabytes and a cache directory, which is what the download
does, not what the reader has to do about it. Both numbers were already on the
install line four sections up, so the section's whole first half was a second
copy of a figure that only has to stay right in one place.

What is actually useful there is the list of situations where you override
something - another drive, a binary you already have, a network that refuses
anonymous downloads - so that is what the section is now, said in those terms
rather than as "what it does". The heading says environment variables, because
that is what a reader looking for this would search for.

The sizes stay on the install line, where test_the_stated_download_size_matches
_the_sealed_assets derives the acceptable band from seal.json and refuses a
figure that has drifted.
2026-07-28 08:39:57 +02:00
feder-cr e860f8ff8c docs: close out the contextual-link pass, eight pages were still at zero
Found while re-measuring: these eight pages had a relative link somewhere
in the file, but every one of them was inside the FAQ block or the See-also
footer, not a genuine in-body link inside a main section. Footer and FAQ
links carry a fraction of the SEO weight a contextual in-body link does, so
by the density measurement these were still effectively at zero, same as
pages with no link at all.

One link added per page, each anchored to text already in the sentence
rather than a sentence built around a keyword: eval_length to the
toString-source page, the debugger-timing value-vs-behaviour point to the
renderer-string-vs-render page (same lesson, different surface), the
FingerprintJS component list to hardware-concurrency-device-memory, the
cdc_ page's "wrong question" line to the stealth-levels map, canvas
image fingerprinting's font-stack dependency to the bundled-fonts
architecture page, the measureText page's own opening line to
canvas-fingerprint-noise (it already named canvas fingerprinting in
prose), WebGL's ANGLE explanation to the numeric-parameters page, and
pinning's storage-quota mention to the hardware-concurrency page.

Re-measured after: all 55 pages now have at least one genuine in-body
contextual link, zero broken relative links, zero forbidden unicode.
2026-07-28 08:39:09 +02:00
feder-cr c18d5cf4f1 release: 0.4.7 - the pin reaches the index it moved to
The repo pinned invisible-core 18.8.0 and the index still served a wrapper
pinned to 18.6.0, which is the forgotten-publish state this project has a
test for. Nothing in this package's behaviour changed; what changed is which
core a fresh install resolves.

18.8.0 carries the prefs builder split into fourteen named steps with its
output hash-identical across 400 profiles, the GeoIP fetch out of download,
invisible_core.pin as a public module, and a publish gate whose index
cross-check asks about the package it is gating rather than always about the
core.

This package's own imports moved with it: it asks invisible_core for what
that package exports instead of reaching into its private modules, and its
back-compat shims are for users again rather than for its own source.
2026-07-28 03:56:43 +02:00
feder-cr 2e9feb1f86 the pin moves, and the shared helpers come back
Publish the core, THEN move the pin, THEN use the name. All three in order
this time, and this commit is the second and third: the pin names a core
release that is on the index and carries everything this package imports
from it.

The venv helpers are shared again - the local copies were what doing it in
the wrong order cost - and the two hook-wiring assertions no longer skip.

invisible_core._pin is invisible_core.pin here now. What was wrong before
was never the rename, only the order.

Verified against the PUBLISHED core in a bare venv, not against the editable
checkout, which IS the working tree and so cannot see this class of failure:
423 passed, 0 skipped.
2026-07-28 03:22:24 +02:00
feder-cr 23ca48db4c docs: measureText and TextMetrics, the fingerprinting surface with no permission prompt
Closes out this batch of docs mining. This one needed care rather than a
straight write-up: our own patch catalogue has a known, currently-open gap on
this exact surface (a self-consistency identity in the actual-bounding-box
fields that a multi-string probe can still catch), and that gap is
deliberately NOT in this article. Publishing the precise shape of an unfixed
weakness in our own shipped product is a different thing from noting a
competitor's gap or an architectural trade-off, and the honesty standard this
site holds itself to does not require handing out a detection recipe against
ourselves before we've closed it.

What the page does cover is genuinely closed and validated: the per-glyph
horizontal advance offset went through two iterations, and the first one's
mistake generalises past fonts entirely - noise that accumulates with input
length is not noise, it is a growing tell, and it measurably raised a
commercial scanner's tampering signal before the single-bounded-offset
version replaced it. The vertical metrics needed a different fix again,
because they come from a different code path than the shaper touches - not a
value that can be jittered convincingly, but one that had to be read from the
font's own metrics table to stop leaking a 1-3px host-OS delta.

Wired into both indices; links out to headless-fonts-differ.md,
bundled-fonts-cross-platform.md and canvas-fingerprint-noise.md.
2026-07-28 03:19:15 +02:00
feder-cr 4314909230 docs: front matter on the 32 pages that predated the format
Every one of these pages previously inherited the repository's own blurb as
its meta description on the live site, since jekyll-seo-tag falls back to
that when a page has no front matter of its own - the same problem the
format was adopted to fix on 2026-07-27, just not yet applied backwards.

Title is the existing H1 verbatim in every case (checked programmatically:
title equals H1 on all 32, all H1s already under the 62-character limit).
Description is a new sentence or two written from each page's own opening
hook rather than a copy of its first paragraph, since the two placements
serve different readers: the opening paragraph is for someone already on the
page, the meta description is for someone deciding whether to click.

No content changes to any page body.
2026-07-28 03:12:26 +02:00
feder-cr 283a959ab0 docs: the font architecture article, not just the symptom
headless-fonts-differ.md explains why fonts differ across machines. This is
the fix we actually shipped, and it earned its own page rather than a bullet
in that one: filtering a host's font list still leaves the host's rendering
underneath, which is a contradiction with extra steps rather than a fix.

The real content is the part nobody else documents - making three unrelated
font backends (DirectWrite, fontconfig, CoreText) agree on the same family
list from the same bundled files, without a shared enumeration mechanism
between them. Two details mattered more than the manifest format itself:
family naming has to follow the same precedence order a real OS uses, and
multi-face font files can't be indexed positionally across platforms since
face order isn't guaranteed stable everywhere.

Named four open gaps rather than claiming the surface is closed: one
backend's local() lookup isn't wired to bundle-only, one's per-glyph fallback
for an out-of-set character reaches the real host catalogue, one's system-ui
generic keeps a narrow live host query, and one platform's font-substitution
table stays host-live regardless of mode. Consistent with treating a
suppressed signal as a fail rather than a pass - these are real, found,
unfixed seams, not something glossed over for the page to read cleanly.

Wired into both doc indices and the README guide list, linked from
vs-camoufox.md's existing font section and from webgl-renderer-strings.md's
"same shape of problem" framing.
2026-07-28 03:05:22 +02:00
feder-cr 91a16d2fbd docs: three more comparisons, each one at a different layer
Patchright, nodriver/undetected-chromedriver, and playwright-stealth complete
the "vs" set against the tools already named in Related projects. None of
these three competes with this project the way Camoufox does - each sits at a
different layer of the same three-level map this site already uses, so the
honest framing for all three is "different job" rather than "which wins."

Patchright patches the Chromium driver, not the browser, so its fixes
(Runtime.enable, Console.enable, the automation-controlled launch flag) are
CDP-specific and have no Firefox equivalent - not because we solved them, but
because the surface they patch does not exist on this engine. Its own docs
admit init-script timing attacks remain and it passes "most, but not all" of
the Playwright test suite.

nodriver and undetected-chromedriver are not Playwright tools at all - they
have their own API, which makes the real decision "leave Playwright or not,"
not "which produces a less detectable browser." undetected-chromedriver's own
README states plainly it does not hide an IP address or touch fingerprinting;
nodriver drops the chromedriver binary entirely and talks CDP directly.

playwright-stealth is the widest gap on this site: four lines of init script
against a browser fork. Its own actively maintained fork calls itself "a
proof-of-concept starting point" and says not to expect it to beat anything
but the simplest detection - which is an honest scope statement worth taking
at face value rather than arguing with.

Wired into both doc indices and README's guide list; added "Full comparison"
links from the three Related-projects bullets (Camoufox, Patchright, nodriver)
to their dedicated pages, and added playwright-stealth as a fourth
Related-projects entry since it did not have one yet.
2026-07-28 03:01:50 +02:00
feder-cr 45c4e44a7b docs: the comparison with the closest peer, written to be fair rather than to win
Camoufox and this project take the same approach on the same engine, so the
comparison is about how rather than whether, which makes it the only genuinely
comparable pair in this space.

Three decisions about how it is written. It says where Camoufox covers more,
which today is geolocation and Intl, and names our own weakness on the second
rather than omitting it. It marks two areas where their documentation does not
state something and I did not read their source, so no advantage is claimed
where none was verified. And it leaves out a personal circumstance of their
maintainer that turned up in the research, because that is not a comparison
point and using it would cost more credibility than it could ever buy.

The substantive difference is philosophy: rotate a plausible device from a
real-world distribution, or derive one deterministically from a seed. Neither is
better in the abstract, and the page says what each buys instead of picking.
Ours buys replay, which is why a failing run can be rerun exactly.

The ending is the honest one: run both against your actual target ten times and
compare the reports rather than the verdicts, because two hours of that beats
any comparison page including this one.
2026-07-28 02:35:16 +02:00
feder-cr 3d33d6edaf docs: Chromium is not Chrome, which is the argument the comparison was missing
Playwright ships open-source Chromium by default, per its own browsers
documentation, not Chrome. Chromium has no H.264, no AAC and no Widevine,
because those are the proprietary parts Google adds on top. Chrome, Edge, Brave
and Opera all have them, which is to say every browser a real person runs.

Two things follow. The capability set a default Playwright Chromium reports
belongs to almost nobody, so that cohort is largely developers and automation.
And the gaps are capabilities rather than values: a missing decoder is missing
machine code, so `canPlayType` for H.264 and a Widevine request through EME are
one line each and no property override can satisfy either.

Which makes the standard advice actively harmful here. Spoofing the user agent
to say Chrome converts an unusual browser into a provable contradiction on two
independent checks, rather than hiding anything. The branded channel closes the
gap and hands you a browser you do not ship, do not version and cannot install
in a slim container.

Firefox has no equivalent split, and that asymmetry is now a section in the
engine comparison, which argued four other points and not this one.
2026-07-28 02:19:34 +02:00
feder-cr c68c21896a docs: how we faked a WebRTC candidate badly, and the Firefox case with its cost
ICE candidate spoofing. Every guide stops at the address. A candidate is a
record with computed fields, it arrives at a particular moment, and it sits
beside other candidates that have to agree with it. We got the address right
immediately and shipped three other things wrong.

The priority was hardcoded to 0xFFFF, which is not an unusual value but one the
real code cannot produce, since that stack emits a narrow band around 32256 to
32704. One integer in the SDP saying the candidate was not made by the browser.
The foundation drifted between runs and sometimes collided with the TCP host
candidate's, which is a grouping no real browser makes. And the synthetic
candidate was emitted instantly, describing a STUN server in the same room,
where published detection guidance for this exact technique names round-trip
timing as the way to spot it.

The fix in all three cases was the same shape: stop fabricating values and start
calling the function the browser already uses, replacing only the field that has
to change. Plus the failure that was worse than any of them, where gathering
died silently behind a proxy and produced no candidates at all while a
negative-only gate reported success.

Firefox against Chromium. Four structural arguments for Firefox, including that
it has no CDP and no Client Hints pipeline, each stated with the half the
comparisons omit: our own automation layer had four artefacts of its own, and
not implementing Client Hints means you cannot then claim to be Chrome. Then
the argument against, which is that Firefox is a small share of real traffic and
rarity is what the rest of this documentation warns about. Anyone selling a
Firefox tool without saying that is not being straight.
2026-07-28 01:43:28 +02:00
feder-cr 80b790995b the suite-collapse tripwire was counting a suite that moved
All 419 tests passed on every leg; the CI step that failed is the guard that
refuses a run where the selection dropped most of the suite - `if passed <
600`. It was right to fire: it cannot tell "the tests moved" from "the
selection collapsed", and that is exactly why it exists.

The number was stale. 322 tests moved to invisible_core on 2026-07-27 -
they covered core modules through this package's back-compat shims, and six
real breaks in core code were surviving the core's own suite. Nothing
shrank; the tests are in the package they test.

Floor is 380 now, a little under the real ~420, with the reason written next
to it. It is a tripwire, not an assertion about how many tests exist.
2026-07-28 01:22:27 +02:00
feder-cr 642707c785 readme: fold the search section into Related projects
"If you got here from a search" was a list of queries dressed as prose, which
reads as bait even when the content under it is honest. Removed.

Related projects now carries the same information as a real section: the
neighbours split by engine, each with a sentence on what it is actually for and
how it differs, rather than a list of things someone might have typed. Patchright
and nodriver were named only in the removed block and now have entries of their
own on the Chromium side.

The keywords survive because they belong in the descriptions anyway. What does
not survive is the framing that announced them.
2026-07-28 01:21:59 +02:00
feder-cr 5e0830f3a3 docs: contextual links inside the prose, where they were only in the footer
Measured before changing anything. Excluding the See also block, the median page
had 0.8 internal links per thousand words and 26 of 54 had exactly zero, with
every link sitting in the footer. The guidance on this is blunt: contextual
links inside prose carry far more weight than boilerplate blocks, and the
working range is two to five per thousand words.

Thirteen pages fixed in this pass, each one linking a concept the sentence
already named. The rule applied, and the reason nothing else changed: if a link
needs a sentence written around it, that is stuffing rather than linking, so the
anchor text had to exist already. Two intended edits were skipped for that
reason when the phrasing did not match.

Median is now 1.0 and pages at zero are down to 13. The rest are queued rather
than forced.
2026-07-28 01:18:40 +02:00
feder-cr 0a21a8857a the same rule, applied to the test helpers - and two tests with hidden preconditions
Reverting the pin import fixed one name and I stopped there. make_venv,
run_checked and venv_python have the same shape: added to
invisible_core.testing today, not published, and this package pins the core
exactly - so CI resolved the index and failed at collection on all four legs.

Local again, with a note saying they come back out in the same change that
moves the pin. The two hook-wiring assertions skip with a reason rather than
failing, and the skip clears itself when the pin moves.

Running the suite the way CI does surfaced two more, both hidden
preconditions rather than the change:

test_seal_floor copied `pin.py` out of the INSTALLED core to build its stub.
A core published before today has `_pin.py` only, so eight tests died before
the stub existed. It copies whichever shape is there now, and asserts it
found one.

test_it_does_not_touch_a_process_with_a_different_token asserted that the
surviving session is exactly one pid. On Windows a venv's python.exe is a
redirector that starts the real interpreter as a child, so a spawn there is
two processes and both carry the token. It passed on CI and on a system
Python and failed from a venv - a shape users have, and the shape this
package's own e2e tests build. It now asserts what the docstring says: the
other session is still findable, and nothing reaped answers to its token.

Verified against the PUBLISHED core in a bare venv: 421 passed, 2 skipped.
2026-07-28 01:14:56 +02:00
feder-cr a630a23173 docs: the two worker surfaces, and the state that survives clearing cookies
Service workers. Two facts the privacy write-ups on this topic do not cover
because they are about automation rather than tracking. A registration and its
cache are a separate store with a separate lifetime, so clearing cookies leaves
them, and a reused profile carries workers registered by whoever used it last.
And blocking them, which several stacks do by default because an intercepting
worker complicates network interception, produces a browser that never
registers one, which a site using them can see. Also states plainly what
partitioning is: it separates a third party's view across sites, and says
nothing about two of your own sessions sharing a profile.

Web Workers. The clearest demonstration of why page-level patching has a
ceiling, and now with evidence rather than assertion. A worker is a separate
realm, so a redefined navigator property reports the real value there, and the
disagreement is a tampering finding rather than a hardware one. OffscreenCanvas
takes that to the most-used surface there is: protection that hooks the HTML
element's methods misses it entirely, because no element is involved. Engines
have shipped fixes for their own gaps in worker canvas protection, which is what
tells you the technique is in use.

Both articles end on the same two-line test, which is the one we would run first
on anything claiming to be undetectable, including this project.
2026-07-28 01:11:47 +02:00
feder-cr 3a79606701 docs: what a context does not isolate, and the permission that switches off WebRTC
Proxy per context. This is the pattern every guide recommends for rotating IPs,
and the consequence is never attached to it: a context isolates storage, not
hardware. Five contexts on five proxies share one canvas hash, one GPU, one font
set, one audio profile and one screen, because there is one browser process. So
you paid for five addresses and got one identity, and that identity is now in
five countries at once while the constant fingerprint links the sessions
together. It also creates the timezone mismatch on purpose: a zone resolved once
at launch belongs to the launch-time exit, so every later context carries the
wrong one. The page is fair about when the pattern is right, which is often, and
precise about when it is not.

Permissions. The two-line headless check that compares Notification.permission
against the Permissions API is the ask-twice pattern again, which is why it
outlived the bug that made it work. Beyond the mismatch, the set of states is
itself a fingerprint, and the automation instinct to grant everything so dialogs
stop interrupting produces a browser almost nobody has. On Firefox it does worse
than that: a persisted camera grant disables two WebRTC address protections for
that origin in every future session on that profile.
2026-07-28 00:52:16 +02:00
feder-cr ed942ac5ef an exact pin means this package may only use what is PUBLISHED
Same mistake as the manager, same day. I moved this package to
invisible_core.pin in the change that renamed the module in the core's tree,
and that rename carried no version bump - so the index still serves a core
with _pin.py and no pin.py, and this package declares invisible-core==
exactly.

CI red on both legs. The import floor said the right thing; the sequencing
was wrong, and I verified the message rather than the consequence.

Reverted to invisible_core._pin. Verified against the PUBLISHED core in a
bare venv - the pin floor loads and resolves the declared version - rather
than against the editable checkout, which cannot see this class of failure
at all.
2026-07-28 00:28:32 +02:00
feder-cr f7963bbb5f docs: how to test properly, and the headers a page-level patch can never reach
Testing. Most people open a suite, read the verdict and stop, and that method
cannot tell a working feature from an absent one. Ours could not either: the
WebRTC gate asserted that nothing leaked, which a dead feature satisfies
perfectly, so it stayed green while the shipped browser returned nothing on
every proxied page. The page turns that into a method. Assert presence rather
than absence, diff against a stock browser on the same machine instead of
reading a score, run it where you deploy and through the proxy you deploy with,
repeat it because the domain is not deterministic, and open the screenshot. It
also says what none of the suites cover, so a clean sweep is not mistaken for a
clean session.

Client Hints and Sec-Fetch. Three copies of one identity in Chromium, generated
from the same internal state, which is why changing the user agent string and
nothing else is caught by comparing headers that were sent before any script
ran. Firefox implements none of it, and that cuts both ways: nothing to keep in
sync if you are Firefox, and an unfixable contradiction if you claim Chrome.
Sec-Fetch is the less discussed half and describes how the request was
initiated, including whether a user gesture triggered it, which connects to the
activation an automation driver can announce by accident.
2026-07-28 00:16:40 +02:00
feder-cr a4dd630790 docs: the agent ecosystem in one verified page instead of eight thin ones
Checked five frameworks by reading their source rather than by star count, and
the result argued against the plan that produced it.

browser-use, Stagehand and Skyvern all drive Chromium over CDP, which Firefox
does not implement in the way those drivers expect, so an executable path
pointing at a Firefox build produces nothing. Stagehand documents the option and
still expects Chromium. crawl4ai is the one Playwright-based tool where Firefox
is genuinely selectable and it has no field naming a binary, so it is one field
away rather than one protocol away. Maxun exposes neither, which for a no-code
product is a decision rather than an oversight.

Writing that as eight separate articles would have been eight pages concluding
the same thing, which is exactly the padding the format is supposed to prevent.
One page with a section per project still matches each project's own query, and
it can carry the part that actually matters: none of this is what blocks most
people. Every machine-level tell is identical whichever framework was picked,
and a container has all of them at once.

Also records the agent-specific rhythm, which explains blocks arriving after a
few actions rather than at first load, and the MCP route, which is the one
combination that does accept a different engine today.
2026-07-28 00:08:32 +02:00
feder-cr e4bef53d1a docs: the two largest Playwright-driving projects, verified from their source
Both were checked before writing, and the check changed both articles.

browser-use, 107k stars. Its BrowserProfile does expose executable_path,
channel, user_data_dir, proxy, args and headless, so there are real levers. But
chrome.py is entirely Chrome executable and Chrome profile handling and the
channel type is a Chromium channel, so a Firefox binary is not a drop-in and the
page says so rather than inventing a workaround. What it adds instead is the
signal specific to this class of tool: an agent pauses for model latency, does
not move during the pause, and lands dead centre on its targets, which explains
blocks that arrive after a few actions rather than at first load.

crawl4ai, 75k stars. BrowserConfig accepts browser_type firefox and has no
executable_path at all, so you get Playwright's managed build and a patched
engine has no supported way in. Their own stealth mode is playwright-stealth,
which their documentation admits does not support Firefox, so that combination
is largely inert. The adapter seam does exist, on the crawler strategy rather
than on the config, and it is undocumented for custom adapters. Records the one
upstream field that would fix it properly, and the process-wide browsers-path
substitution that works today with its fragility stated.

Three of the six candidates from the star list turned out not to use Playwright
at all, which is why each of these starts with reading the source.
2026-07-27 23:57:36 +02:00
feder-cr 26acc297a4 ask the core for what it exports, not for its private modules
This package named eight of the core's modules directly, five of them
private, and reached four more through its own back-compat shims. Almost
every name it wanted was already exported by invisible_core itself, so it
asks for it there now. Private-module dependency across both consumers went
from 23 names in three modules to 6 in two.

Twenty imports in this package's own source went through the four-line
shims - `from .prefs import ...`, `from ._geo import ...`. Those shims exist
so that somebody's `from invisible_playwright import prefs` keeps working
after the 2026-07-03 split; production code depending on them means they can
never be removed, which is the opposite of what a back-compat layer is for.
It is also the same confusion that put 322 tests in this suite instead of
the core's. test_suite_boundaries.py now covers the source as well as the
tests, and was driven against a shim import put back to check it fires.

invisible_core._pin is invisible_core.pin. The import floor already reports
a core too old to carry it with the right message and the right remedy, so
this costs a stale environment nothing but a clear error.
2026-07-27 23:45:16 +02:00
feder-cr 15d68ffe44 docs: four more, in the structured format, each with its own meta description
CSS fingerprinting. The one surface that operates below every layer people work
at: a stylesheet can branch on pointer type or colour scheme and report the
answer by loading a different image, with no script to patch. Two traps follow.
Firefox resolves media-query sizes through different code than screen.width, so
spoofing one side leaves them contradicting each other. And the CSS system
colour keywords resolve through the host's own theme, so a Linux machine
claiming Windows returns the wrong palette from one getComputedStyle call. That
palette is pinned here because a detector was hashing it.

Codecs. canPlayType identifies the build and the platform, and MediaCapabilities
adds a field nobody checks: powerEfficient reports whether decoding would be
hardware accelerated, which is another way of asking whether this is a person's
computer or a server.

BFCache. The driver disables the back/forward cache, so pageshow.persisted is
always false and every back navigation is a full reload, which no consumer
browser does. Enabled by default here, with the go_back timeout that costs.

User agent. Argues against what every ranking result recommends. Rotating the
string does not rotate the browser: the canvas hash, the fonts, the renderer and
the handshake are identical between your "different" sessions, so rotation
produces contradictions and a stable identifier linking the sessions at once.
2026-07-27 23:09:31 +02:00
feder-cr 4414a4fb48 docs: persistent profiles, and the first page with its own meta description
Three traps behind a user data directory. The seed has to be paired with the
directory, or the session has weeks of history on hardware that changed
overnight. A stored camera permission switches off two separate WebRTC address
protections for that origin in every future session on that profile, and it
counts a persisted grant rather than an active capture, so a debugging call from
months ago still applies. And a written profile has to be internally consistent
about its own age.

This is also the first page carrying front matter, so it gets a description of
its own instead of the repository blurb every page currently shares. The title
is set identical to the heading so the existing mechanism does not regress,
which is the thing to verify before applying this to the rest.
2026-07-27 22:58:38 +02:00
feder-cr caa263fbf1 docs: five more, one keyword pass each
Execution context was destroyed. The most searched Playwright error, answered
everywhere as a race condition, which it usually is. It is also what you get
when a site redirects you to a challenge mid-evaluation, and the two are
indistinguishable from the stack trace. Four lines separate them: read the URL
and take a screenshot when it fires.

The debugger one is the story you asked for. Attaching a JS debugger calls
setIsDebuggee on every realm, which disables the optimising JIT and adds a slow
path to every native call. A commercial service was measuring 50,000 iterations
and reporting developer tools with none open. It was right. Four separate leaks
in the end, and the one that mattered was not timing at all: the driver warmed a
serialisation helper in the page's own realm before the page's first script,
touching JSON and two prototypes in a world that should have been untouched.
That one was proven by controlled experiment.

Browser extensions, which came out of a discussion question that had been
answered by a stranger talking about a different kind of extension entirely.

Headless versus headful, where the honest answer is that headlessness is rarely
what gets detected, and where this project's headless flag actually launches
headed and hides the window, three different ways by platform.

WebGL parameters, which contradicts the most repeated advice in the field. The
numbers do not vary by GPU on Windows, because ANGLE clamps them to the D3D
feature level, so a flagship and a 2012 integrated chip return the same block.
We randomised them once and got dropped from a detector's report for producing
a combination that does not exist.
2026-07-27 22:50:05 +02:00
feder-cr c341ada26a docs: why a fresh browser scores badly on reCAPTCHA v3
The score is weighted toward history, and a clean automated profile has none.
That is not a trick to be worked around, it is the thing being measured: a
session with no past is genuinely unusual, and the number reflects the base
rate.

The part worth publishing is the trap rather than the advice. A cookie Google
stopped issuing in 2022 is worse to carry than to lack, because absence has
innocent explanations and an anachronism does not. Anyone seeding a profile from
an article written before that date is adding a tell, and seeded history has to
be maintained rather than written once. Also covers the consistency angle
nobody checks: the consent record carries a region token that has to agree with
the timezone and the exit.

States the limits plainly, since scores invite overclaiming. Cookies are one
input, a seeded history is not a real one, and a demo key measures a risk model
that is not the one in production.
2026-07-27 22:24:26 +02:00
feder-cr e840df51cc docs: Docker, the machine's own numbers, and why an override carries its source
Docker. Every page that ranks for this is about making Playwright start in a
container: install the dependencies, add the fonts, use the official image. They
are right and they answer a different question. This one is about the container
that starts perfectly and still gets a different page, which it does in six
places at once, none of them about automation. It also says the thing nobody
says about the official image: everyone following that advice has the same font
set, which is a cohort rather than a disguise. And it separates the shared
memory crash from detection, because the two land in the same search and have
completely different fixes.

hardwareConcurrency, deviceMemory and storage quota. Three one-line reads that
are checked against each other rather than alone, plus the check that matters
most: ask again from a worker. A value patched on the page's navigator leaves
the worker answering honestly, and that disagreement is a tampering finding
rather than an unusual-hardware one. Storage quota is in here because it
approximates free disk space and almost nobody thinks of it as a surface.

toString. Why every JavaScript override carries its own source, why patching
toString creates the same problem one level up, and the four techniques that
find it. This is the argument underneath the whole engine-level choice, so it
also states plainly what that choice does not fix.
2026-07-27 22:19:58 +02:00
feder-cr 5a6cd97c9f docs: three more, each one going a layer below where the ranking pages stop
Same selection method: check the demand, then read who currently answers and
find the part they leave out.

Mouse movement. Every library that ranks draws a Bezier curve, and they are
right that teleporting is a tell. What none of them cover is that a path is made
of events, and an event carries fields that say where it came from: the trusted
flag, the pointer type, the pressure, the timing distribution. A perfect arc
delivered as untrusted events fails a one-line check. The curve is drawn in the
driver here; the fields are set in the engine, which is why that half is not a
library.

Canvas noise. The four-line check that catches per-call randomisation is well
known enough now that better tools seed their noise. The second check is not:
a small canvas filled with solid reference colours, read back to confirm they
are unchanged. Any per-pixel noise fails it, seeded or not, and it is scored as
masking rather than as unusual. We shipped without that guard. Also states the
cost of substitution honestly, which is that a readback filter cannot tell a
fingerprinting probe from a QR decoder.

Screen size. The relationships matter more than the numbers, and the one that
catches everybody is that available height must be smaller than height, because
real desktops have a taskbar.
2026-07-27 22:14:36 +02:00
feder-cr 93a89b1cba give the core its tests back, and gate the boundary
322 tests in this suite covered invisible_core, reached through the
four-line aliasing shims left behind by the 2026-07-03 split. They read
like wrapper tests because they lived here and the imports worked.

They were also the only thing covering six real behaviours. Measured, one
one-line break per core module, each suite run separately: cloak_prefs()
returning {}, SOCKS detection always False, the scheme never stripped from
a proxy server, _proxy_is_set always True, the locale always en-US,
get_default_args() injecting -headless - all six survived the core's own
suite and were caught here. So a broken core could be published with its
own gates green, and the suite that could see it belonged to a package on a
different release cadence.

The tests moved. Six files that genuinely test how THIS package uses the
core kept theirs and now import invisible_core directly rather than an
alias of it, which is what they always meant.

test_suite_boundaries.py is what stops the next one landing here. The shim
list is derived from the source - a module that rebinds
sys.modules[__name__] - because a hand-kept list is a shorter list that
drifts, which is the failure being fixed. test_backcompat.py is the one
file still allowed to import them: proving the shims resolve is a wrapper
claim, and the day that stops being true is the day the shims can go.

Its own first cut used glob instead of rglob and passed over tests/unit/,
which held the only cover get_default_args had anywhere - a scan that only
looks where you remembered to put things reports a clean suite.

Markers: one vocabulary across the three repos, --strict-markers on, and
the venv harness now comes from invisible_core.testing instead of a fourth
local copy of the same two functions.
2026-07-27 22:08:44 +02:00
feder-cr 514445ba03 docs: two pages where the top search results are giving wrong advice
Both chosen by checking demand and then checking who currently answers, not by
picking topics we felt like writing.

SOCKS5 proxy authentication. The guides that rank say to pass a socks5:// server
with a username and password and that this works. Playwright's own API reference
scopes both credential fields to HTTP proxies, in those words, while listing
SOCKS only under the server field, and the upstream feature request for SOCKS
authentication has been open since November 2021 with 49 votes and a
collecting-feedback label. Nothing raises when you pass them anyway, which is
why the wrong advice survives: it fails later, as a session that quietly went
out from the wrong address. Also documents the DNS half, since a SOCKS proxy
resolves names locally unless told not to, and no browser-side leak test shows
that.

TLS fingerprinting. Explains what the ClientHello gives away, why JA3 decayed
once browsers started permuting extension order, and why nothing at the page
level can reach a value that is sent before a document exists. Our position
here is unusual and worth stating plainly: the TLS stack is one of the parts we
deliberately do not patch, so the handshake is a real Firefox handshake rather
than an approximation, and the page says what that does not buy you.

Both carry the question block and both are wired into the two indexes.
2026-07-27 22:08:03 +02:00
feder-cr be3c6e90e3 docs: give every page the questions people actually type
On github.com these pages sit on a strong domain and are crawlable, and the full
text is served. What they cannot have is a title or a description of their own:
GitHub writes the title from the file path, and it fills the meta description
with the repository's own blurb, identically on all of them. So the body is the
only thing a search engine has to work with, and the opening prose is
effectively the description.

Two changes follow from that.

Every page now ends with a short block of real questions and short answers, in
the words someone would type. Twenty-two pages did not have one; four already
did, and those four were the model. They are answers, not keyword filler, and
several of them say plainly that the answer is no.

Five openings were too thin to serve as a snippet, the shortest being four
words. They now carry a sentence that says what the page settles, without
losing the line they opened with.

Also refreshed the version citations after checking them rather than assuming:
the documented API is all still present in 0.4.6 with compatible signatures, and
scrapy-playwright is still 0.0.48, so that one was already right.
2026-07-27 21:43:53 +02:00
feder-cr 195c962dde hand the pre-push rules over to invisible-core
This repo's hook was 257 lines of shell, 207 of which were identical to the
manager's. It is a 55-line stub now: find an interpreter, hand over stdin.
The rules live in invisible_core.hooks, which this repo pins exactly, so
there is one implementation instead of three copies that drifted nine ways.

What this repo wants gated is declared in pyproject under
[tool.invisible.hooks] - the suite, the core pin, and v* as the release tag
prefix. The block is required rather than defaulted.

scripts/install_hooks.py is new here. It lived only in the core, so this
repo shipped a hook that nothing armed and nothing checked was armed: a
fresh clone pushed with every gate inert and said nothing about it. A test
now fails in an unarmed clone.

test_the_pre_push_hook_gates_release_tags used to read the hook's text for
a module name and a tag pattern, which made it a copy of the shell it was
checking - red once when the hook swapped a glob for a regex, red again
when the policy moved out of the shell, both times against a correct hook.
It drives the real policy now and checks the gate ran for THIS project.

.gitattributes pins the hook to LF so a Windows clone cannot produce a
shell script its own shebang dies on.
2026-07-27 21:02:43 +02:00
feder-cr b7bfb36452 fix(hooks): set -e killed the hook on the gate's no-op exit
The gate exits 5 for ALREADY PUBLISHED and byte-identical - a no-op, not a
refusal, and what re-pushing a release tag legitimately produces. These hooks
run under set -e, so the non-zero exit aborted the script before $? could be
read: the push died with no message at all, and the block that exists to explain
a refusal never ran.

A gate that fails silently is worse than no gate. Wrapped in an if, which is the
form set -e tolerates.
2026-07-27 19:56:17 +02:00
feder-cr 763d74aba6 docs: close the last gaps in the internal link graph
Measured it: 14 of 26 pages had no incoming link from any other page, only
from the two indexes, which is a weak graph for a reader following a thread
and for anything crawling it.

Six of those were explainers, and each one had an obvious home. The audio page
belongs in the visitor-ID page's neighbourhood because the audio hash is one of
the components that ID is made of; the timezone page belongs next to the one
about preferences that silently do nothing, since that is why people arrive at
it. No explainer is orphaned now and no markdown link is broken.

The integration pages stay linked from their own index rather than from each
other, which is the right shape for them.
2026-07-27 19:42:56 +02:00
feder-cr c1911ac28f fix(hooks): the publish gate never actually ran
--project-root is a TOP-LEVEL option, before the subcommand. The hook put it
after, so argparse exited 2 and the block read that as a refusal: it printed
REFUSED with the gate never having executed. The first check of this wiring
passed on exactly that, which is worse than no gate - a hook that refuses for
the wrong reason is one people learn to force past.

It also treated exit 5 as a failure. 5 is ALREADY PUBLISHED and byte-identical:
nothing to do, not a refusal, and it is what re-pushing or back-filling a
release tag legitimately produces. The gate gives it its own code precisely so a
caller can tell it from 'the content changed under an unmoved version', which
must stay fatal.

The wiring test now asserts the option order and the exit-5 handling, because
both were invisible to the version that only checked the gate was named.
2026-07-27 19:41:34 +02:00
feder-cr e490078927 release: 0.4.6 - published through the gate, not through twine
The first release of this package that went out the way every release should:
the gate built the artifact, digested it against the ledger, uploaded the bytes
it had just built, and recorded them. A stale directory can no longer be the
thing that ships, which is exactly how 0.4.4 went wrong.

Requires invisible-core 18.6.0, which is where the gate lives.
2026-07-27 19:30:03 +02:00
feder-cr 5f78593e53 docs: the audio feature we removed, and why setting the timezone is not enough
Two more pages written out of our own notes.

The audio one carries a result that argues against the standard advice. We
added seeded noise to the rendered audio buffer, guarded it so it never
appeared in a buffer that should be silent, and a commercial service still
scored the browser as tampered. Isolating that one feature with a kill switch
moved the score from 0.4349 to 0.0564 on the same machine and the same
identity. So it ships off. The un-noised output is host-independent anyway and
matches what a real Firefox produces, and matching the crowd is the point when
the honest value describes a class of machine and not a particular one.

It also records the check that caught the first version: a detector does not
have to recognise your noise, it only has to ask a question whose correct
answer is nothing, and see whether it gets something.

The timezone one is about a complaint we have heard often, which is that the
setting appears to be ignored. Usually it is not: the timezone and the locale
are nine surfaces fed by different mechanisms, and a mismatch check compares
them with each other and with the exit address. Includes the Windows TZ
behaviour, which took us several rounds to stop misreading, and the argument
for failing a launch rather than falling back to the host zone when a proxy is
configured.
2026-07-27 19:18:32 +02:00
feder-cr 42a7af8750 chore(release): this package could be published with no check at all
Until now a release here was a bare `twine upload` of whatever happened to be in
a directory. That is how invisible-playwright 0.4.4 reached the index built from
a tree that predated the fix it was meant to carry - nobody had opened the
artifact - and a PyPI filename is never re-uploaded, so it is wrong forever.

The gate is invisible_core.release now: one implementation for all three
packages, importable because this package pins the core exactly, resolving WHICH
project it is gating from this project's own pyproject. The pre-push hook runs
it on a release tag and refuses on a non-zero exit.

What makes it work is not the digests or the ledger. It is that `publish` builds
and uploads WHAT IT JUST BUILT, so a stale directory cannot be the thing that
ships.

PUBLISHED.json is back-filled from the artifacts the index actually serves, each
file's sha256 checked against the digest the index reports before its manifest
was taken. Without it the gate has no memory, and a content change waves itself
through as "release 1".

The wiring tests assert that the gate is importable, that it recognises THIS
project rather than the core, that the hook names it, and that the ledger is not
empty. The gate's own 73 known-bad inputs live with the gate.
2026-07-27 19:11:44 +02:00
feder-cr 42467ddb57 docs: titles that fit in a search result, and README links that feed the site
Thirteen of the twenty-six headings ran past sixty characters, which is roughly
where a search result stops showing them, so the keyword sat in the part nobody
reads. They are now front-loaded and short, and the clause each one lost was
already in its opening paragraph. This fixes the sidebar at the same time,
since the theme takes its labels from the same headings.

The README's links to the pages now point at the site instead of at the file
view. The repo root is the highest-authority page we have and its README is
indexed with it, so those links are worth more pointed somewhere that has a
title of its own. The file view keeps GitHub's own title, which matches no
query, and it stays available for anyone reading in the repo.
2026-07-27 17:40:22 +02:00
feder-cr e5d7ac01a2 docs: give the site a real documentation theme, with search and the logo
just-the-docs, pinned at v0.12.0. It brings a sidebar, a client-side search
index built at page-build time, and a readable dark layout, and it runs on the
stock Pages compiler with no build step of ours.

No front matter was added to any page, and that is the point. GitHub Pages
always runs titles-from-headings, so each page's title tag stays the full
heading we wrote it for. A `title:` key would have taken that over and traded a
search-length title for a sidebar-length one, and it would have put a metadata
table above every page on github.com.

Logo and favicon now point at the project's own mark.
2026-07-27 17:33:53 +02:00
feder-cr 0993509fe3 release: 0.4.5 - 0.4.4 shipped without the import guard and cannot be corrected
0.4.4 reached the index built from a tree that predated the fix for the very bug
a user had just reported: an environment holding an older invisible-core fails
on the browser launch path with `cannot import name 'IANA_TO_POSIX_TZ'`, a
symbol name from a package whose version the reader did not choose.

A PyPI filename is never re-uploaded, so 0.4.4 stays wrong forever and the only
remedy is a new version. That is the cost of publishing an artifact nobody
opened first.

0.4.5 is 0.4.4 plus the guarded import: it states which core version this build
needs, keeps the original error inside the message for debugging, and ends with
the command that fixes it. The artifact was opened and asserted on BEFORE the
upload this time, not after.
2026-07-27 17:29:50 +02:00
feder-cr d10452a8ad fix: an old core failed with a symbol name instead of a version
Reported by a user within minutes of the change that caused it, on the browser
launch path:

  ImportError: cannot import name 'IANA_TO_POSIX_TZ' from 'invisible_core'

_session took two core symbols with a bare module-level import. Both had existed
for about ten minutes. Any environment holding an older core - and the pin
autofix puts older cores back on its own - died with a message naming a symbol,
from a package whose version the reader did not choose.

The pin machinery exists to explain exactly this mismatch, and a module-level
import walks straight past it. That is the actual defect: not sharing the
timezone table with the core, but taking a NEW symbol without making the failure
fail like the version requirement it is.

It now says which core version this build needs, keeps the original error inside
the message for whoever is debugging, and ends with the command that fixes it.

Nothing published was affected: 0.4.3 does not import these names. It is people
running from a checkout - which is who reported it.

The probe drives a real interpreter against a real core with the symbols
stripped, because the thing under test is what happens at import time; a mocked
ImportError would only prove the except branch formats a string. Mutation-tested:
restoring the bare import is red.
2026-07-27 17:07:07 +02:00
feder-cr 725a99f56f docs: publish the docs folder as a site, and give the index a real title
The Pages defaults already take each page's title from its own first heading
and rewrite the relative .md links to the built .html, so both sets of links
keep working. Checked live before writing any config. What was missing was a
sitemap and an index page whose heading was the word "Documentation", which
would have become the title tag of the landing page.
2026-07-27 17:01:24 +02:00
feder-cr 40ff6526a3 docs: publish the docs folder as a site, so each page has its own title
Turning on Pages without this would give all 23 pages the same title tag,
which is the opposite of the point. titles-from-headings takes each title
from the page's own first heading, relative-links keeps the existing .md
cross-links working in both places, and the sitemap lists the set.
2026-07-27 16:50:46 +02:00
feder-cr 1734797148 docs: WebRTC through a proxy, and why getVoices() comes back empty
Two pages written from our own notes and aimed at the questions people
actually type.

The WebRTC one argues against the advice every other guide gives. Turning
WebRTC off does stop the leak and produces a browser with no ICE candidates
at all, which is a much more specific thing to have said about yourself than
an IP address. It also records that the IPv6 preference everyone still
recommends is not read anywhere in the gathering path of current Firefox, and
that behind a SOCKS proxy gathering can fail for a reason unrelated to
WebRTC: the default-route probe needs direct connectivity and does not have
it. The gate story is ours. It asserted only that nothing leaked, which a
dead feature satisfies perfectly, so it stayed green while the shipped
browser returned nothing on every proxied page.

The voices one separates the common async question from the real one. The
list comes from the operating system, so it answers which OS you are on and
whether the machine is a desktop or a server. It also explains why filtering
the OS list is the wrong shape: it works on Windows and returns nothing on
Linux, which is the host it was written for.
2026-07-27 16:30:17 +02:00
feder-cr f3102de8fd docs: a page on the GPU you claim versus the pixels you draw, plus a language pass
Adds renderer-string-vs-render.md, written from our own notes: a detection
flag whose first explanation was wrong, killed by a ten-seed sweep across
three vendor buckets, an A/B over two engine builds and a run on a second
operating system that came back clean. The cause was the software rasterizer
on headless Linux contradicting the GPU the profile claimed. It also covers
the second flag in the same reports, which turned out to be our own test
harness hammering one exit address.

The rest is a pass over the existing pages to vary phrasing that had become
repetitive across the set: "rather than" appeared 63 times over 21 pages and
is now 23, and the four detector footers no longer share one sentence shape.
No technical claims changed.
2026-07-27 16:22:52 +02:00
feder-cr f6450a98cd docs: the per-platform font sets and how the measurement works, folded in
The remaining mapped query was fonts across Windows and Linux, and it overlapped
this page far enough that a second one would have been a near-duplicate competing
with itself. Same call as the injection-timing section a few commits ago.

What was genuinely missing is now here: the measurement technique itself, with the
probe, since there is no API that lists fonts and everyone says "enumeration"
anyway; the families each platform actually ships, which is what makes the set
platform-shaped; and the container case, where every probe returns the fallback
width and the detected set comes back empty, which is its own strong signal because
no real desktop has one.

Also notes that the order of the list can carry information, since some
implementations return fonts in system order, which reflects how they were
installed. Two machines with identical sets can still differ in sequence.
2026-07-27 14:23:04 +02:00
feder-cr 869a987d4a docs: why a FingerprintJS visitor ID changes
The answer is one line of their source: the ID is x64hash128 of the canonical
string of about forty-one components. There is no partial match, so one component
moving moves the whole identifier as if everything had.

Listed the components from src/sources and grouped them by how likely each is to
move under a real person, which makes the instability self-explanatory: docking a
laptop moves screen_frame, turning on dark mode moves forced_colors, installing any
application can move fonts, a browser update moves vendor_flavors and
user_agent_data, and travel moves three at once.

Then the part that matters for automation, which points the opposite way from the
usual assumption. An ID that changes between runs of the same configuration is a
signal rather than safety: real machines do not transform between page loads, and a
tool adding fresh canvas noise per read rather than deriving it from a fixed seed
produces exactly that instability and is detectable by it.

Separates the open-source library from the commercial one explicitly, because
passing one is not passing the other, and a claim about defeating browser
fingerprinting that does not say which was measured has said nothing.
2026-07-27 14:20:19 +02:00
feder-cr 591c9eb10c docs: what BotD actually detects, and why most of it is not about bots
Enumerated its twenty detectors from src/detectors and read the comparison logic
rather than the README, which is where the point is. Exactly one of the twenty,
webdriver, is the check everyone knows. A handful look for named tools. The rest
ask which JavaScript engine you really are and compare that against what your user
agent claims.

Two are quotable and settle the argument on their own. eval_length: if
eval.toString().length is 37 and the engine kind is not WebKit or Gecko, that is a
bot. product_sub: a browser claiming Chrome, Safari, Opera or WeChat must report
navigator.productSub of 20030107, where Firefox reports 20100101.

So the conclusion is uncomfortable for the most common advice in this space.
Spoofing a user agent alone is worse than not spoofing it, because the string is
the only part you changed and four other engine-intrinsic values now contradict it.
Being a real instance of what you claim passes this entire class for free, since
those values are not claims at all.

Ends by saying what passing does not buy: nothing about GPU plausibility, fonts
against platform, or timezone against IP, none of which BotD looks at.
2026-07-27 14:16:46 +02:00
feder-cr 2edefa2e24 release: 0.4.3 - the async path leaked, and the guard was adopting half a tree
Two defects, one of them not the one I went looking for.

THE KNOWN ONE. The lifetime guard added in 0.4.0 reached the sync entry point
only. Verified against the artifact the index serves: async_api.py in the
published 0.4.2 contains ZERO references to _reaper, _session_token,
_lifetime_guard or _bind_process_tree, while main has ten. So every async user
on Windows kept the entire leak through three releases, and the changelog told
them it was closed. That line now says which entry point it reached.

THE ONE THE MEASUREMENT FOUND. With the async fix in place I killed a runner
mid-session and counted browsers still carrying that session's token, which is
the only thing that settles this claim - 744 passing tests did not, because
nothing enters the context manager. Result: sync 0/0/0/0, async 2/0/0/2.

JobObjectGuard.bind had `if bound: break`: it adopted whatever existed at the
first instant anything existed, then returned. Windows adds later CHILDREN of a
job member automatically, but firefox.exe is a launcher stub that exits, so the
real browser is re-parented away from whatever got adopted, and anything
arriving a moment later escaped. The same code on both APIs; only their timing
differs, which is exactly what makes a race look like a working feature. It now
scans until a full pass adds nothing for a settle window. After: ten sessions,
zero survivors on both paths.

THE GENERATOR, not just the instances. The parity test that was supposed to
prevent this looped over a hardcoded three-name tuple, so it could only catch
the bug that had already happened. It derives the expected set from the sync
class now: a member added there and forgotten on the other side goes red with
nobody editing the test. The env-var check is stronger still - NEITHER class may
name an INVPW_/STEALTHFOX_ variable, they all live in _session - because the
first version credited the shared module to both and the mutation that puts
INVPW_TRUE_HEADLESS back into async alone SURVIVED it.

And INVPW_TRUE_HEADLESS, a documented variable, was read in the async class
alone: it applied or did not depending on whether you wrote `with` or
`async with`. Both now read it through _session.

_session.py holds what the two share: prefs, the launch environment, the
IANA-to-POSIX table (which async imported FROM launcher for no reason other
than that is where it was written first). _build_prefs was a method on one side
and the same twenty lines inlined on the other, identical calls in identical
order, differing only in their comments.

Also deletes _humanize_max_seconds, which had had no caller in src/ since the
cursor engine moved into this package while six tests kept it alive. Those
tests now assert the function the live path calls, plus one that ties it to the
arming path so they cannot drift back into pinning something dead.

Mutation-tested: the async losing the reaper, the knob going back to async-only,
a member appearing on one side, and `if bound: break` returning are all red.
748 tests green.
2026-07-27 13:55:56 +02:00
feder-cr b9b4fbf1d1 docs: the timing failure, folded in rather than given a tenth near-duplicate page
The mapped query list had a separate title for injection timing, on a phrasing
close enough to this page's that a second page would have split one answer across
two documents and competed with itself.

The technical point was genuinely missing though, and it is the one that explains
the most confusing symptom in this area: a patch has to run before the page's own
scripts, so checking by hand in a console always succeeds, and a page whose first
line captures the value keeps the original forever. You cannot un-read a value that
was already read. Headed and headless differ here not by injection order but by
timing, which is why a race won on a warm laptop is lost on a loaded CI box.

Ends where the page already pointed: a value decided inside the engine has no race,
because there is no moment before which it was something else.
2026-07-27 13:48:17 +02:00
feder-cr dacdb8b0c6 docs: Firefox preferences that silently do nothing
Five reasons in the order they actually happen, and the first one is ours. Firefox
has no schema for preferences: about:config will store my.invented.pref and nothing
reads it, nothing complains, and it sits in the profile looking exactly like one
that works. A typo, a rename after an upstream bump, or a pref that only exists in
a build you are not running all produce the same silence.

This repository shipped that. Seven tests pinned preference names the engine never
reads, asserted the names were written, and stayed green while the engine ignored
all seven. So the page states the rule that follows: checking a preference was set
is not a test, the check has to be that observable behaviour changed, read back
from the page rather than from the profile.

Then the four less interesting ones: build-time prefs that are compiled in,
user.js winning over prefs.js on every launch while prefs.js is rewritten on exit,
enterprise policy overriding both, and a page-level shim answering after the
browser already reported the value.

Ends by owning the trade rather than defending it. Delivering the whole fingerprint
through preferences is what makes this page necessary, and it is also what lets one
binary be any machine without being rebuilt.
2026-07-27 13:45:42 +02:00
feder-cr 219f4246a0 docs: the test-runner page said three in four places while listing four
Folding Nightwatch in left the title, the opening claim, the shared setup line and
the WebdriverIO superlative all still counting to three. Fixed, along with the two
places the index and the top-level README described the same page.

Small, but a page that miscounts its own contents is the kind of thing a reader
notices before they notice anything it says.
2026-07-27 13:42:32 +02:00
feder-cr 54c68fa3c4 docs: Nightwatch and SeleniumLibrary, folded in rather than given thin pages of their own
Both verified from source. Nightwatch reads firefox_binary and calls setBinary,
and builds FirefoxOptions from the declared capabilities, so moz:firefoxOptions
prefs carry the profile: both halves through standard WebDriver. SeleniumLibrary
reaches both too, but through two different string-format arguments, options= for
binary_location and ff_profile_dir= for a chain of set_preference calls.

Folded into the pages they belong to rather than added as separate files. Two more
short pages would have split the same audience across four documents and made the
index longer without making anything easier to find.

The SeleniumLibrary section includes the generator one-liner, because that argument
takes several hundred preferences as a semicolon-separated string of calls and
nobody is typing that. It also says plainly that Browser is the better library, and
why the section exists anyway: a suite already on SeleniumLibrary will not be
rewritten for a browser engine and should still be able to use one.
2026-07-27 13:40:05 +02:00
feder-cr 15b1ec3741 docs: ScrapeGraphAI does not fit, and the reason is not the one the shortlist assumed
Went to write the guide and read the loader instead. The passthrough is real:
browser_config is **kwargs and firefox.launch gets it, so the binary and the
preferences arrive. Then line 252, and again at 365, calls
Malenia.apply_stealth(context) unconditionally, with no flag anywhere in the file
to turn it off.

So the framework layers undetected_playwright's JavaScript patches on top of an
engine that has already answered the same questions natively. That is the exact
failure three of the explainer pages describe: two components independently
deciding who this browser is, disagreeing, and the disagreement being louder than
either being unusual alone.

Recorded in the does-not-fit list with the line numbers rather than written up as
a guide with a warning at the bottom. A page that says "here is how, but it fights
itself" would get skimmed to the code block.
2026-07-27 13:37:09 +02:00
feder-cr 41dd303f08 docs: an index for docs/, and the pages now link each other
Nineteen pages had accumulated with nothing collecting them, and eight of the ten
explainers linked nowhere at all. GitHub renders docs/README.md when you open the
folder, so that was a free landing page nobody was standing on, and pages that
link nothing are read once and left.

The index carries a short closing section on the three ideas that turn up on
almost every page, because they had been restated eight times without ever being
said once in one place: consistency beats rarity, suppressing a signal is a
signal, and server tells are not automation tells and need different fixes.

Verified every path it claims, including pinning.md, rather than listing what I
thought was there.
2026-07-27 13:29:36 +02:00
feder-cr ebc0325448 docs: how CreepJS decides you are lying, read from its source
Read src/lies/index.ts and the module layout rather than the rendered page,
because the method is the story and the number is not. Four techniques, all
quotable: a pristine reference pulled from a fresh iframe's contentWindow, which
your page-level patch never touched; stack-trace matching on /at Function.toString/
to catch a replacement hiding behind a patched toString; descriptor and prototype
walking that notices an override moved off the prototype; and the one worth the
page, that blocking its probe is itself written down, with lie names
"client blocked phantom iframe" and "client blocked behemoth iframe" in the source.

That last one is the generalisable principle and it is one this project already
holds internally: suppressing a signal is a signal. A browser that refuses to
answer is louder than one that answers plainly, because refusing is rare.

Which explains why the two obvious strategies score badly. Overriding everything
generates a lie record per surface, so effort spent hiding actively hurts. Turning
on maximum privacy protection lands you in the resistance module, which exists to
identify exactly that.

Stops short of claiming any tool is undetectable. The claim is narrower and
checkable: this category of check bites on the seam between a patch and the
runtime, and everything else stays exactly as hard as it was.
2026-07-27 13:15:41 +02:00
feder-cr 3d66b6d216 docs: what sannysoft actually checks, read off the live page
Fetched the page and enumerated its element ids rather than writing from memory,
which is how the interesting part surfaced.

Three of the canvas tests are run twice, in the page and inside an iframe, and the
results compared: canvas3-iframe, canvas4-iframe, canvas5-iframe. That is not a
fingerprint test, it is a consistency test, and it is aimed exactly at how most
anti-fingerprinting works. A script injected into the top-level document is not in
the iframe's execution context, or seeds its noise differently there, so the two
readings disagree where a real browser's never do. The same shape appears in
media1 versus media and in the battery rows.

So the honest verdict on the famous table is that it describes headless Chrome as
it behaved around 2018 and every tool fixes it on day one. Passing proves you are
not running an unmodified headless browser and nothing else. Two of the eleven rows
still carry weight and neither is about automation: the WebGL strings, which name
your hardware, and Permissions, which is the only row that cross-checks two sources
rather than reading one value.

Says plainly that a green table is worth what it sounds like, and points at the
canvas section as the part to actually read.
2026-07-27 13:01:30 +02:00
feder-cr 5248f32f83 docs: three test runners, and the one that cannot carry the profile
Checked each from source rather than assuming they were equivalent, and they are
not. Cypress builds moz:firefoxOptions with binary and prefs, so both halves are
reachable through --browser and the before:browser:launch hook. WebdriverIO takes
both directly as a W3C capability, the cleanest of the three. TestCafe has no
Firefox preference mechanism at all, searched and found nothing, so it carries the
engine and nothing else, and the page says so in bold rather than leaving it to be
discovered.

None of the three mentions this project, checked first, so all three are new.

The Cypress trap is worth the page on its own: setting userAgent in the config
makes Cypress write general.useragent.override into the same preference set the
profile uses, so it silently wins and produces a browser contradicting itself. The
line number is in firefox.ts and the fix is to leave it unset.

Ends by saying why you would use this engine in a test runner at all, which is a
realistic rendering and font stack, not evasion. A suite running against your own
staging environment does not need an identity and should not pay for one.
2026-07-27 12:44:57 +02:00
feder-cr 79640281c8 docs: Crawlee for JavaScript, and the cost of a Python dependency in a Node project
Verified from playwright-launcher.ts: launcher takes a BrowserType, its own
comment suggesting require('playwright').firefox, and launchOptions is Playwright's
LaunchOptions, so executablePath and firefoxUserPrefs both fit. They do not mention
this project anywhere, checked first, so this is a new target rather than a page
correcting itself.

Says the awkward part in the second paragraph rather than burying it: the engine
and the identity are produced by a Python package, so a Node project takes a Python
dependency, and if that is unacceptable the answer is a Chromium tool rather than a
workaround.

useFingerprints: false gets its own section because Crawlee's generator is good and
that is exactly the problem. Two independent opinions about who this browser is do
not average out, and a generated header set disagreeing with an engine-level
fingerprint is louder than either being slightly unusual alone.

Flags the trap specific to this framework: rotating proxies across countries is
normal in Crawlee, and a prefs file carries one timezone, so the browser will
contradict most exits unless the file is selected per region.
2026-07-27 12:38:42 +02:00
feder-cr d78897e63a docs: Robot Framework Browser, the cleanest fit of the set
New Browser takes executablePath and firefoxUserPrefs as documented named
arguments, verified in Browser/keywords/playwright_state.py. No subclass, no
provider, no dictionary to reverse-engineer: both halves are first-class.

Checked first whether they already say anything about this project, as the last
two integrations turned out to. They do not, so this one is genuinely new rather
than a page correcting itself.

Two Robot-specific traps are called out because the syntax invites them. New
Browser defaults to Chromium, so pointing executablePath at a Firefox build
without passing firefox first fails confusingly. And New Context offers
timezoneId, locale, viewport and colorScheme, each of which is a value that has to
agree with the profile once you set it by hand rather than being derived from it.

Includes the inline variant that reads the prefs straight from the installed
package, since a checked-in JSON file eventually drifts from the engine it was
generated for.
2026-07-27 12:06:48 +02:00
feder-cr 8d4e817f19 docs: CodeceptJS integration, which carries both halves
Verified from lib/helper/Playwright.js on 4.x: _getOptionsForBrowser returns
{ ...config[config.browser] }, spread into playwrightOptions, so a firefox block
forwards executablePath and firefoxUserPrefs together. Both halves, no subclassing.

Their own Playwright docs already mention this project as an example of pointing
at a custom executable, so this page is the wiring that mention implies rather
than a pitch.

Says what the JavaScript route gives up, same as the other non-Python pages:
humanised pointer paths, which the Python driver draws from the seed, and timezone
and locale resolved from the proxy exit at launch. And flags the CodeceptJS
specific trap, that userAgent sits right next to the options you do want, so it is
easy to override the one value that must not be overridden.
2026-07-27 12:01:19 +02:00
feder-cr 1c29b311f3 fix(tests): the taskbar fallback asserted 40, which is the value the engine never returns
Caught by the pre-push gate on a docs-only push, against core 18.3.0.

The core states the reason in place: nsScreen.cpp:114 returns {0, 0, w, h - 48},
so the sampler's fallback has to be the same number or Profile.screen.avail_height
reports a height no browser will ever produce. Its comment records that it was 40
there, and in all 93 rows of cpt_screen_given_class_tier.json, since before the
split.

So this assertion was pinning the bug. It passed for as long as the installed core
carried the same wrong number, and went red the moment the core was fixed, which
is the correct behaviour for a test that compares two sides of a contract.
2026-07-27 11:57:55 +02:00
feder-cr ca181c4a18 docs: the Scrapy guide documented the lesser of the two routes
Went to open a pull request against scrapy-playwright and found their page was
already right, and ours was behind. They have a PLAYWRIGHT_BROWSER_PROVIDER
setting and a BrowserProvider interface, shipped in the released 0.0.48, with a
worked example for this project written by their maintainer. Verified the example
against our API: async_api.InvisiblePlaywright imports, is an async context
manager, and takes profile_dir and seed as it claims.

That route hands the provider our own class, so it reaches the whole wrapper. The
settings-only route this page previously led with reaches the engine and the
preferences and nothing else: no humanised pointer paths, since those are drawn by
the driver from the seed; no timezone or locale resolved from the proxy exit, so a
proxy in another country disagrees with the browser; and no pin check.

Rewritten to lead with the provider and keep the settings route labelled as the
fallback it is. The nothing-cosmetic list is stated rather than implied, because
someone who picks the cheap route should know what they gave up.
2026-07-27 11:51:37 +02:00
feder-cr c6b189cfd9 docs: the cdc_ variable, and why renaming it is not removing it
Five of the nine results for this query are GitHub, and the non-GitHub competition
is thin, spun-looking content. A real explainer clears that bar easily.

The substance is the distinction the popular fix obscures. Patching the binary to
replace the literal defeats a check that greps for the prefix, and leaves the
surface intact: three related own properties on document, a common random-looking
stem, typed suffixes, and a replacement constrained to the same length because it
is an in-place patch of a compiled file. A detector matching the shape rather than
the string finds it again.

That generalises past this variable, which is why the page is worth writing from a
Firefox project. Any tool that runs code in the page needs somewhere to keep state,
and the three options are a known name, a random name, or not in the page at all.
Only the third removes the surface, and it is a design decision no plugin can make
retroactively.

It also says plainly that a stock Playwright Firefox is trivially detectable by a
different two-line check, since the spec requires navigator.webdriver, and that
anyone claiming Firefox is inherently undetected is selling something.
2026-07-27 11:44:26 +02:00
feder-cr e708df2946 docs: what resistFingerprinting really does, and why this project turns it off
Chosen because the query has no vendor blog anywhere in its top five: Mozilla's
own support pages, an academic paper on intervention breakage, a Hacker News
thread and a GitHub issue. An open lane, and a question this project has a
concrete answer to.

The answer is counterintuitive enough to be worth the page. Turning Firefox's own
anti-fingerprinting mode on looks like the obvious first move for an automation
tool and is usually wrong, because RFP does not make you look like a typical user,
it makes you identical to every other RFP user. That is the Tor model and it is
correct when the population is large. On the open web almost nobody has it on, so
the signature it produces is a small, sharply defined group rather than a hiding
place, and it contradicts the residential IP the session is coming from.

The distinction is the whole piece: RFP optimises for anonymity within a set, an
automated session needs plausibility as an individual, and those want opposite
implementations. The five preference values quoted are the ones this project
actually writes, all false, and a reader can print them and check.

It also says plainly when RFP is the right tool and this is not, because for a
person wanting privacy from ad networks it is, and no automation library
substitutes for it.
2026-07-27 11:41:06 +02:00
feder-cr 2ac8524024 docs: why headless browsers render different fonts
The least contested query found in this niche. Its top five results are almost
entirely primary sources, a google/fonts issue, two Chromium bug entries and two
puppeteer issues, with a single blog anywhere in the set. No content-marketing
team is competing for it, and it is a question this project has to answer
correctly anyway.

Corrects the common belief while it is at it: headless usually ships the same
fonts, what it lacks is the desktop's font configuration, so the difference is in
how a missing font resolves rather than in what is installed. Two more causes
follow from that, the rasteriser settings and the fact that web font detection
measures rather than enumerates, which is why two containers from one image can
disagree about which fonts exist.

Ends where it should: a claimed platform implies a font set, so Windows in the
user agent on the Linux default set is a contradiction nothing can override,
because nothing was overridden. Same shape as the software-rasterizer tell, and
a server tell rather than an automation one.
2026-07-27 03:11:31 +02:00
feder-cr 9a923016d4 docs(readme): put the words people actually type into the first screen
Twelve real searches in this niche showed this project absent from every top five,
including "playwright stealth firefox", which is the most literal description of
what it is. The reason was visible in the file: the first screen said "A modified
Firefox that passes every bot detection test" and contained neither "Playwright"
nor "Python", so there was nothing to match on.

The tagline now carries all of it and gives up none of the claim. Added a short
"if you got here from a search" section that names the category in the four
phrasings people actually use, and names the nearest open-source neighbours
honestly rather than pretending they do not exist, with a link to the page that
explains what each approach cannot reach, this one included.

Naming the alternatives is deliberate. A reader comparing tools is going to find
them anyway, and being the page that explains the comparison is worth more than
being the page that hides it.
2026-07-27 03:08:34 +02:00
feder-cr 5a3249cfe2 deps: follow the core to 18.3.0, after checking it is actually on the index
The core moved to 18.3.0, which is the release carrying the WebGL persona fix: the
pool no longer hands out the string Windows prints when a machine has no GPU.

Checked before pinning rather than after. invisible-core 18.3.0 is live on PyPI
with both a wheel and an sdist, so this specifier resolves. Pinning a core that
exists only in a local checkout is the one mistake this pin cannot survive, since
it makes the package uninstallable for everyone and a filename can never be
re-uploaded.

The pre-push gate is what caught the drift, on a docs-only push, which is the
argument for having it: a wrong pin is invisible to the test suite and only shows
up at install time on somebody else's machine.
2026-07-27 03:00:07 +02:00
feder-cr 0ef2eed9fe docs: WebGL renderer strings, including the software-rasterizer tell we shipped
The strongest of the queries a repository page can still win in this niche: three
of the top six results are GitHub or Mozilla primary sources, and a competing
Firefox project's own wiki holds one of them, which is direct evidence that a
technical page from a project like this one ranks here.

It explains the parts people get wrong: that Firefox on Windows reports through
ANGLE, so the vendor really is "Google Inc. (NVIDIA)" and a Mozilla-branded string
is the anomaly; that the shader-model fields correlate with the age of the card;
and that the platform you claim and the shape of this string are one comparison
rather than two values.

The middle section is our own bug, written up as the case study rather than
quietly fixed. Sampling the persona pool faithfully from real telemetry reproduced
reality's worst case, because real users do run Windows on machines with no GPU:
21 of 1,500 seeds drew the software rasterizer, and seed 42, the seed in our own
quickstart, was one of them. Now zero of 1,500. The generalisable part is that a
pool sampled from real data still needs a rule about what is disqualifying, since
"real users have this" and "you should claim this" are different questions.

Publishing the mistake is deliberate. It is the most useful paragraph on the page
and it takes the argument away from anyone who would otherwise make it for us.
2026-07-27 02:51:11 +02:00
feder-cr 7eb68f7e34 docs: link the guides from the README, since an orphan page ranks for nothing
Seven pages were added under docs/ over the last two days and nothing pointed at
any of them. A page nobody links is a page search engines reach last and readers
never reach at all, which makes the whole exercise ornamental.

Split into the two things they are: how to run the engine inside another
framework, and how the underlying mechanisms work whether or not you use this
project. The second group is deliberately written to be useful to someone who
picks a different tool, because a page that is only an advert answers nobody's
question and gets treated accordingly.
2026-07-27 02:33:05 +02:00
feder-cr 0749935746 docs: three explainers, put where the search results actually come from
A pass over twelve real searches in this niche found the split: the broad
listicle queries are held end to end by scraping-API vendors with content teams,
and the narrow debugging queries are still held by GitHub repos and issue threads.
On "navigator.webdriver undefined not working" four of the top five results are
GitHub issues and not one is a vendor blog. On "playwright detected as bot" a
GitHub issue sits second, ahead of three of them.

So these three go in the repository rather than only on a blog, because the
repository is the venue that ranks for what they answer:

- navigator-webdriver-explained: why setting it to false is worse than leaving it
  alone, since a clean browser reports undefined, and what an audit reads instead.
- playwright-stealth-levels: the three levels a tool can work at, page, driver,
  engine, and what each cannot reach. States the costs of the engine level from
  the inside, including the software-rasterizer persona found in our own pool.
- playwright-detected-as-bot: a troubleshooting order that puts "check what you
  overrode yourself" first and the proxy seventh, because the proxy is the
  expensive fix and the least likely single cause.

Each says who wrote it and what they maintain, at the end. A comparison piece that
happens to be won by its own author's project, unsigned, would be worth less than
not writing it.
2026-07-27 02:26:39 +02:00
feder-cr afd145385a docs: the engine is not Python, and every Playwright binding can already drive it
Checked each official binding's launch options: playwright-go, playwright-dotnet,
playwright-java, playwright-ruby-client and playwright-rust all expose
executablePath and firefoxUserPrefs, because they mirror the same API. Those are
exactly the two halves this project needs, so the patched Firefox runs from Go,
Java, C#, Ruby and Rust today. The package is how you obtain and configure the
engine, not a requirement for driving it.

The page says what you give up outside Python, because it is not nothing: automatic
timezone and locale resolution from the proxy exit, humanised pointer paths, and
the pin check that refuses a binary which does not match the config that produced
the prefs. Upgrade the binary, keep an old prefs.json, and nothing warns you.

It also records a real gap rather than working around it quietly: the CLI can print
the binary path but has no command to emit the preferences, so the guide tells you
to generate them with a one-liner. A `prefs --json` subcommand would make this
route clean.
2026-07-27 02:23:24 +02:00
feder-cr da5af3a289 fix(hooks): track the pre-push hook as executable so POSIX git will run it
The previous commit added the test; this is the mode change it asserts. Git
refuses to run a hook without the executable bit, prints that it "was ignored
because it's not set as executable" and exits 0, so on every POSIX clone the push
went out with none of the gates behind it having run: not the suite, not the
core-pin check, not the forbidden-name scan.

It survived because this is developed on Windows, where core.fileMode is false.
The mode lives in the index, which is why chmod-ing the working tree never fixed
it.
2026-07-27 02:06:08 +02:00
feder-cr c164a91b4b docs: Scrapy integration, and an index that says which half each framework can carry
scrapy-playwright is the cleanest of the three so far and the only one that takes
the whole thing with settings alone. Verified from provider.py: it splats
PLAYWRIGHT_LAUNCH_OPTIONS straight into browser_type.launch, so the dict carries
executable_path and firefox_user_prefs together. Their own docs already name this
project as one of several compatible backends, so the wiring is the part that
belongs on our side.

The index exists to make the distinction impossible to miss. A framework that
forwards arbitrary launch options carries both the engine and the seeded profile.
One that only exposes a browser-path setting carries the engine alone, which means
every user of that build shares one identity. Each page now states which case it is.

It also lists, by name, the frameworks this does not fit and why: Chromium-only
launch paths, remote-CDP-only connections, and the ones that build launch arguments
as a fixed dict with no passthrough.

Not pushed. Public repo, needs an explicit go.
2026-07-27 02:06:08 +02:00
feder-cr 468343cd2b docs: the MCP channel was never blocked, and a one-liner is not the integration
Yesterday's note said MCP was unreachable because we do not ship an MCP server.
We do not, and it turns out not to matter: Microsoft's own playwright-mcp takes
--browser firefox and --executable-path, so it drives this engine today with two
settings and no code. Guide added.

Both guides now make the same distinction, because it is the one people will get
wrong. Passing only the binary gets the patched engine and not the seeded profile:
the identity lives in firefox_user_prefs, which neither --executable-path nor
Crawlee's default_browser_path can carry. That yields one identity shared by every
user of a build, which is its own signal. The crawlee page now shows the one-liner
and says plainly what it costs, next to the plugin that does it properly.

Verified against current sources: crawlee's default_browser_path field and its two
env aliases, and playwright-mcp's two flags with their env equivalents.

Not pushed. Public repo, needs an explicit go.
2026-07-27 02:06:07 +02:00
feder-cr 58e8321bcb fix: the pre-push hook was tracked 100644, so git never ran it on POSIX
git refuses to run a non-executable hook: it prints an advice line and exits 0,
so the push succeeds with none of the gates behind it having run. All three
repos were 644. It survived because core.fileMode is false on Windows, where
this is developed - the only machine that ever ran the hook was the one machine
that could.

The mode belongs to the index, so chmod-ing the working tree never changed it
and a fresh clone inherited the same broken mode.

The test asks git rather than the filesystem, because os.access(X_OK) is
meaningless on Windows and returned True the whole time.
2026-07-27 02:06:07 +02:00
feder-cr 623a542951 fix(tests): two tests that only passed on the machine they were written on
CI has been red on both since they were written, for the same underlying
reason: they asked the developer's checkout a question that only the installed
package can answer.

_REQUIRED_PREFS_KEYS listed media.webm.enabled and media.mp4.enabled. Those two
prefs were renamed to their real Firefox spellings in the CORE's checkout, and
the pinned core release does not emit them yet. But invisible_playwright.prefs
is a pure alias shim for invisible_core.prefs, so this file tests the core's
function through an alias - against whichever core pip resolved, which locally
is the checkout and on CI is the published wheel. The list was asserting a
contract the declared dependency does not meet, which is a NORMAL state between
releases. A gate that is red for a normal state is a gate people learn to
ignore. The two keys are asserted in the core's own suite, where the change
lives and where the assertion moves with it.

In exchange the proxy test got stronger: it now compares against the dict as it
was before the call rather than against the literal list, so it catches the loss
of ANY key, including ones nobody thought to list, and says the same thing
whichever core is installed.

test_readme_claims looked for two env vars in `_REPO.parent / "invisible_core"`
- a SIBLING CHECKOUT, which exists on the workbench and nowhere else. On CI only
this repo is checked out and the core arrives as a wheel, so the path was
missing, the comprehension yielded nothing, and the test reported that the
README documents a variable no module reads. It was reading the developer's
directory layout. It asks the installed package now, which is what a user's
environment actually contains either way.
2026-07-27 01:26:29 +02:00
feder-crandClaude Opus 5 cee33ba695 docs: integration guide for Crawlee, hosted here because that is where they asked
Crawlee declined a stealth-browser example in their own docs in June, and issue
1936 says why and what to do instead: they will not feature fresh third-party
tools, and third-party projects should host their own integration guides on their
side so Crawlee can link to selected ones. We never wrote ours. This is it.

Written against their current master rather than against the merged examples. That
mattered: the examples merged in March pass header_generator to
PlaywrightBrowserController and the current API takes fingerprint_generator, so
copying the accepted pattern would have shipped a guide that does not run. The
subclass also respects use_incognito_pages and the persistent-browser path instead
of ignoring them.

Verified: the snippet parses, every imported name is exported from crawlee.browsers,
and PlaywrightPersistentBrowser comes from the public package rather than the
private module.

Not pushed. Public repo, needs an explicit go.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 01:03:16 +02:00
feder-cr 3b49449efa docs(pinning): the page documented a knob that raises
`fonts` was listed as a top-level pin key - "complete font allowlist, the
sampler usually picks 14-24 system fonts". Passing it raises ValueError. It
stopped being an axis when the engine moved to a bundled font list: the exposed
set is the same families on every install and every OS by construction, and
varying it per profile would put back the entropy the bundle exists to remove.
The row outlived the feature by several releases because nothing read the page.

The right pin for fonts is no pin, and the page says so now rather than just
dropping the row - a reader who remembers the key needs to be told where it
went, not left to infer it from a ValueError.

browsing_history was the opposite case: a real profile field, documented
nowhere, and not pinnable either. Fixing the seed already fixes it. Said out
loud so nobody tries.

tests/test_pinning_doc.py, six cases, none of which read prose:

  every documented key is handed to the real validator through
  generate_profile, not compared against a copy of the key table - the thing in
  doubt is what a reader's call does;
  every pinnable key must appear on the page, which is the direction that
  catches the NEXT one rather than this one;
  the validator's hand-written _PIN_GROUPS must match the profile dataclasses
  it describes, or a new field is unpinnable with no error anywhere;
  the page's worked examples are parsed and their pin dicts checked, because
  examples and key tables drift apart independently and examples are what
  people copy.

Mutation-tested: putting the fonts row back, deleting a valid key from the
page, breaking a key in an example, and adding a field to the validator that
the model does not have are all red. 743 pass.
2026-07-27 01:00:09 +02:00
feder-cr da3bf64615 chore(hooks): scan the commit messages too, not just the files
The name scan only ever read what the wheel and the sdist carry. That is the
PyPI surface; this repo is public, so its workflows, its hooks, its docs and its
commit messages are published just as surely as its source. Commit messages had
never been read by anything, and that is where names went out.

The hook now reads the refs git feeds it on stdin and hands the range to the
scanner, so the messages about to be pushed are scanned while they can still be
reworded - after the push a message cannot be changed without rewriting history.
A branch the remote has never seen becomes "<sha> --not --remotes"; a deletion
pushes no content and is skipped.

It also runs the scanner's own known-bad cases first. A gate nothing tests is
not a gate, and this one had been returning a clean verdict over three of the
four surfaces it was believed to cover.
2026-07-27 00:45:40 +02:00
feder-cr 1d990408c3 docs: four of the five CLI lines in the README were command not found
They used `invisible_playwright` with an underscore. The installed console
script is `invisible-playwright` with a hyphen. The Install section two hundred
lines above is correct (`python -m invisible_playwright ...`), which is how this
survived: anybody testing the quickstart never reached the CLI block.

Also corrected, all of them things a reader checks before starting:

  the download is ~238 MB and ~544 MB unpacked, not the ~100 MB stated - a 2.4x
    understatement on the number a user weighs against their disk and their
    patience;
  `doctor` existed and appeared nowhere on the page. It is the command whose
    output a bug report needs, so leaving it undocumented cost twice;
  `path` downloads the engine if it is absent. The line described it as merely
    printing a path, so a cold `path` fetched 238 MB unannounced;
  the cache location was documented nowhere, in any of the three READMEs, and
    neither were the environment variables. There is a table now:
    INVISIBLE_PLAYWRIGHT_CACHE_DIR, INVPW_BINARY_PATH, STEALTHFOX_GITHUB_TOKEN,
    INVISIBLE_PLAYWRIGHT_SKEW, INVPW_CURSOR_ENGINE.

Eight tests keep it that way, and none of them reads prose: a bare invocation
must use the installed name, every documented subcommand must exist, every
subcommand must be documented, every documented env var must be read by a
shipped module, and every size on the page must sit inside what the seal
supports.

That last one had to be inverted after mutation testing. It first accepted the
set if ANY figure was close, so putting one of the two occurrences back to
~100 MB left it green - a check that tolerates a wrong number as long as a
right one is nearby.
2026-07-27 00:14:51 +02:00
feder-cr a9a13bf5e6 ci: two false greens, one of them demonstrated by its own only run
WEBRTC-E2E WAS GREEN WITH ITS HEADLINE ASSERTION SKIPPED. Run #1 logged
"1 passed, 1 skipped", and the skipped one is the test this workflow's header
calls the point of the gate. Two things allowed it:

  the binary path was assigned as `echo "VAR=$(cmd)" >> $GITHUB_ENV`. echo
    exits 0 whatever the substitution did, so `set -e` never sees a failure and
    an EMPTY value lands in the environment - after which both tests skip on
    "no patched binary", pytest exits 0, and the job is green having verified
    nothing. It now captures, checks the path exists, and refuses;
  it was the only one of four workflows with no floor. It now refuses on ANY
    skip, not merely on a low count, and prints the SKIPPED lines - because
    here a skip is the failure mode, not an edge case.

TESTS.YML HAD NO FLOOR EITHER, on the largest suite of the three. `addopts`
already filters two markers; one more, or a typo in one, turns 726 tests into 0
and reports success. Floor at 600.

Both gates were driven against known-bad reports using the gate's own code
lifted out of the workflow rather than a re-implementation - including, for
webrtc, the exact "1 passed, 1 skipped" text run #1 produced. It refuses it.
2026-07-26 23:47:13 +02:00
feder-cr 6cb631beca fix: seven tests pinned pref names the engine never reads
The core stopped emitting four dead prefs and this repo went red - which is the
useful part. These tests listed `zoom.stealth.screen.avail_width/height`,
`zoom.stealth.screen.dpr` and `zoom.stealth.webgl.msaa` among the REQUIRED keys
of a valid pref set, so they were guaranteeing the presence of names that appear
nowhere in the engine source. A required-key list that requires no-ops gives
confidence in nothing and makes removing dead code look like a regression.

Pointed at what actually controls the behaviour:

  the MSAA tests now read `webgl.msaa-samples`, an upstream Firefox pref we set
    and the engine honours. Only our `zoom.stealth.webgl.msaa` was dead, so the
    behaviour these tests describe still exists - they were watching the wrong
    name for it;
  the codec keys move to `media.webm.enabled` / `media.mp4.enabled`;
  device pixel ratio moves to `layout.css.devPixelsPerPx`, which is where it
    actually reaches a page;
  the two avail_* keys are dropped - nsScreen derives the available rect from
    screen.width/height and never reads them.
2026-07-26 23:42:23 +02:00
feder-cr dcdbf200ff fix: the process-leak fix shipped to half the users and said it was fixed
0.4.0 tied the browser tree to the process lifetime and the release notes said
so. It reached the sync launcher only. async_api.py did not import _reaper at
all: no token, no guard, no stamp, no reap. So every async user on Windows kept
the entire leak - a killed runner leaving eight to twelve browsers behind - for
three releases, while the changelog told them it was closed.

Nothing was red, and could not have been. This module is at 29% coverage, no
test enters its context manager, and the async test file asserted parity in its
DOCSTRING while exercising the constructor.

Now identical to the sync path: mint the token, stamp it into the browser env,
bind the tree to a job object after launch, reap unconditionally at the end of
teardown - which matters because every close step above it is individually
wrapped in `except: pass`, so a browser that refuses to close is otherwise
swallowed in silence.

Three tests, each checked against its own mutation:

  the stamp, asserted on the env the browser would actually receive, since
    that is the only thing the guard can key on;
  structural parity of the machinery on BOTH classes - deliberately about
    names, because what failed here was one module never growing the
    attributes, and a test comparing outputs would have passed on two objects
    that share nothing;
  teardown reaps, driven through the real _teardown with a recording guard.

Removing the stamp, the reap, or the guard declaration each turns exactly one
of them red.
2026-07-26 22:50:47 +02:00
feder-cr 4c2d17a475 fix: the user-path e2e could not even be COLLECTED where it is meant to run
The workflow installs only pytest on the runner, deliberately: the package
under test goes into a venv the fixtures build from the index, and a second
copy on the runner's path would mean every assertion reads the wrong one.

Two module-level imports contradicted that and killed collection outright -
exit 4, "No module named invisible_playwright", on both runners, while passing
locally where a checkout is always importable. The workflow had never been
executed before today, so nothing had ever put the two decisions in the same
room.

  tests/test_release_e2e.py imported FIREFOX_UPSTREAM_VERSION to build its
    assertions. It now reads that from the VENV, which is the more honest
    question anyway: what a user gets is what the INSTALLED package reports,
    not what this checkout says;
  tests/conftest.py imported _fpforge and constants at module level, so the
    guard above was not enough on its own. The import is now guarded and the
    fixtures that need it fail at USE time with a message naming the one
    situation where this is expected - a clear failure about one test instead
    of a collection error covering the whole run.

Verified in the condition that broke it rather than reasoned about: 11 tests
collect under a Python with the package absent, 7 e2e pass locally, and the
default suite is unchanged at 726.
2026-07-26 19:01:53 +02:00
feder-cr ffbb94adb0 fix: the fingerprint pinned float64, which no platform can agree on
Three of four CI runners red, passing locally. Measured rather than guessed, by
running the identical 576-case grid on Windows and on Linux:

  on the SAME Python, ONE case out of 576 differs, with the same waypoint
    count - a last-bit libm difference in one coordinate, at one input;
  hashing the INTEGER PIXELS instead, the two platforms are byte-identical.

That settles what the promise can honestly be. A pointer event carries integer
coordinates, so the sub-bit disagreement is not observable by a page, a
detector or a user: it exists only in a float nobody dispatches. The test was
pinning an implementation detail of libm, and a gate that cannot be green on a
supported platform is a gate somebody eventually deletes.

So it pins what reaches the wire - the rounded pixel, the millisecond, and the
number of events - and the count digest is asserted FIRST and separately.
Counts are integer-valued, so a changed count means the rng is being consumed
differently, which is a categorically different mistake from a coordinate
moving and deserves its own message.

Still catches what it was built for: both float-associativity regressions it
found during the planner extraction moved rounded pixels, not merely last bits.
A fourth test asserts the hashed coordinates really are integers, so an edit
that "tightens" this back to raw floats trips over the reason it must not.

Verified on both platforms rather than reasoned about: 4 passed on Windows and
4 passed on Linux, same file, same fingerprints.
2026-07-26 18:50:09 +02:00
feder-cr 8c5ae81873 test: the launch test skipped Windows for a reason that is not true
The skip said "headless launch path requires display server". On Windows it
does not, and never did: headless=True there keeps the real rendering pipeline
and hides the window through the binary's own cloak. Linux is the platform that
needs a display, and it gets Xvfb.

So the full-stack test - wrapper init, Firefox launch, Juggler handshake,
page.goto, page.evaluate - had never run on the primary target, behind a stated
reason that was false. The two most recent defects in this package were
Windows-only by construction, since firefox.exe is a launcher stub that spawns
the real browser and exits; neither was reachable from here.

Removed, and verified rather than assumed: 7 e2e tests pass on Windows,
including that one.

The module docstring described three tests by their old names and behaviour,
including the git install and the linux-only launch. Rewritten to describe what
the file does now, with both mistakes kept in it - a docstring that quietly
becomes fiction is how the git-install path survived a rename.
2026-07-26 18:25:16 +02:00
feder-cr 83e43cb7bd test: nothing covered the path every EXISTING user takes
The install tests all start from an empty venv, which is a route each user
takes exactly once. `pip install -U` is the one they take repeatedly, and it
was untested.

It matters more here than in most packages because of the shape of the
coupling. The wrapper declares an exact `invisible-core==X.Y.Z`, so an upgrade
has to move two distributions in step, and a half-moved environment is repaired
IN PROCESS at import rather than raising - which means a repair that silently
does the wrong thing is indistinguishable from one that worked. From outside,
the import just returns.

Four tests, driven against the live index:

  upgrading from the PREVIOUS published release moves the core with the
    wrapper, and pip agrees afterwards. The previous version is read from the
    index rather than written down, so this does not go stale on the next
    release;
  the upgraded environment holds exactly ONE core root in sys.modules, imported
    from site-packages and not from a checkout that happened to be on the path,
    and the version its metadata reports is the one the module derives from its
    own seal. A swap performed under objects the caller holds leaves two alive
    and shows up much later as behaviour that matches no reported version;
  a hand-pinned old core makes `pip check` exit 1. That is the whole reason the
    dependency is a real specifier: a direct URL has no version to compare, and
    pip reports a broken environment as clean;
  importing the wrapper repairs that environment in the SAME process. Asserted
    on the version afterwards, never on the absence of an exception - "no
    exception" is also what a repair that did nothing looks like.

One assertion in the first draft was `assert reported in path or True`, which
asserts nothing at all. It is now the check it was meant to be: the core has to
come from site-packages, or a venv test could be silently reading the
developer's working tree and passing everywhere.

CI runs both e2e files and the "did anything actually run" floor moves from 3
to 6, re-validated against a report where one of the two files skips itself
entirely - which is the failure a fixed threshold of 3 would have waved through.
2026-07-26 18:13:13 +02:00
feder-cr d0903dec60 test: the user-path e2e was testing a route no user takes
It installed from a git URL. That stopped being anybody's install path on
2026-07-26, when the three packages went to the index, and the difference is
not cosmetic: a git install never resolves `invisible-core==X.Y.Z`, so the
entire pin mechanism - the part most likely to break a release, and the reason
a binary bump is now a three-package release - was outside what this file
could see.

It also installed a blessed `playwright==<pin>` immediately afterwards, and
that line was hiding exactly what the test exists to find. If the declared
range resolves to a client the shipped Juggler cannot speak, installing the
pin afterwards REPAIRS the venv and the suite goes green while every fresh
install is broken. What a user gets is what pip resolves from the declaration,
so that is what is asserted now - including a test that the resolved
Playwright is inside the range the package itself declares, which is a
question neither side can answer alone.

`INVPW_E2E_SOURCE=git` still reaches the old route for verifying an
unpublished commit. It is a pre-release check now, not the default, and the
test says so where somebody reading a failure will see it.

CI: .github/workflows/user-install.yml runs this on ubuntu-24.04 AND
windows-latest, daily and on release. Windows is not decoration - the two most
recent defects were Windows-only by construction, since firefox.exe is a
launcher stub that spawns the real browser and exits, and the job-object fix
for it has no counterpart on Linux.

The workflow refuses a run in which fewer than three tests actually ran.
pytest's exit code cannot distinguish "all passed" from "all skipped", and
every test in this file is gated on a marker and some on a platform, so
skipping itself into a green tick is its most likely failure. That refusal was
driven against four known-bad reports - missing, all-skipped, under-threshold
and empty - using the gate's own code extracted from the workflow rather than
a copy of it.

Deliberately NOT made tolerant. There is a real window, between publishing the
core and publishing the consumers, in which this cannot pass; `|| true`,
`--no-deps` or a git fallback would each produce a green job that installed
nothing, and that lie outlives the window by months.
2026-07-26 18:03:52 +02:00
feder-cr 20e4ca010e test: the snapshot that the whole in-process repair rests on had no killing test
Replacing the three-line `any(name == "invisible_core" or ...)` in _pin.py with
a hardcoded False left this package's entire suite green. The two tests that
touched the value could not see it: one is a source-order scan, and a hardcoded
line still sits before the import; the other asserts
`seen["core_preimported"] is _pin._CORE_PREIMPORTED`, a tautology whatever the
value came from.

It matters because _CORE_PREIMPORTED is the entire soundness argument for
repairing the core in-process. repair_core refuses to swap it when the value is
true and the core-side guard is real - but THIS package computes the input.
Degraded to a constant, `import invisible_core; import invisible_playwright`
with a mismatched pin drops invisible_core.* out of sys.modules and re-imports
it underneath objects the caller already holds: two versions alive in one
process, every test still passing.

The twin already existed next door in the manager and killed the same mutation
there. Ported: a stub core echoes back what it was handed, imported once in a
child that has not touched invisible_core (must be False) and once in a child
that has (must be True). No constant satisfies both.

The stub's contents are derived from this package's real import list with ast,
because a stub that lags behind it kills the child on ImportError - and an
ImportError in a subprocess reads exactly like the assertion failing.
2026-07-26 17:52:02 +02:00
feder-cr 1060ac9f18 chore: 0.4.2 - the refactor reaches the index
0.4.1 shipped the lifetime guard's rewrite; this carries the planner and idle
and approach split, so what is on PyPI is what is in the repo. No behaviour
change: the paths are byte-identical and a fingerprint test now says so.
2026-07-26 17:08:23 +02:00
feder-cr e7711323ac refactor: three long functions become named stages, with the paths pinned
The planner was 203 lines in one function, the idle planner 134 with its
episode weights written as bare cumulative literals in an if/elif chain, and
the approach 103 mixing guard clauses, target selection and a time budget.

  _plan          -> six stages: control polygon, duration, sample times,
                    overshoot, curve sampling, tremor, duplicate collapse
  plan_idle      -> a table of episodes; the weights are data and the ordering
                    is asserted rather than assumed
  _approach      -> _choose_landing (one small scope owning the element
                    handle) and _walk_onto (spends the time budget)

Byte-identical output, which is the whole point and was not free. Extracting
looked completely safe and changed the result twice, both times through float
multiplication not being associative:

  axis.at(dist * u, ...) computes ux * (dist * u) where the original wrote
    ux * dist * u, i.e. (ux * dist) * u;
  returning amp * w from the overshoot and multiplying by the unit vector at
    the call site regrouped the same product the same way.

Neither was visible in any statistical test - they check distributions, and a
last-bit shift leaves every distribution intact - and both changed a rounded
pixel and therefore every draw downstream of it. tests/test_motion_fingerprint
now pins 576 cases and 16135 waypoints, with a second test that perturbs a
style field by one part in ten thousand and requires the fingerprint to move,
so it cannot quietly become decoration.

CHANGELOG catches up with 0.4.0 and 0.4.1. 723 tests green.
2026-07-26 17:07:10 +02:00
feder-cr 9bf507bdbf chore: the name scan no longer blocks a clone that has no word list
The first cut refused whenever the scanner was not at the workbench path, so
every clone of this repo was stopped on every push with no way to comply - the
word list deliberately lives outside it. A gate that is red by default is one
people switch off, and switching this one off disarms the rest of this hook.

Configured-but-missing still refuses, since setting the variable is somebody
saying to run it. Absent is now one printed line and a normal push, never
silence: silence reads exactly like a scan that ran and passed.
2026-07-26 16:23:02 +02:00
feder-cr 7f152229bd refactor: the lifetime guard is a strategy, not a module of flags
0.4.0 shipped the behaviour and the behaviour is right, but the module was one
file doing four jobs: minting identity, searching with psutil, killing, and
fifty lines of inline Win32 ctypes - held together by a module-level handle and
os.name tested wherever it happened to be needed. It worked and it would have
rotted.

Three pieces, one job each:

  SessionToken    a value object. Mints itself, stamps an environment, answers
                  whether a process is ours. Equality by value, and an EMPTY
                  token is falsy and matches nothing - which is what stops a
                  session that failed before minting one from sweeping the box.
  find_processes  the search, and now the only place psutil appears.
  LifetimeGuard   the strategy: JobObjectGuard on Windows, NullGuard elsewhere.

os.name is tested in exactly ONE place, guard_for(), so no launcher code
branches on the platform - it takes a LifetimeGuard and never asks which one.
NullGuard is a Null Object in the strict sense: it satisfies the interface and
REPORTS that it guarantees nothing (guaranteed is False, bind returns 0) rather
than doing nothing while looking like it worked. It still reaps, because
immediate cleanup is the part that needs no kernel.

Six mutations, each turning a test red, and two of them exposed tests that
proved nothing until this pass:

  the empty-token guard inside matches() was covered for by the duplicate guard
    in find_processes, so removing either left the suite green. There is now a
    test that calls the matcher directly;
  stamp() copying its input was untested. Mutating it to mutate in place does
    not merely fail - it poisons os.environ, every subprocess inherits the
    token, and the reaper kills the test runner. Caught by isolating the case.

Behaviour is unchanged and re-verified: the kill test still passes, and
flipping KILL_ON_JOB_CLOSE to zero still turns it red. 721 tests green.
2026-07-26 15:32:18 +02:00
feder-cr 76201aa744 chore: 0.4.0 - the cursor is drawn here, and the browser tree dies with us
A minor rather than a patch: pointer movement is generated in this package now
instead of in the engine, and psutil joins the dependencies. The core pin moves
to 18.2.0 with it, so a cold install resolves the geo budget alongside.

Also drops a comment that had gone stale under its own subject: the sdist
exclusion list still explained why the forbidden-name guard was excluded, and
that guard is no longer in this repository at all.
2026-07-26 14:38:09 +02:00
feder-cr 6b15f275e8 fix: the browser tree now dies with this process, even when it is killed
Twelve runs of one test left eleven browsers alive. The first diagnosis blamed
"any path where teardown does not run cleanly - a timeout, an exception out of
the with block, a killed runner". Those are not the same thing, and only one of
them leaks.

The exception path does NOT leak. Interleaved A/B over four launches on a real
browser, arms differing only in whether the new cleanup ran: zero survivors in
both. __exit__ executes and Playwright tears the browser down correctly. The
first version of this fix was a careful solution to a path that was not broken,
and it only came out because the measurement was run before the fix was
believed rather than after.

The killed-runner path leaks badly, and the bug report said so in a detail that
was read past: three of the twelve runs had TIMED OUT. Reproduced directly -
launch, kill the runner, count what is left: eight survivors, then twelve.
There __exit__ never runs at all, so nothing written inside _teardown can help
however well written.

So the guarantee comes from the kernel. The tree is bound to a Windows job
object with KILL_ON_JOB_CLOSE; this process holds the only handle, and when it
ends - cleanly, by exception, or killed outright - the kernel empties the job.
Processes created inside a job join it automatically, so content processes
spawned later are covered without being tracked. Same probe after: 0 and 0.

Identification is exact, not heuristic. Each session mints a random token and
stamps it into the browser's environment; children inherit it, so every process
in the tree carries it, and only processes positively carrying it are touched.
The alternative - "a firefox that appeared after we started" - eventually kills
a healthy browser belonging to a session running beside it, and a leaked
browser is recoverable where that is not. A process whose environment cannot be
read is left alone.

Windows only, which is where the bug is: on Linux the launched process IS the
browser and Playwright keeps hold of it, while firefox.exe is a stub that
spawns the real browser and exits, re-parenting the tree out of reach. psutil
becomes a hard dependency rather than an optional one, deliberately - an
optional reaper is absent exactly on the machines that need it, and silently.

Ten tests, each validated against a known-bad input: flipping KILL_ON_JOB_CLOSE
to zero turns the kill test red, and failing OPEN on an unreadable process
turns five red. One was vacuous as first written - "an empty token matches
nothing" passed with the guard removed, because a process without the variable
answers None and None is not "". It is now written around a process whose token
IS the empty string, the only input that separates the two.
2026-07-26 14:13:03 +02:00
feder-cr 275d3df7f1 chore: the forbidden-name scan moves to the workbench gate
It was a test in invisible_playwright that failed closed without the word
list. Correct behaviour, wrong home: the list is deliberately not carried in
any public repo, so a fresh clone got red tests it could never make green, and
a suite that is red by default gets pushed past with --no-verify - which turns
off every other gate in this hook at the same time.

The scan now runs from the workbench, resolved the same way as the core-pin
gate, and a gate that cannot be reached refuses instead of passing quietly. It
runs on every push rather than only on release tags: a name is public the
moment the branch lands, and a force-push does not take it back.
2026-07-26 13:56:30 +02:00
feder-cr 640f931aab feat: draw the cursor here, from the session seed, instead of in the engine
The engine's generator builds every stroke from constants: a fixed knot-box
padding, exactly two knots, one quadratic easing, one step-count law, one jitter
probability. Constants are shared by every install, so the shape they produce is
the same for every movement of every session of every user - and a shape that
never varies is an identity, not a detail. Measured over 1.94M points before any
work started:

  the Y residual mean is +0.4976 px and EVERY path is biased (per-path minimum
    +0.000 over 4000 paths), so one movement is enough to see it;
  the X residual's distinct-value set is literally {0.0} - no noise at all, so
    every waypoint lies exactly on an analytic cubic and FOUR events solve the
    control polygon in closed form. The Y jitter cannot hide a curve whose X is
    exact;
  the velocity profile has sd <= 0.0057 and peaks at the FIRST step in the
    median case, i.e. infinite initial acceleration and decay. A hand's profile
    is bell-shaped and peaks near the middle;
  a move under 50 px detours 3.87x the straight-line distance, a 2 px move
    dispatches 24 events, and every movement ends with at least 3 events at one
    coordinate.

This needs no new binary, which was verified in the source before starting: the
humanize hook dispatches waypoints with jugglerSendMouseEvent passing
pressure, inputSource 1 and the synthesis flags, and the ordinary sendEvents()
path that serves a plain page.mouse.move() passes byte-identical arguments. A
move driven from Python is indistinguishable from one the engine generates.

WHAT THIS ADDS
  _motion.py    draws one stroke, every shape parameter from the session seed
  _behaviour.py plans WHEN and WHERE movement happens - drift while reading,
                motion while the wheel turns, overshoot and correction, and
                movements that end on nothing (if every endpoint is a control,
                the endpoint set is a signature however good each path is)
  _cursor.py    wraps the six funnels every pointer action already goes through,
                so page.click written a year ago gets this with no edit. A
                weak-keyed registry leaves a plain sync_playwright() browser in
                the same process untouched, and aiming is a hint that is fully
                swallowed: it can neither delay a call that would have passed
                nor invent an exception on one that would have failed.

MEASURED AFTER
  jitter mean +0.00039 px, CI contains zero, 0.499 of paths positive
  both axes carry noise; a cubic through 4 neighbours misses the 5th by 0.239 px
  tremor is two-dimensional (sd ratio 0.601, was rank-1 with corr 1.000)
  speed peaks mid-stroke; backtracking 2.75% of steps on 32% of paths
  per-seed shape divergence 1.79x at 600 px, was 1.05x
  Fitts uses the real target width: 908 ms to a 20 px control, 423 ms to a 220 px

ONE STROKE MODEL, ENFORCED. _behaviour carried its own as a fallback, so two
intra-move laws could ship and a detector would see a different one depending on
which call site ran. Deleted, and the renderer is a required argument in all
five planners: forgetting it is a TypeError, not a silent second law.

ONE PHYSICAL FLOOR. MIN_EVENT_INTERVAL_MS was an independent 4.0 here while the
generator reasoned from 125 Hz / 8 ms. Two numbers for one physical fact, and
the looser one won wherever it was applied last - the generator emitted 3.52 ms
gaps (284 Hz) and _fit_timeline produced 1.83 ms (547 Hz). One constant now.

NOT BETTER, and recorded rather than buried: duplicate positions run 7-10%
through the macro path against the engine's 8.07%, i.e. parity. Raising the
merge threshold was tried as the lever and reverted - it moved the rate from
0.098 to 0.095. The cause is the small reading movements themselves.

Seed determinism is intact: same seed, byte-identical fingerprint hash.
709 tests green.
2026-07-26 13:43:46 +02:00
feder-cr 251a94853a ci: ask the package where the binary is, instead of rebuilding the path
Every Windows cell of firefox-launch-matrix has been failing since the seal
landed, and failing in the worst possible way: the verify step assembled the
cache path by hand as `Cache/firefox-7/firefox.exe`, while the cache has been
content-keyed as `Cache/<tag>_<version>_<buildid>/` since then. So the step
reported NOT FOUND - which is indistinguishable from the launch failure the job
exists to detect. Nine red cells read as "the bug reproduces on every Windows
edition". It does not; the binary was simply not where the script looked.

The path now comes from `python -m invisible_playwright path`. That is the only
thing that knows it, and a string assembled anywhere else is a second copy of a
naming rule that has already moved once.

Two other things the same drift had hidden. The step named "Fetch firefox-7
binary" runs `fetch` with no argument, so it has been fetching the SEALED tag
for a while - the name was the only part still saying 7. And the job cannot do
what it was written for at all any more: a sealed core serves its own tag and
refuses every other, so `fetch firefox-7` is a SealMismatch by design. Driving
an old tag needs the core that was sealed to it. The header says so now rather
than implying an investigation that can no longer run.
2026-07-26 02:11:25 +02:00
feder-cr 4f8f546d44 chore: declare the distribution as invisible_playwright, pin core 18.1.0
The declared name now matches the import name. Nothing functional: pip and
importlib.metadata normalise the two spellings to the same project, and
`pip install invisible_playwright` already worked.

The rename found a real defect while landing. test_pyproject_declares_the_pin_
exactly_once still carried its own regex, `r'"invisible-core==[^"]+"'` - the
seventh copy of the requirement parsing the consolidation was meant to remove,
and the one the file's own header warns about ("a test that parses the pin its
own way tests its own regex"). It survived because nothing had ever handed it a
spelling it did not anticipate. Writing the pin as invisible_core did, and the
test read zero of a pin that was present and correct. It counts through the
shared parser now, so every legal spelling passes and a missing pin still fails.

0.3.5 -> 0.3.6; the core pin follows to 18.1.0.
2026-07-26 00:08:50 +02:00
feder-cr be34c3def6 feat: install from the index, with the core pinned exactly
The core dependency was a bare `invisible-core @ git+https://...` with no ref.
Measured, not assumed: that shape pins nothing (it resolves to whatever the
default branch held at install time, forever), and it is invisible to `pip
check`, which has no version specifier to compare and answers "No broken
requirements found" on an environment running the wrong core. The same mismatch
written as a real specifier is caught, exit 1. An index also rejects a direct
reference outright, so the package could not have been uploaded as it stood.

It is now `invisible-core==18.0.0`, declared once, in pyproject.toml. The
import-time assertion reads it back out of this package's own metadata rather
than carrying a second copy, and a test fails if a copy appears. What the
resolver cannot see is the --no-deps and lockfile residue, and that assertion is
the only layer that does - so a mismatch there is now repaired in process rather
than reported, with the repair, its guards and its timeout living in the core
where the profile manager shares them.

The comparison itself moved to invisible_core._pin. What stays here is the
prelude: the few lines that still run when the core cannot be imported at all,
which is the one state a module inside the core can never report on. It tells
"core missing or too old" apart from "core present, its own dependency missing",
because those have different cures.

Packaging, all of it measured on the built artifacts rather than inferred:
- the sdist carried tests/playwright-upstream, 322 files of Apache-2.0
  third-party source inside a distribution declaring MIT. Excluded, and the
  directory is now gitignored so `git add -A` cannot commit it either. 1.27 MB
  to 282 KB.
- README images and links were repo-relative; an index does not rewrite those,
  so the project page would have rendered with broken images and 404 links.
  Badges point at main because a badge is a status indicator; screenshots and
  the banner are pinned to a commit because those are evidence of a state.
- the Firefox badge said 150.0.1 while the seal ships 151.0.

Install instructions changed. Prose did not.
2026-07-25 23:48:05 +02:00
feder-cr 7a8693c6b4 deps: restore the Playwright floor to 1.55, bump 0.3.5
Revert the 0.3.4 drop to 1.40. Keep the conservative CI-tested floor (1.55) with
the tested upper cap (1.61.0): >=1.55,<=1.61.0.
2026-07-24 18:43:35 +02:00
feder-cr 44afe950b3 deps: lower the Playwright floor to 1.40, bump 0.3.4
The >=1.55 floor was never a real compatibility bound - it was just the single
minor pinned when 0.3.1 tightened the range. The firefox-18 binary was smoke
tested (launch, new_context, navigate, evaluate, click) against 1.40, 1.45, 1.50
and 1.54 and passed on all four, so the floor drops back to 1.40 and anyone on an
older client keeps working. Upper cap stays at the tested 1.61.0.
2026-07-24 14:13:26 +02:00
feder-cr 06815c9afb deps: cap Playwright at the latest tested version (<=1.61.0), bump 0.3.3
The upper bound was an open <1.62, which would let an untested future 1.61.x (or
anything below 1.62) install and potentially break a fresh setup the way 1.61
first did. Cap it at the exact version validated against this binary, 1.61.0, so
only versions we have tested can be pulled in. The cap moves forward on purpose,
once a newer Playwright is validated against the binary.
2026-07-24 13:24:47 +02:00
feder-cr 422a901104 tests: derive the expected Firefox version from the constant, not a literal
The release e2e tests asserted the binary reported 'Firefox 150' / 'Firefox/150'
and went red the moment firefox-18 (FF151) landed - the binary correctly reports
151.0. Same class as test_constants, but these live in the e2e workflow (not the
unit run, which stayed green), so they slipped through. Now derived from
FIREFOX_UPSTREAM_VERSION so they track whatever the wrapper actually ships.
2026-07-24 12:58:24 +02:00
feder-cr aaf7ee406f deps: allow Playwright up to 1.61 (firefox-18 / Firefox 151), bump 0.3.2
The cap was 1.55.x because 1.61 pairs with Firefox 151 and sent viewport fields
the old binary rejected. firefox-18 rebases onto 151, so the range moves to
>=1.55,<1.62 and playwright_pin.txt to 1.61.0. Both ends tested against the new
binary: 1.61 ran the full browser suite on Windows and Linux, 1.55 is protocol
drift-free. The upper bound stays exclusive so the next minor must be tested.
2026-07-24 09:51:14 +02:00
feder-cr 59b8714737 docs: drop a protection-vendor name from an issue template and a docstring
Neither mention was functional (the issue template is prose; the docstring
describes a cookie_profile category - the actual tag values are unchanged). Keep
the description generic.
2026-07-24 09:51:14 +02:00
feder-cr baf5522d2b font gate: check the faces actually load, not just that the family enumerates
The gate counted 72 families enumerating and passed while ten collection faces
silently fell back to another family, so a real rendering regression shipped
with the gate green. It now renders a CJK probe per collection face and compares
the metrics against the fallback, with the family list calibrated on a build
known to load them.

Also: test_constants derives the expected archive name from the basename
constant instead of hardcoding the version, since a hardcoded one turns every
upstream bump into a mechanical test edit, which is how a stale expectation gets
corrected without anyone checking the asset exists. And INVPW_TRUE_HEADLESS=1
opts into real headless for long unattended runs on Windows, where the default
cloak path intermittently hangs on launch with a persistent profile. The default
is unchanged and the fingerprint prefs are identical either way.
2026-07-23 19:07:28 +02:00
feder-cr aa7277a1ef docs(readme): self-host the LinkedIn badge SVG too (removes the last shields.io dependency) 2026-07-19 14:47:47 +02:00
feder-cr 5026a98dec docs(readme): self-host badges as repo SVGs (no more shields.io)
The version/stars/downloads badges routed through shields.io and GitHub's
image proxy, which rate-limits and intermittently rendered them as broken
images. These are now static SVGs committed under docs/badges/ and referenced
by relative path, so they render like any repo asset and cannot break.
2026-07-19 14:32:09 +02:00
feder-cr cafbbca82f docs(readme): replace flaky dynamic badge with a static Firefox version badge
The github v/release badge (no releases on this repo) and the github stars
badge (shields.io shares a rate-limited GitHub API call, so it intermittently
rendered as a broken image) are replaced by a static Firefox 150.0.1 badge that
never calls an API and cannot break.
2026-07-19 14:15:15 +02:00
feder-cr e09cc07f69 fix(deps): pin playwright to 1.55.x, bump 0.3.1
Playwright 1.61 adds an isMobile field to the Browser.setDefaultViewport
Juggler command that the FF150 binary does not accept, which breaks the
session (#48). Narrow the range from >=1.40,<1.61 to the CI-tested 1.55.x
(scripts/playwright_pin.txt), so a fresh install always gets a compatible client.
2026-07-13 23:09:26 +02:00
feder-cr a1b75d93e9 tests: drop font-sampling tests
Follows the invisible_core removal of the dead per-profile font-sampling:
delete the derive_font_prefs/derive_font_whitelist tests, the 'fonts' pin
tests, and the profile font_whitelist assertions. Suite green (444 passed).
2026-07-06 21:36:26 +02:00
feder-cr 47a1044733 style: ASCII-only comment in the font-env test (drop em-dashes) 2026-07-06 04:19:37 +02:00
feder-cr 3f5a26a9e8 test: adapt integration tests to the self-contained font binary
The binary is now bundle-only and self-contained for fonts, so the config
pipeline emits no font prefs. Drop the two font keys from REQUIRED_KEYS and
rewrite IT7 to assert the pipeline emits NO font.* / font.name-list.* prefs
(it previously asserted the removed fontlist propagation). Matches the
invisible_core change that stopped emitting the font block.
2026-07-06 04:11:46 +02:00
feder-cr a0a0cc2369 scripts: ci_font_gate.py - assert the Windows font persona on every OS
Companion to ci_drive_gate.py, run by release.yml's gate job on each leg's
native runner. Launches the built binary headless, enumerates the visible font
families with the width probe web detectors use, and asserts: the detected set
equals the canonical Windows family set (identical on every OS), no known host
family (macOS Helvetica Neue/Menlo, Linux DejaVu/Ubuntu, ...) is visible, and
the CSS generics resolve to Windows fonts (serif=Times New Roman, mono=Consolas,
system-ui=Segoe UI). This is how the macOS build gets font-validated - there is
no local Mac. No proxy, no secrets.
2026-07-06 03:50:56 +02:00
feder-cr 029b678964 fonts: stop injecting STEALTHFOX_FONTLIST/SYSTEMUI env (binary self-contained)
The patched binary is always bundle-only and needs no external font config, so
the wrapper no longer injects any font env in _build_env (sync + async). No
external font customization channel remains. Test updated.
2026-07-06 03:09:35 +02:00
feder-cr d3462cca47 test(download): point release-URL mocks at firefox_antidetect_patch
The firefox-14 relocation moved the binary release assets to
firefox_antidetect_patch, but test_download and test_constants still mocked
and asserted the old invisible_playwright release URLs, so they failed
against the current invisible-core. Derive the ensure_binary mock URLs from
RELEASE_URL_TEMPLATE so they track core automatically, and update the two
literal-URL guards to the new repo. Parser and non-api-url tests unchanged.
471 unit tests green.
2026-07-05 17:22:01 +02:00
feder-cr 17bab0cca4 ci: move the binary-release workflows to firefox_antidetect_patch
The release/verify-assets/verify-cloak/republish workflows now live on the
source repo (feder-cr/firefox_antidetect_patch), so the built binaries are
published there — the natural home next to the source they are built from,
and reachable the same way by every consumer of invisible-core.

The wrapper keeps its own test workflows (tests/e2e/webrtc-e2e/
firefox-launch-matrix) and the scripts the source-side release jobs check
out from here (ci_drive_gate.py, gen_release_notes.py, playwright_pin.txt,
tests/test_cloak.py).
2026-07-04 20:00:27 +02:00
feder-cr 3c018f7bbf docs: source repo renamed invisible_firefox -> firefox_antidetect_patch (release notes + CI refs) 2026-07-04 20:00:27 +02:00
feder-cr 310bb215df Allow the invisible-core git dependency to install
Hatchling refuses a direct-reference dependency (invisible-core @ git+...)
unless allow-direct-references is opted in, so a clean pip install from git
failed at metadata generation. Enable it so the wrapper installs.
2026-07-03 21:15:20 +02:00
feder-cr 76e41e2789 Split pure-config into invisible-core; keep back-compat shims
The seed->fingerprint->prefs logic, binary download, and proxy/geo config
now live in a standalone invisible-core package (zero Playwright), so a
profile manager can reuse it without pulling Playwright in. The wrapper
depends on invisible-core and replaces the moved modules with full-alias
shims: existing imports (public API, submodules, private names) and
isinstance checks keep working unchanged. tests/test_backcompat.py locks
that contract (6 guards). Bumps to 0.3.0.
2026-07-03 19:57:49 +02:00
feder-cr d434ee4059 docs: bigger logo in banner 2026-07-03 05:13:30 +02:00
feder-cr bb6305b439 docs: center the banner 2026-07-03 05:07:35 +02:00
feder-cr 6a48fb6022 docs: more gap in banner (logo further right) 2026-07-03 05:02:36 +02:00
feder-cr c9853961d3 docs: title+logo banner lockup (light/dark, responsive image) 2026-07-03 04:56:00 +02:00
feder-cr b93fc25a3f docs: title/logo lockup via table (vertically centered) 2026-07-03 04:30:31 +02:00
feder-cr 993ec95eb2 docs: badges on top, then title-left + logo-right, centered intro below 2026-07-03 04:22:05 +02:00
feder-cr 8695a6a4e0 docs: restore lockup layout with large title (logo right of title) 2026-07-03 04:21:04 +02:00
feder-cr 1f087fd6d3 docs: centered hero (fixes tablet title wrap, borderless h3 title) 2026-07-03 03:11:33 +02:00
feder-cr 036076a3dd docs: HTML title (test borderless) 2026-07-03 03:06:50 +02:00
feder-cr 17d67e067c docs: center tagline as a subtitle, clear float 2026-07-03 03:02:54 +02:00
feder-cr faec39c6ab docs: move badges above the title 2026-07-03 01:51:23 +02:00
feder-cr 4458fa585c docs: left-aligned title with logo floated right (lockup style) 2026-07-03 01:36:49 +02:00
feder-cr 163ac7f787 docs: move LinkedIn badge from header to author footer 2026-07-03 01:30:11 +02:00
feder-cr 3d36af5ef6 docs: use HTML badges so they render centered + update logo 2026-07-03 01:20:46 +02:00
feder-cr a59d008a43 docs: add project logo to README 2026-07-03 01:15:03 +02:00
feder-cr 233f4b088f ci: skip the heavy e2e on docs-only pushes (paths-ignore) 2026-07-02 00:17:03 +02:00
feder-cr e1de4c3d96 docs: re-add stars badge in the reliable plain format (Skyvern-style) 2026-07-01 16:25:42 +02:00
feder-cr daf84f78cd docs: drop GitHub stars badge (redundant + flaky; big repos don't use one) 2026-07-01 16:21:08 +02:00
feder-cr bf302701c6 docs: fix stars badge (drop flaky social/.svg format) 2026-07-01 16:17:11 +02:00
feder-cr dd59c41bb5 docs: title + full subtitle 2026-07-01 04:01:46 +02:00
feder-cr 24ad6e4233 docs: shorten title 2026-06-30 20:27:22 +02:00
feder-cr 7914f3d006 docs: single-line title 2026-06-30 20:25:40 +02:00
feder-cr 050ec1aa61 docs: subtitle uses 'passes' 2026-06-30 20:24:42 +02:00
feder-cr 07a812c1f2 docs: short title + concise subtitle 2026-06-30 20:24:23 +02:00
feder-cr 1c942713aa docs: trim title 2026-06-30 19:45:35 +02:00
feder-cr acc5c27d5b docs: make the title a one-line description 2026-06-30 19:45:08 +02:00
feder-cr 4cbe475473 docs: short title + concise description subtitle 2026-06-30 19:44:02 +02:00
feder-cr 1b22e1bb4a docs: put badges above the title 2026-06-30 19:36:59 +02:00
feder-cr 9ad2b1eee6 docs: drop Firefox version badge, merge LinkedIn into the badge row 2026-06-30 19:35:54 +02:00
feder-cr dbffc52570 docs: shorten hero to a single line 2026-06-30 19:33:38 +02:00
feder-cr 81849a32d2 docs: refine hero tagline 2026-06-30 19:32:51 +02:00
feder-cr e4c31427e3 docs: tighten hero tagline 2026-06-30 19:29:34 +02:00
feder-cr f26df624c4 docs: trim hero tagline 2026-06-30 19:28:36 +02:00
feder-cr 4f882b550f docs: hero opens with the project name 2026-06-30 19:27:33 +02:00
feder-cr 74ad6d0fce docs: hero tagline reflects both pillars (real browser + human behavior) 2026-06-30 19:11:45 +02:00
feder-cr cfa33e8756 docs: rewrite How it works around the two-question model (real browser + human behavior) 2026-06-30 19:07:26 +02:00
feder-cr d85e407bbc docs: remove the How it compares section (clutter) 2026-06-30 04:00:07 +02:00
feder-cr 475cb3f4fc docs: swap order of How it compares and the proxy section 2026-06-30 03:58:53 +02:00
feder-cr eeddb8fcde docs: promote the proxy section to a top-level heading 2026-06-30 03:56:03 +02:00
feder-cr 7e06d60f04 docs: truthful proxy framing (public/known IPs, not datacenter) 2026-06-30 01:47:09 +02:00
feder-cr 92b374a497 docs: bulleted How it works, bridge to solution, drop the suites claim 2026-06-30 01:38:52 +02:00
feder-cr fa869c52b8 docs: merge the C++ paragraph into the intro (drop the subheading) 2026-06-30 01:30:10 +02:00
feder-cr 7a42984158 fix(deps): cap playwright <1.61 and pin it in the e2e clean venv
Playwright 1.61.0 (2026-06-29) ships a Browser.setDefaultViewport Juggler
call the published firefox-13 binary does not implement, so an unpinned
pip install (the wrapper declared playwright>=1.40) breaks new_context on
fresh installs. Cap the dependency to <1.61 and force the blessed pin in
the e2e clean venv so CI tests the version users actually run.
2026-06-30 09:00:00 +00:00
feder-cr 95b1e47e0c docs: align Proxies usage note to 90/10 for consistency 2026-06-29 18:07:13 +02:00
feder-cr 62007c21d8 docs: rewrite How it works (browser undetectable, proxy is the remaining variable) 2026-06-29 18:06:46 +02:00
feder-cr 6cca6b3a69 docs: sharpen the proxy framing (99% already flagged as proxies) 2026-06-29 17:48:35 +02:00
feder-cr 3046ca17d3 docs: phrase sx.org as a recommendation, not a partnership 2026-06-29 17:46:21 +02:00
feder-cr 2aa14d9b5b docs: drop the competitor-naming intro line in How it compares 2026-06-29 17:44:21 +02:00
feder-cr 0b5edf4e35 docs: note proxy partner in the Proxies usage section 2026-06-29 17:37:50 +02:00
feder-cr 0e6b0dddfe docs: add proxy partner note to How it works 2026-06-29 17:32:29 +02:00
feder-cr 2184f6f3c2 docs: restore C++ paragraph content, remove em-dashes 2026-06-25 04:32:32 +02:00
feder-cr d35ac458a7 docs: remove LLM phrasing throughout README 2026-06-25 04:31:47 +02:00
feder-cr 567d921d5f docs: merge and trim C++ patch paragraphs 2026-06-25 04:30:01 +02:00
feder-cr 0b54484b63 docs: remove auth implementation detail from README 2026-06-25 04:28:44 +02:00
feder-cr be940b0084 docs: remove preferences line from README 2026-06-25 04:27:32 +02:00
feder-cr 29df4e873c docs: shorten Chromium point in README 2026-06-25 04:26:40 +02:00
feder-cr 9b9e63972c docs: add educational disclaimer to README 2026-06-25 04:25:03 +02:00
feder-cr 168179eb03 docs: remove LLM phrasing from README 2026-06-25 04:23:59 +02:00
feder-cr 02b5f397ad docs: rewrite SECURITY.md, add disclaimer, remove LLM language 2026-06-25 04:22:39 +02:00
feder-cr 82eb22634e chore: remove LLM-style phrasing from issue templates 2026-06-25 04:16:47 +02:00
feder-cr 929c30219f chore: remove security vulnerability contact link from issue config 2026-06-25 04:15:08 +02:00
feder-cr 01d56601ae chore: remove feature request issue template 2026-06-25 04:14:05 +02:00
feder-cr b00bd74a9e chore: remove firefox source bug link from issue config 2026-06-25 04:08:24 +02:00
feder-cr 64641db82e chore: update stealth detection issue template
- add Firefox revision field
- replace verbose verdict field with reproduction script
- rename snippet label to Reproduction script
2026-06-25 04:07:07 +02:00
feder-cr 74b674516b fix(fonts): core pool uses the real Win11 family "franklin gothic medium"
The pool had the bare "franklin gothic", which isn't a real Win11 family and
wouldn't match the bundled franklingothic_x.ttf, so the always-present standard
fonts test failed and the family could drop off the whitelist. Use the real
name (the bundle reconciliation already maps it).
2026-06-24 09:37:11 +02:00
feder-cr 2bc52f4a61 Pin firefox-13: geo-aware locale/Intl + Windows font bundle + audio gate
firefox-13 ships the bundled Windows fonts, makes navigator.languages /
Accept-Language / the Intl locale all follow the proxy country, and gates the
audio fingerprint noise off. The prefs.py change that emits the new font/locale
prefs needs this binary, so the bump and that change land together.
2026-06-24 09:33:45 +02:00
feder-cr 3c0efa2d4f Geo-aware locale, audio noise off, font prefs for the bundled-font binary
locale defaults to "auto" and resolves from the proxy egress country the same
way timezone does - it reuses the egress IP, maps the country to a BCP-47 locale
with the offline mmdb, and falls back to en-US. prefs emit juggler.locale.override
(the full Accept-Language list) so the binary keeps navigator.languages and the
Intl default locale in sync.

The audio fingerprint noise is off in the baseline. Font prefs match the new
binary: the sampled whitelist drives font.system.whitelist, system-ui is Segoe
UI, the bundled fonts are activated, and the CSS generics are pinned to Windows
defaults so they resolve on a non-Windows host too.
2026-06-23 17:51:58 +02:00
feder-cr 8f4b20a19d Pin firefox-12: cross-OS render parity + always-present standard fonts
- BINARY_VERSION -> firefox-12 (self-calibrating font widths, per-family canvas
  distinctness, render-noise that preserves solid reference renders).
- font_pool: the standard Windows fonts (Calibri, Franklin Gothic, Gadugi,
  Javanese Text, Myanmar Text) move from the per-profile optional set to core,
  so they are always present and the detected font set matches a real Windows
  install on every host. Defensive dedup in derive_font_prefs.
- GPU persona applied on every platform (Linux/macOS present a coherent Windows
  GPU + WebGL params); pool re-rooted on a real-device GPU mix; render seeds
  recalibrated.
- prefs: emit absolute per-family font widths that the binary self-calibrates.
- geoip: always pull the latest mmdb via the releases/latest permalink, checked
  each launch, offline-safe (no pinned tag that can 404).
- tests: per-font canvas distinctness, solid-readback purity under render-noise,
  always-present standard-font invariant, no duplicate families.
2026-06-19 03:19:30 +02:00
746 changed files with 223022 additions and 16567 deletions

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
# The pre-push hook is a shell script, and git must never hand it to a POSIX
# shell with CRLF line endings: `/bin/sh^M: bad interpreter` is how a gate stops
# running on a machine where nothing else looks wrong. This repo is developed on
# Windows with core.autocrlf=true, so without this line a fresh Windows clone
# gets CRLF in the working tree - and Git-for-Windows' sh is the one that runs it.
#
# The index has always stored LF, so a Linux clone was never affected. That is
# exactly why this was worth pinning rather than leaving to a default that
# happens to be right today.
.githooks/** text eol=lf
# The publish ledger is compared byte for byte across an autocrlf checkout and a
# Linux one. The gate folds CRLF vs LF deliberately, but there is no reason to
# make it do that work.
PUBLISHED.json text eol=lf
Regular → Executable
+46 -22
View File
@@ -1,31 +1,55 @@
#!/bin/sh
# Pre-push hook: blocks push if the test suite isn't fully green.
# Pre-push gate. THE POLICY IS NOT IN THIS FILE - it is `invisible_core.hooks`,
# and this stub exists only to find an interpreter and hand over stdin.
#
# Enable once with:
# It used to be here, in three repositories, as 743 lines of shell that were 207
# identical lines out of 211 between two of them. Nine of the eleven differences
# were accidental: the core ran no pytest, the core set a variable three times
# that only the other two ever read, the core resolved an interpreter and then
# called bare `python` anyway. Every fix landed in whichever copy was open.
#
# What this repository wants gated is declared in its own pyproject, under
# [tool.invisible.hooks]. That is the only per-repo part, and it is data.
#
# Install once with:
# git config core.hooksPath .githooks
#
# Bypass for a known-broken WIP push (NOT for releases):
# git push --no-verify
# The --no-verify flag is the only escape hatch. Use it sparingly and never
# for branches that feed into a release.
# A test in this repo fails in an uninstalled checkout, so nobody has to
# remember. Bypass a known-broken WIP push with `git push --no-verify`; that is
# the only escape hatch, and never for a branch that feeds a release.
set -e
# No `set -e`: exit codes here have to be READ and explained, not turned into a
# silent abort. A gate that dies without a message is the worst shape of all.
echo "[pre-push] running unit + integration tests before push..."
# Run from the repository root regardless of where `git push` was invoked.
cd "$(dirname "$0")/.." || exit 1
# Run from this script's directory so it works regardless of where the user
# invoked git push from.
cd "$(dirname "$0")/.."
# Default pyproject addopts skip slow/e2e. That's the gate we want for every
# push — fast feedback. e2e is reserved for explicit release runs.
if ! python -m pytest -q --tb=short; then
echo ""
echo "[pre-push] TESTS FAILED — push aborted."
echo "[pre-push] Either fix the failure or use 'git push --no-verify' if"
echo "[pre-push] you really know what you're doing (NOT for release branches)."
python_bin=""
for candidate in "$INVISIBLE_GATE_PYTHON" python3 python py; do
[ -n "$candidate" ] || continue
if command -v "$candidate" >/dev/null 2>&1; then
python_bin="$candidate"
break
fi
done
if [ -z "$python_bin" ]; then
echo "[pre-push] REFUSED - no python on PATH, so no gate can run." >&2
echo "[pre-push] Nothing must be pushed past a hook that could not check it." >&2
echo "[pre-push] Set INVISIBLE_GATE_PYTHON to an interpreter and push again." >&2
exit 1
fi
echo "[pre-push] all tests green — push proceeding."
exit 0
# `src` first so a checkout gates itself with the policy in the tree being
# pushed. os.getcwd() rather than $PWD on purpose: under git-bash on Windows
# $PWD is /c/... and Python does not resolve that mount.
# exec, so stdin (the refs git is pushing) reaches the policy untouched.
exec "$python_bin" -c 'import os, sys
sys.path.insert(0, os.path.join(os.getcwd(), "src"))
try:
from invisible_core.hooks import main
except ImportError as exc:
sys.exit("[pre-push] REFUSED - cannot import invisible_core.hooks (%s).\n"
"[pre-push] The pre-push policy lives in invisible-core. This repo is\n"
"[pre-push] either that package (so src/ is not where it should be) or\n"
"[pre-push] pins it exactly (so install it). Either way, nothing is\n"
"[pre-push] pushed past a hook that could not check it." % exc)
sys.exit(main())'
+1 -1
View File
@@ -72,7 +72,7 @@ body:
id: logs
attributes:
label: Extra logs
description: Output of `DEBUG=pw:browser* python yourscript.py 2>&1`. Optional but speeds things up.
description: Output of `DEBUG=pw:browser* python yourscript.py 2>&1`. Optional.
render: text
validations:
required: false
@@ -79,8 +79,8 @@ body:
id: url
attributes:
label: URL
description: The exact URL passed to `page.goto`. Not "the homepage" — the literal string.
placeholder: https://id.sky.com/
description: The exact URL passed to `page.goto`. Not "the homepage", the literal string.
placeholder: https://example.com/login
validations:
required: true
@@ -88,7 +88,7 @@ body:
id: snippet
attributes:
label: Runnable reproduction
description: A complete snippet we can copy, paste, run. Stub creds with placeholders, keep everything else literal.
description: Runnable. Stub creds, keep everything else literal.
render: python
value: |
from invisible_playwright import InvisiblePlaywright
+18 -22
View File
@@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
Use this when something detects the browser (Fingerprint Pro, CreepJS, BotD, reCAPTCHA, Cloudflare, sannysoft, etc).
Use this when something detects the browser (Fingerprint Pro, CreepJS, BotD, reCAPTCHA, sannysoft, etc).
Bugs in operations (clicks, navigation) go to the site/action template.
Browser failing to start goes to the launch failure template.
@@ -14,10 +14,20 @@ body:
id: version
attributes:
label: Version
description: Output of `python -m invisible_playwright version`.
placeholder: 0.1.7 (binary firefox-7)
validations:
required: true
- type: input
id: firefox_rev
attributes:
label: Firefox revision
description: The `firefox-N` tag the binary was built from (shown in the version output above).
placeholder: firefox-7
validations:
required: true
- type: dropdown
id: os
attributes:
@@ -59,22 +69,7 @@ body:
attributes:
label: Detector name and URL
description: Exact site / service / product that flagged us.
placeholder: Fingerprint Pro — https://demo.fingerprint.com/playground
validations:
required: true
- type: textarea
id: scores
attributes:
label: Detector verdict
description: Paste the relevant flags / scores verbatim. For Fingerprint Pro paste `bot`, `vpn`, `virtual_machine`, `tampering*`, `vm_ml_score`, `suspect_score`. For CreepJS the headless / lies / trust scores. For reCAPTCHA v3 the score number.
render: text
placeholder: |
bot: bad
vpn: true
virtual_machine: true
vm_ml_score: 0.74
suspect_score: 22
placeholder: Fingerprint Pro - https://demo.fingerprint.com/playground
validations:
required: true
@@ -82,15 +77,15 @@ body:
id: screenshot
attributes:
label: Screenshot of the detector result
description: Drag-drop a screenshot of the detector page so we see what you see.
description: Screenshot of the detector result.
validations:
required: true
- type: textarea
id: snippet
attributes:
label: How you launched
description: The InvisiblePlaywright launch + navigation that produced the result above. Redact creds.
label: Reproduction script
description: Runnable. Redact creds.
render: python
value: |
from invisible_playwright import InvisiblePlaywright
@@ -99,6 +94,7 @@ body:
ctx = browser.new_context()
page = ctx.new_page()
page.goto("https://demo.fingerprint.com/playground")
# add any extra steps needed to reach the flagged result
validations:
required: true
@@ -106,7 +102,7 @@ body:
id: expected
attributes:
label: What you expected
description: Most detectors will never give a perfect score for any browser. Tell us what threshold you'd accept (e.g. bot=not_detected, vm_ml_score < 0.3).
description: "e.g. bot=not_detected, vm_ml_score < 0.3"
validations:
required: true
@@ -114,7 +110,7 @@ body:
id: full_report
attributes:
label: Full detector response
description: For Fingerprint Pro paste the JSON from /api/event/v4/ if you have it. For CreepJS paste the full Smart Signals block. Optional but speeds things up a lot.
description: "FP Pro: JSON from /api/event/v4/. CreepJS: Smart Signals block. Optional."
render: json
validations:
required: false
-6
View File
@@ -1,11 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/feder-cr/invisible_playwright/security/advisories/new
about: Report a security issue privately. Do NOT open a public issue.
- name: Bug in the patched Firefox source (C++, IDL, Juggler JS)
url: https://github.com/feder-cr/invisible_firefox/issues
about: Source-level patches in the Firefox fork go in the invisible_firefox repo. Detection results (FpJS, CreepJS, etc.) use the stealth detection template here.
- name: Question or general discussion
url: https://github.com/feder-cr/invisible_playwright/discussions
about: Usage questions, ideas, chat. Bugs and features still go in issues.
@@ -1,47 +0,0 @@
name: Feature request
description: Suggest a new feature or improvement
title: "[feature] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for the suggestion! Please check that:
- Your idea is **in scope** for this repo (the Python wrapper, sampler, CLI, packaging).
- Changes to the patched Firefox C++ source belong at [feder-cr/firefox-stealth](https://github.com/feder-cr/firefox-stealth) instead.
- You have searched [existing issues](https://github.com/feder-cr/invisible_playwright/issues?q=is%3Aissue) for similar requests.
- type: textarea
id: problem
attributes:
label: Problem
description: What problem does this solve? What can't you currently do, or what is awkward today?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: How would the feature work? API sketches, CLI examples, or pseudocode welcome.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Other approaches you thought about and why they fall short.
validations:
required: false
- type: textarea
id: context
attributes:
label: Additional context
description: Links to related issues, prior art in other libraries, screenshots, etc.
validations:
required: false
- type: checkboxes
id: contribute
attributes:
label: Are you willing to contribute?
options:
- label: I'd be willing to open a PR for this if accepted.
required: false
+1 -1
View File
@@ -37,4 +37,4 @@ Describe what you ran:
- [ ] I added or updated tests covering the change.
- [ ] `pytest` passes locally.
- [ ] I updated `README.md` / `docs/` if user-visible behavior changed.
- [ ] My change is in scope for this repo (Python wrapper / sampler / CLI / packaging — not the patched Firefox C++ source).
- [ ] My change is in scope for this repo (Python wrapper / sampler / CLI / packaging - not the patched Firefox C++ source).
+207
View File
@@ -0,0 +1,207 @@
# ─────────────────────────────────────────────────────────────────────────────
# core-on-index.yml - the one question every job in this repo has to answer
# before it can install anything: is the invisible-core version we pin actually
# on the package index?
#
# WHY THIS EXISTS.
# [project].dependencies now carries a real specifier, `invisible-core==N.M.0`,
# instead of a `name @ git+url@ref` direct reference. That was measured to be
# the stronger contract: a direct reference has no version to compare, so
# `pip check` is structurally blind to a violated one, while a real specifier
# makes it exit 1, and a plain `pip install` of this package repairs an
# environment somebody broke by hand. The cost is that every `pip install` in
# this repo now has to RESOLVE that dependency from the index.
#
# The publish order is fixed and non-negotiable: invisible-core is uploaded
# FIRST, its consumers after it - two until invisible_firefox was deleted on
# 2026-08-18, this package since. So there is a window - from the first push
# of this repo to GitHub until the core's first upload - in which every install
# step here cannot possibly succeed, for a reason nobody can fix from inside
# this repository.
#
# WHAT WE DO ABOUT IT, AND WHAT WE REFUSE TO DO.
# The tempting fix is to make the install tolerant: `|| true`, `--no-deps`, or
# a fallback that pulls the core straight from git. All three are worse than a
# red run. `|| true` and `--no-deps` produce a GREEN job that installed nothing
# and tested nothing, which is a lie that survives long after the window has
# closed. The git fallback is worse still: it satisfies the pin by name and
# version with content nobody compared, which is the exact failure mode the
# `==` specifier was adopted to expose.
#
# So this workflow asks the index and reports a verdict, and the callers make
# their real jobs depend on it. Three outcomes, all of them visible:
#
# the project is not on the index at all
# -> the publish window. This job passes, emits a ::warning:: annotation
# on the run page, writes the reason into the run summary, and returns
# available=false. Every caller job is then SKIPPED - grey in the
# checks list, not green - and the summary says in words that no tests
# ran. Nobody can mistake it for a passing build.
#
# the project is on the index and carries the pinned version
# -> available=true. Every caller job runs exactly as it did before this
# file existed. Nothing is weakened, ever.
#
# the project is on the index but NOT at the pinned version
# -> this is not the window. The core has been published, so the pin
# names a version that was never uploaded. Hard failure, red.
#
# Anything ambiguous (index unreachable, malformed answer, no `==` pin in
# pyproject.toml, two of them) is also a hard failure. A gate that answers
# "skip" when it does not know would silently disable this repo's whole CI the
# first time PyPI has a bad minute.
#
# This does NOT stop being useful once the core is published: it is the check
# that catches a pin pointing at a version that does not exist, about 20s
# before the install step would have failed with a resolver wall of text.
# ─────────────────────────────────────────────────────────────────────────────
name: core-on-index
on:
workflow_call:
outputs:
available:
description: >-
"true" when the invisible-core version pinned in pyproject.toml can
be resolved from the package index. Any other value means the caller
must not attempt an install.
value: ${{ jobs.probe.outputs.available }}
pin:
description: The invisible-core version this repo pins.
value: ${{ jobs.probe.outputs.pin }}
permissions:
contents: read
jobs:
probe:
name: is the pinned invisible-core on the index?
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
available: ${{ steps.probe.outputs.available }}
pin: ${{ steps.probe.outputs.pin }}
steps:
# SHA-pinned like e2e.yml: this job decides whether the rest of the repo's
# CI runs at all, so it is the last place to want a moving tag.
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' } # tomllib
- id: probe
shell: bash
run: |
python - <<'PY'
import json, os, re, sys, time, tomllib, urllib.error, urllib.request
DIST = "invisible-core"
PIN_RE = re.compile(
r"\s*(?P<name>[A-Za-z0-9][A-Za-z0-9._-]*)\s*"
r"(?:\[[^\]]*\])?\s*==\s*(?P<version>[^\s;,]+)")
def norm(name):
"""PEP 503: invisible_core and invisible-core are one name."""
return re.sub(r"[-_.]+", "-", name).lower()
def write(path_var, text):
path = os.environ.get(path_var)
if path:
with open(path, "a", encoding="utf-8") as fh:
fh.write(text + "\n")
def die(msg):
print(f"::error title={DIST} pin::{msg}")
write("GITHUB_STEP_SUMMARY",
f"### CI stopped: the {DIST} pin cannot be verified\n\n{msg}\n")
sys.exit(1)
# ---- what do we pin? -------------------------------------------------
try:
deps = tomllib.loads(
open("pyproject.toml", "rb").read().decode("utf-8")
)["project"]["dependencies"]
except Exception as e:
die(f"pyproject.toml has no readable [project].dependencies: {e!r}")
pins = []
for dep in deps:
m = PIN_RE.match(dep) if isinstance(dep, str) else None
if m and norm(m.group("name")) == DIST:
pins.append(m.group("version"))
if len(pins) != 1:
die(f"expected exactly one `{DIST}==X.Y.Z` requirement in "
f"[project].dependencies, found {pins or 'none'}. Either the pin was "
f"loosened, replaced by a direct reference, or duplicated. This gate "
f"will not guess which core the build is supposed to wait for. "
f"Declared: {deps}")
pin = pins[0]
print(f"pyproject.toml pins {DIST}=={pin}")
write("GITHUB_OUTPUT", f"pin={pin}")
# ---- is it on the index? --------------------------------------------
url = f"https://pypi.org/simple/{DIST}/"
req = urllib.request.Request(
url, headers={"Accept": "application/vnd.pypi.simple.v1+json"})
data = unpublished = None
last = ""
for attempt in range(1, 4): # retry transient failures, never guess
try:
with urllib.request.urlopen(req, timeout=30) as r:
data = json.load(r)
break
except urllib.error.HTTPError as e:
if e.code == 404:
unpublished = True
break
last = f"HTTP {e.code}"
except Exception as e:
last = repr(e)
print(f"index probe attempt {attempt}/3 failed: {last}")
if attempt < 3:
time.sleep(5 * attempt)
if data is None and not unpublished:
die(f"could not read {url} after 3 attempts ({last}). That is not a "
f"verdict, so this job fails instead of guessing. Re-run it.")
if unpublished:
msg = (f"{DIST} has never been published to the index. This is the "
f"expected publish window: the core is uploaded first, this "
f"repo's package after it.")
print(f"::warning title={DIST} is not on the index yet::{msg} "
f"NOTHING WAS INSTALLED AND NO TEST RAN in this workflow run.")
write("GITHUB_STEP_SUMMARY",
f"### NO TESTS RAN\n\n{msg}\n\n"
f"Every job in this workflow was **skipped**, not passed. "
f"`pyproject.toml` pins `{DIST}=={pin}`; until that version is on "
f"the index no `pip install` in this repository can resolve, so "
f"there is nothing to run. Publish `{DIST}=={pin}`, then re-run "
f"this workflow - the jobs come back on their own, with no edit "
f"to any file here.\n")
write("GITHUB_OUTPUT", "available=false")
sys.exit(0)
versions = data.get("versions")
if not versions:
die(f"{url} answered but listed no versions. The index API changed shape "
f"or served something unexpected; refusing to turn that into a skip.")
if pin not in versions:
shown = sorted(versions)[-10:] # diagnostics only, so a plain sort
die(f"pyproject.toml pins {DIST}=={pin}, but the index publishes "
f"{len(versions)} version(s) ({', '.join(shown)}) and not {pin}. "
f"{DIST} exists, so this is NOT the "
f"publish window - the pin names a version that was never uploaded. "
f"Fix the pin (workbench: python scripts/sync_core_pin.py) or publish "
f"the core first.")
print(f"{DIST}=={pin} is on the index - the workflow runs normally.")
write("GITHUB_OUTPUT", "available=true")
PY
- name: Say so in the run summary
if: steps.probe.outputs.available == 'true'
run: |
echo "invisible-core==${{ steps.probe.outputs.pin }} is on the index; jobs run normally." \
>> "$GITHUB_STEP_SUMMARY"
+146
View File
@@ -0,0 +1,146 @@
# ─────────────────────────────────────────────────────────────────────────────
# e2e-hunt.yml - runs the e2e suite in a LOOP until it catches a hang.
#
# Why it exists. The e2e job hangs in 12% of runs (4 out of 33 between
# 2026-08-01 and 08-13), and the 40-minute ceiling kills the job. At 12% a
# green run proves nothing, and it takes ~18 runs to have a 90% probability
# of seeing one: waiting for it to happen on its own on a PR means waiting
# days and burning someone else's time every time.
#
# And why HERE and not locally, for TWO different reasons depending on the
# `os` input.
#
# ubuntu-24.04 - the job hang lived there. CLOSED on 2026-08-13 with 36
# runs (two hunts of 18): zero hangs, zero retries. Stays as a
# non-regression check.
#
# windows-latest - a different question, still open: on the dev machine
# interaction tests produce retries (41 out of 17 runs) and on Linux not
# even one in 36. But that machine was not idle - whoever was measuring
# was running on it, and later the owner came back to it - so the
# comparison is CONFUSED between platform and contention. A dedicated
# Windows runner separates the two without asking anyone to stay off it
# for six hours.
#
# Doesn't start on its own: `workflow_dispatch` only. It's not a gate, it's
# an investigation tool, and it must not be added to the required contexts.
# ─────────────────────────────────────────────────────────────────────────────
name: e2e hunt
on:
workflow_dispatch:
inputs:
runs:
description: "How many runs at most (at 12% it takes ~18 for a 90% chance)"
required: false
default: "18"
os:
description: "Where to hunt. windows-latest answers a DIFFERENT question: are the interaction retries seen on the dev machine the product or contention?"
required: false
default: "ubuntu-24.04"
type: choice
options:
- ubuntu-24.04
- windows-latest
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
hunt:
name: hunt (${{ inputs.os }})
runs-on: ${{ inputs.os }}
# 18 runs of ~6 minutes plus install time. Deliberately generous: the
# ceiling here must NEVER be the thing that stops the hunt, or we're back
# to a killed job that explains nothing, which is the original defect.
timeout-minutes: 300
# On Windows GitHub runs `run:` blocks with POWERSHELL, not bash, and the
# first launch on windows-latest died in 5 minutes with a ParserError on
# the line `if [ "$RUNNER_OS" = "Linux" ]`. The block had been run before
# shipping it, as the rule requires - but in bash, on the writer's own
# machine, i.e. with an interpreter different from the target's.
# Running the block is not enough: it has to run with the runner's SHELL.
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install wrapper + test deps (+ pinned Playwright)
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
# Linux only: on Windows the browser launches on the runner's desktop,
# and `firefox-launch-matrix.yml` has shown for months that it really
# starts there.
- name: System deps (xvfb + Firefox runtime libs)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb
sudo "$(which python)" -m playwright install-deps firefox
- name: Fetch the published firefox binary
run: echo "FF=$(python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
- name: Loop until it catches one
env:
PYTHONUNBUFFERED: "1"
INVPW_TEST_WATCHDOG_FILE: evidence/e2e-watchdog.log
run: |
set -u
runs="${{ inputs.runs }}"
mkdir -p evidence/runs
# `evidence/` inside the workspace, not RUNNER_TEMP: on Windows that
# variable contains backslashes and does not cross bash reliably.
# xvfb only where it exists; on Windows the browser goes to the
# runner's desktop.
if [ "$RUNNER_OS" = "Linux" ]; then PRE="xvfb-run -a"; else PRE=""; fi
captured=0
for n in $(seq 1 "$runs"); do
log="evidence/runs/run_$(printf '%02d' "$n").log"
t0=$(date +%s)
set +e
$PRE python -u scripts/run_e2e.py "$FF" > "$log" 2>&1
code=$?
set -e
dur=$(( $(date +%s) - t0 ))
# A hang is no longer a killed job now: the per-test deadline
# turns it into a failure, and the banner names it.
if grep -aq "Timeout" "$log" && grep -aq "Stack of" "$log"; then
echo "::error::run $n: HANG CAUGHT after ${dur}s"
echo "--- the last test that spoke ---"
grep -aE "::.*(PASSED|SKIPPED|FAILED)" "$log" | tail -3
echo "--- the stack ---"
sed -n '/Timeout/,$p' "$log" | head -60
captured=1
break
fi
echo "run $n/$runs: exit=$code, ${dur}s"
done
if [ "$captured" = "0" ]; then
echo "::warning::$runs runs, no hang caught."
echo "If the rate here is the same 12%, the probability of this"
echo "outcome is $(python -c "print(round(100*0.88**$runs))")%, so this is not proof"
echo "the defect is not there: it is a measurement of the rate with this sample."
fi
# The step fails ONLY if it caught one: that way red means "found",
# not "broken", and red is what you go read.
exit "$captured"
- name: Upload all the evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: e2e-hunt-${{ inputs.os }}-${{ github.run_id }}-${{ github.run_attempt }}
path: |
evidence/runs
evidence/e2e-watchdog.log
if-no-files-found: warn
retention-days: 14
+100 -5
View File
@@ -1,17 +1,17 @@
# ─────────────────────────────────────────────────────────────────────────────
# e2e.yml — run the FULL browser-driving e2e suite (the 127 @pytest.mark.e2e)
# e2e.yml - run the FULL browser-driving e2e suite (the 127 @pytest.mark.e2e)
# on GitHub, on every push/PR to main.
#
# Why this can run on CI when the drive-gate had to stay light: the drive-gate
# launched Firefox in true HEADLESS mode, which is content-process unstable on
# the hosted runners (eval-CSP / context-destroyed). The stealth wrapper instead
# launches Firefox HEADED on a real display; under `xvfb-run` (a virtual X
# server) that's exactly what we get on a headless CI box — stable, and the same
# server) that's exactly what we get on a headless CI box - stable, and the same
# thing webrtc-e2e.yml already relies on.
#
# Secret-free, so it's safe in public CI: the binary is the PUBLIC firefox-9
# release (no token), and the webrtc e2e fake a local TCP-only SOCKS. The proxy
# realness gate (fppro / smartproxy) is NOT here — it needs secrets and stays a
# realness gate (fppro through a real proxy) is NOT here: it needs secrets and stays a
# local pre-release gate.
# ─────────────────────────────────────────────────────────────────────────────
name: e2e
@@ -19,16 +19,47 @@ name: e2e
on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
pull_request:
branches: [main]
# The same filter as `push` above, which had it and this one did not. A
# docs-only PR (#54, deleting the Pages site) therefore spun up the full
# browser bench, hung, and burned the whole 40-minute timeout on a change no
# test can observe. The filter belongs on BOTH triggers or it is not a filter.
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
workflow_dispatch:
permissions:
contents: read
# One run of this workflow per branch at a time. A newer push cancels the older
# in-flight run as a whole, cleanly, instead of leaving its queued jobs to be
# cancelled one by one - which left the run marked failed even though nothing
# had actually failed. Keyed by workflow + ref so tests and e2e never cancel
# each other; only an older run of THIS workflow on the same branch is replaced.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# The install below resolves `invisible-core==N.M.0` from the package index,
# and the core is published BEFORE this package. This gate answers whether it
# is on the index yet; during that window the e2e job is SKIPPED with the
# reason in the run summary rather than faked green, and once the core is up
# it runs unchanged. See .github/workflows/core-on-index.yml.
core-on-index:
uses: ./.github/workflows/core-on-index.yml
e2e:
name: e2e (linux, xvfb)
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
@@ -36,10 +67,21 @@ jobs:
with: { fetch-depth: 1 }
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install wrapper + test deps (+ pinned Playwright)
- name: Install wrapper + test deps (+ Playwright ONLY as a system tool)
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
# ⛔ The playwright package is NO LONGER a product dependency: the
# client lives in invisible_playwright._pw and the driver in _driver. It
# is installed here for ONE thing only, the `playwright install-deps
# firefox` step below, which downloads the SYSTEM libraries Firefox
# needs on a bare runner. The fork does not expose that subcommand
# on purpose (it is meant to drive, not to be a toolchain).
#
# That the product does not IMPORT it is verified by tests/test_fork.py,
# not from here: if someone one day reintroduced
# `from playwright...` in src/, this line would mask it, and that is
# exactly why that test exists.
python -m pip install "playwright==$(cat scripts/playwright_pin.txt)"
- name: System deps (xvfb + Firefox runtime libs)
run: |
@@ -49,4 +91,57 @@ jobs:
- name: Fetch the published firefox binary
run: echo "FF=$(python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
- name: Run the full e2e suite under a virtual display
run: xvfb-run -a python scripts/run_e2e.py "$FF"
# PYTHONUNBUFFERED, and it is not a nicety. Without it Python block-buffers
# stdout when it is a pipe, and this step printed NOTHING for 39 minutes
# before the 40-minute timeout killed it on 2026-08-04: a run with no
# verdict and no way to tell where it went. The variable is inherited by
# the pytest subprocess run_e2e.py spawns, which is where the output
# actually comes from.
env:
PYTHONUNBUFFERED: "1"
# The watchdog in tests/conftest.py: at 150s inside ONE test it writes
# HERE the stack of every thread, and repeats it. Two identical stacks say
# stuck, two different ones say slow - opposite diagnoses that no other
# tool distinguishes. To a FILE and not to stderr because pytest redirects
# the descriptors at the system level: whatever is captured is lost
# when the process is killed, which is exactly the case it exists for.
INVPW_TEST_WATCHDOG_FILE: ${{ runner.temp }}/e2e-watchdog.log
run: xvfb-run -a python -u scripts/run_e2e.py "$FF"
# Runs ONLY if the step above fails, and before 2026-08-13 it could not
# exist: the hang was killed by the 40-minute ceiling, so the job came out
# `cancelled` and the following steps did not start at all. With
# `--timeout 420 --timeout-method thread` the process dies at 7 minutes and the
# step fails NORMALLY, so the evidence comes out from here.
# A tool that cannot be seen is indistinguishable from one that does not exist.
# The announcement the watchdog prints when it opens the file ends up
# inside `pytest_runtest_setup`, which pytest CAPTURES: it does not show
# up in the job log, so from there one could not tell "armed" from "inert".
# This step asks the file instead, which is the only proof that exists.
- name: Was the watchdog armed?
if: always()
run: |
f="${RUNNER_TEMP}/e2e-watchdog.log"
if [ -s "$f" ]; then
# `|| true` is not cosmetic: `grep -c` that counts ZERO exits 1, and
# GitHub runs `run:` blocks with `bash -e`. Without it, this step
# died exactly on the HEALTHY runs - the ones with zero stacks - i.e.
# it would have failed every green e2e. Found by executing the block
# extracted from the YAML in all four states, not by rereading it.
watched=$(grep -ac '^---' "$f" || true)
stack=$(grep -ac 'Timeout' "$f" || true)
echo "armed: ${watched} tests watched, ${stack} stacks written"
else
echo "::warning::the watchdog file is missing or empty: the tool was NOT armed, and a hang would leave nothing"
fi
# `always()` and not `failure()`: the file is needed even when the run is
# green, because it is the only proof that the tool works.
- name: Upload the hang evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: e2e-watchdog-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/e2e-watchdog.log
if-no-files-found: warn
retention-days: 14
+61 -20
View File
@@ -1,14 +1,19 @@
name: firefox-launch-matrix
# Cross-Windows-edition smoke for the shipped firefox-N binary.
# Triggered by issue #22 (firefox-7 SxS mismatch on Win11 build 26200,
# reporter `jannusdorfer-create`).
# Cross-Windows-edition smoke for the SEALED binary, on every Windows runner
# GitHub offers, from a fresh checkout.
#
# Runs the exact reporter snippet on every Windows runner GitHub offers,
# from a fresh checkout. If any matrix cell fails the same way, the bug
# is reproducible on at least one clean-ish environment and we ship a
# sidecar mozglue.manifest fix. If all cells pass, the bug is confined
# to the reporter's specific environment (Pro/Enterprise GPO, EDR, etc.).
# HISTORY, and what this can no longer do. It was written for issue #22 (a SxS
# mismatch on Win11 build 26200) and ran the reporter snippet against firefox-7.
# It cannot: a sealed invisible-core serves the sealed tag and refuses every
# other one, so `fetch firefox-7` is a SealMismatch by design now.
#
# It was also SILENTLY WRONG from the seal landing to 2026-07-26: the verify
# step rebuilt the cache path by hand as Cache/firefox-7/firefox.exe while the
# cache is content-keyed (Cache/<tag>_<version>_<buildid>/), so every cell failed
# with NOT FOUND - a failure that looked exactly like the bug under investigation
# and was not. Nine red cells read as "reproduced everywhere". The path now comes
# from the last line of `fetch`, the command that verifies the sealed tree.
on:
workflow_dispatch:
@@ -17,15 +22,34 @@ on:
paths:
- '.github/workflows/firefox-launch-matrix.yml'
# Least privilege: this smoke matrix only checks out the repo and launches
# firefox.exe, so it needs nothing but read access to the contents. Without an
# explicit block the token would default to the repo's broader permissions.
permissions:
contents: read
jobs:
# `pip install .` below resolves `invisible-core==N.M.0` from the package
# index, and the core is published BEFORE this package. This gate answers
# whether it is there yet; during that window the smoke matrix is SKIPPED
# with the reason in the run summary rather than faked green, and once the
# core is up it runs unchanged. See .github/workflows/core-on-index.yml.
core-on-index:
uses: ./.github/workflows/core-on-index.yml
smoke:
name: launch (${{ matrix.os }}, py${{ matrix.python }})
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025, windows-latest]
python: ["3.11", "3.12", "3.13"]
# This is a "does firefox.exe launch" smoke test across Windows versions;
# the Python version does not change the answer, so one is enough. That
# takes this all-Windows (2x-cost) matrix from 9 jobs to 3.
python: ["3.12"]
steps:
- uses: actions/checkout@v4
@@ -57,17 +81,35 @@ jobs:
python -m pip install --upgrade pip
pip install .
- name: Fetch firefox-7 binary
run: python -m invisible_playwright fetch
- name: Verify firefox.exe can launch standalone (the snippet that fails for issue #22)
- name: Fetch the sealed binary
shell: pwsh
run: |
# The platformdirs path has the duplicated `invisible-playwright` segment
# on Windows (user_cache_dir convention).
$ffPath = "$env:LOCALAPPDATA\invisible-playwright\invisible-playwright\Cache\firefox-7\firefox.exe"
if (-not (Test-Path $ffPath)) {
Write-Error "firefox.exe NOT FOUND at $ffPath"
$fetchOutput = @(python -m invisible_playwright fetch)
$fetchExit = $LASTEXITCODE
$fetchOutput | ForEach-Object { Write-Host $_ }
if ($fetchExit -ne 0) {
exit $fetchExit
}
$ffPath = [string]($fetchOutput | Select-Object -Last 1)
$ffPath = $ffPath.Trim()
if (-not $ffPath -or -not (Test-Path $ffPath)) {
Write-Error "fetch reported no firefox.exe at '$ffPath'"
exit 1
}
"FF_PATH=$ffPath" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- name: Verify firefox.exe can launch standalone
shell: pwsh
run: |
# CARRY the path from fetch, never rebuild it. The cache directory is
# keyed on tag + base version + BuildID, so any string assembled here
# is a second copy of a naming rule that has already moved once - and
# when it drifts the step fails with NOT FOUND, indistinguishable from
# the launch bug this job exists to detect.
$ffPath = $env:FF_PATH
Write-Host "Package reports: $ffPath"
if (-not $ffPath -or -not (Test-Path $ffPath)) {
Write-Error "firefox.exe NOT FOUND at '$ffPath' (reported by fetch)"
exit 1
}
Write-Host "Launching: $ffPath --version"
@@ -100,7 +142,6 @@ jobs:
with:
name: launch-failure-${{ matrix.os }}-py${{ matrix.python }}
path: |
${{ env.LOCALAPPDATA }}/invisible-playwright/invisible-playwright/Cache/firefox-7/firefox.exe
${{ env.LOCALAPPDATA }}/invisible-playwright/invisible-playwright/Cache/firefox-7/mozglue.dll
${{ env.FF_PATH }}
if-no-files-found: warn
retention-days: 7
+68
View File
@@ -0,0 +1,68 @@
# ─────────────────────────────────────────────────────────────────────────────
# publish-wiki.yml - mirror the docs/ site into the GitHub wiki on every release.
#
# The wiki is a SEPARATE git repo (<repo>.wiki.git) with no Jekyll front matter
# and its own _Sidebar.md navigation, so this is a render, not a copy:
# scripts/build_wiki.py strips the front matter, rewrites [x](slug.md) internal
# links to the wiki's extensionless form, names each page by its slug (index.md
# becomes Home.md), and regenerates _Sidebar.md from the parent/nav_order tree.
#
# It runs on a published release (the docs the release ships are what the wiki
# should show) and on manual dispatch. The wiki checkout is wiped and rebuilt
# each run so a page deleted from docs/ also disappears from the wiki; nothing
# but generated output is ever committed.
#
# AUTH. Pushing to <repo>.wiki.git needs contents:write. The built-in
# GITHUB_TOKEN carries it here; if a run ever gets a 403 pushing the wiki
# (some org policies withhold wiki write from GITHUB_TOKEN), set a PAT with
# `repo` scope as the secret WIKI_TOKEN and it is used instead. No long-lived
# credential is committed either way.
name: publish-wiki
on:
release:
types: [published]
workflow_dispatch: {}
permissions:
contents: write
concurrency:
group: publish-wiki
cancel-in-progress: true
jobs:
publish-wiki:
runs-on: ubuntu-latest
steps:
- name: Check out the repo (docs + the converter)
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Render docs/ into a wiki build directory
run: python scripts/build_wiki.py docs wiki_build
- name: Publish to the wiki
env:
WIKI_PUSH_TOKEN: ${{ secrets.WIKI_TOKEN != '' && secrets.WIKI_TOKEN || github.token }}
run: |
set -euo pipefail
repo="${{ github.repository }}"
git clone "https://x-access-token:${WIKI_PUSH_TOKEN}@github.com/${repo}.wiki.git" wiki
# wipe old generated pages (keep .git) so deletions propagate
find wiki -maxdepth 1 -name '*.md' -delete
cp wiki_build/*.md wiki/
cd wiki
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --cached --quiet; then
echo "wiki already up to date"
else
git commit -m "docs: sync wiki from docs/ (${{ github.ref_name }})"
git push origin HEAD:master
fi
+299
View File
@@ -0,0 +1,299 @@
name: publish
# Publishing invisible-playwright from a tag, with no long-lived credential anywhere.
#
# WHAT REPLACED WHAT. This package was uploaded by hand, from one machine, with a
# long-lived PyPI token sitting on it. Two things follow from that and neither is
# hypothetical: the token is a standing credential whose blast radius is the whole
# project, and a hand-run twine has no gate in front of it - the ordering rules
# live in a person's memory.
#
# The credential here is the `pypi` GitHub Environment's OIDC trust relationship,
# minted per run and valid for minutes. Only the `upload` job names that
# environment, and `upload` declares `needs: gate`, so a red gate means the only
# job that can authenticate never starts. The ordering is a dependency, not a
# convention.
#
# BEFORE THE FIRST RUN, on PyPI: Manage project -> Publishing -> add a GitHub
# publisher with owner `feder-cr`, repository `invisible_playwright`, workflow
# `publish.yml`, environment `pypi`. Until that exists the upload fails with
# `invalid-publisher`, which is the correct failure: nothing has said this
# workflow may speak for this project. Revoke the long-lived token AFTER the
# first successful OIDC publish, not before.
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
jobs:
# Asked of the INDEX, first, because a tag can legitimately name a version that
# is already published: a tag backfilled for a hand-published release, a tag
# re-pushed, a re-run of this workflow. In all of those there is nothing to do
# and nothing wrong, and reaching twine would fail on a filename the index has
# already served - a red run for a situation that is fine.
already-published:
runs-on: ubuntu-latest
outputs:
present: ${{ steps.probe.outputs.present }}
version: ${{ steps.probe.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: probe
shell: bash
run: |
VERSION="$(grep -m1 '^version = ' pyproject.toml | cut -d'"' -f2)"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
CODE=$(curl -s -o /dev/null -w '%{http_code}' "https://pypi.org/pypi/invisible-playwright/$VERSION/json")
case "$CODE" in
200) echo "present=yes" >> "$GITHUB_OUTPUT"
echo "::notice::invisible-playwright $VERSION is already on the index. No-op, not a failure." ;;
404) echo "present=no" >> "$GITHUB_OUTPUT" ;;
*) echo "the index answered $CODE for $VERSION, which is neither present" >&2
echo "nor absent. Refusing rather than guessing." >&2
exit 1 ;;
esac
gate:
needs: already-published
if: needs.already-published.outputs.present != 'yes'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: the tag names the version being built
# A tag pointing at a different version publishes something nobody asked
# for, under a name that says otherwise. Skipped on workflow_dispatch,
# where there is no tag to compare against.
if: github.event_name == 'push'
shell: bash
run: |
TAG="${GITHUB_REF_NAME#v}"
HAVE="${{ needs.already-published.outputs.version }}"
if [ "$TAG" != "$HAVE" ]; then
echo "tag v$TAG does not name the version in pyproject.toml ($HAVE)" >&2
exit 1
fi
- name: the pinned invisible-core is ON THE INDEX
# THE ordering rule, as a gate instead of a sentence in a runbook. This
# package declares `invisible-core==X.Y.Z`, so pip resolves the PUBLISHED
# core - and a consumer released against a core that is not there yet is
# red on every runner and broken for every user while passing locally,
# because the workbench core is an editable install and cannot see this
# class of failure at all. Measured 2026-07-28: both consumers moved to a
# name a new core had, neither release could resolve it.
shell: bash
run: |
# BOTH spellings. PEP 503 normalises `invisible_core` and
# `invisible-core` to the same project, and the dependency here is
# written with the UNDERSCORE while every comment about it uses the
# hyphen. Written against the prose first, this grep matched nothing
# and the step exited 1 on a correct pyproject - caught by running it
# by hand before the first release rather than during one.
WANT=$(grep -oE 'invisible[-_]core==[0-9]+\.[0-9]+\.[0-9]+' pyproject.toml | head -1 | cut -d= -f3)
if [ -z "$WANT" ]; then
echo "no exact invisible-core== pin found in pyproject.toml" >&2
echo "(looked for invisible-core== and invisible_core==)" >&2
exit 1
fi
CODE=$(curl -s -o /dev/null -w '%{http_code}' "https://pypi.org/pypi/invisible-core/$WANT/json")
if [ "$CODE" != "200" ]; then
echo "invisible-core $WANT is not on the index (HTTP $CODE)." >&2
echo "Publish the core FIRST, then this package. In this order every" >&2
echo "install resolves; in the other one none of them do." >&2
exit 1
fi
echo "::notice::invisible-core $WANT is on the index"
- name: install the package and its dev extras
# Its own step, BEFORE the arming below: install_hooks.py imports
# invisible_core, and the first version of this file installed inside the
# suite step, so the arming ran against a runner that had nothing
# installed and died on ModuleNotFoundError. ci.yml has had this order
# all along; this workflow had simply never run.
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: arm the pre-push gates
# The suite asserts core.hooksPath is set and a fresh checkout has none.
run: python scripts/install_hooks.py
- name: the suite
# A tag push does not trigger the ordinary test workflow, which runs on
# branches and pull requests. Without this, tagging is a way to publish
# code no job has run.
run: python -m pytest -q
upload:
needs: [already-published, gate]
if: needs.already-published.outputs.present != 'yes'
runs-on: ubuntu-latest
environment: pypi # the trust relationship lives HERE, behind the gate
permissions:
id-token: write # trusted publishing; no token in a secret anywhere
contents: write # to commit the ledger entry back
pull-requests: write # and to open one when protection declines the push
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install --upgrade pip build
- run: python -m build
- name: twine check
run: |
pip install twine
twine check dist/*
- uses: pypa/gh-action-pypi-publish@release/v1
- name: record what was published, and commit it back
# The action above holds the OIDC credential and does the upload; the
# thing that writes PUBLISHED.json is invisible_core.release. So the
# first successful run of this workflow published 0.3.1 and recorded
# nothing - re-creating, on its first green run, the exact gap that had
# been back-filled by hand an hour earlier for 0.6.0 and 0.3.0.
#
# Recording the TREE is correct here and only here: this job is checked
# out at the tag, so the tree is what was built and uploaded. A backfill
# of a version published elsewhere must come from the artifacts the index
# serves instead, because the tree has moved on.
run: |
# `-e .` and not `.[dev]`: this is the job holding the OIDC
# credential and `contents: write`, and `record` needs the package
# importable plus a build backend, nothing else. The dev extra
# pulls pytest, ruff and - in the wrapper - the whole of
# Playwright into the one job that can push to main.
python -m pip install --quiet -e . build hatchling
python -m invisible_core.release record
if git diff --quiet -- PUBLISHED.json; then
echo "::warning::nothing recorded - the ledger did not change"
exit 0
fi
# The direct push CANNOT succeed while the branch requires status
# checks: a required check cannot have passed on a commit that does
# not exist yet, and since 2026-08-13 `enforce_admins` is TRUE, so
# not even a maintainer push has a bypass. Measured 2026-08-05 -
# every publish run on all three repos ended in failure with GH006,
# on releases that had shipped. So the push is tried, and when
# declined the entry goes to a branch and a pull request rather than
# nowhere. Green when it is preserved, red only when it is LOST.
#
# THE FALLBACK HAD NEVER RUN ONCE - repaired 2026-08-14, the same fix
# in all three repos. Two defects, and the first hid the second:
#
# 1. `HEAD:$LEDGER_BRANCH` cannot work from the detached HEAD a tag
# build checks out: the destination branch does not exist yet and
# the source is a commit object, so git cannot tell a branch from
# a tag and refuses with "The destination you provided is not a
# full refname". Under `bash -e` that aborts the step, so the
# pull request below was never even attempted and neither
# `::error::` was ever printed - which is why no `ledger/*`
# branch and no pull request has ever existed on any of the three
# repos, across four red runs on releases that had shipped.
# 2. Creating the pull request also needs "Allow GitHub Actions to
# create and approve pull requests" ON THE REPOSITORY, which is
# off on all three. The job's own `pull-requests: write` is
# necessary and not sufficient. So the pull request is BEST
# EFFORT: once the branch push lands the entry is safe, and the
# run does not go red over a convenience that a repository
# setting can withdraw.
VERSION=$(python -c "import json;print(json.load(open('PUBLISHED.json'))['released'][-1]['version'])")
git config user.name "feder-cr"
git config user.email "85809106+feder-cr@users.noreply.github.com"
git add PUBLISHED.json
git commit -m "record $VERSION as published"
BRANCH="${{ github.event.repository.default_branch }}"
if git push origin "HEAD:refs/heads/$BRANCH"; then
echo "::notice::ledger entry for $VERSION committed to $BRANCH"
exit 0
fi
echo "the direct push was declined; falling back to a branch and a pull request"
LEDGER_BRANCH="ledger/$VERSION"
if ! git push -f origin "HEAD:refs/heads/$LEDGER_BRANCH"; then
echo "::error::the ledger entry for $VERSION reached NEITHER $BRANCH NOR a branch of its own. It exists only in this run. Back-fill it by hand from the artifacts the index serves, or the next release is refused over a missing entry."
exit 1
fi
echo "::notice::the ledger entry for $VERSION is preserved on branch $LEDGER_BRANCH"
CODE=$(curl -s -o /tmp/pr.json -w '%{http_code}' -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${{ github.repository }}/pulls" \
-d "{\"title\":\"record $VERSION as published\",\"head\":\"$LEDGER_BRANCH\",\"base\":\"$BRANCH\",\"body\":\"The upload succeeded and the ledger could not be pushed to $BRANCH directly: branch protection declines this token, which has no bypass. Merging this keeps the next release from being refused over a missing entry.\"}")
if [ "$CODE" = "201" ] || [ "$CODE" = "422" ]; then
echo "::error::the ledger for $VERSION is NOT on $BRANCH. Branch $LEDGER_BRANCH carries it and a pull request is open (HTTP $CODE; 422 means one already exists). Merge it before the next release."
else
echo "::error::the ledger for $VERSION is NOT on $BRANCH. Branch $LEDGER_BRANCH carries it and the pull request could NOT be created (HTTP $CODE - 403 means the repository forbids Actions from creating pull requests). Open and merge it by hand before the next release."
fi
exit 0
- name: create the release page for this tag
# Measured 2026-08-11: after pushing three tags, FOUR versions out of four
# had no release page, and it was this repo's own gate
# (`test_the_published_version_has_a_github_release`, in
# `test_release_e2e.py`) that found them AFTER publication. A tag with no
# release page is not cosmetic: that gate walks EVERY version on the
# index, so one omission refuses a later run for a version nobody is
# releasing that day.
#
# Runs only on the tag path - `workflow_dispatch` has no tag to describe.
# Idempotent on purpose: a re-pushed tag, a re-run, or a page created by
# hand must all be a no-op rather than a failure, which is the same rule
# `already-published` follows one job up.
#
# The body comes from CHANGELOG.md when the repo keeps one (only this one
# does) and is generated otherwise. One step, both cases, so the three
# repos carry the same text instead of three variants that drift.
if: startsWith(github.ref, 'refs/tags/')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${GITHUB_REF#refs/tags/}"
VERSION="${TAG#v}"
if gh release view "$TAG" > /dev/null 2>&1; then
echo "::notice::the release page for $TAG already exists - nothing to do"
exit 0
fi
if [ -f CHANGELOG.md ]; then
awk -v v="$VERSION" '
$0 ~ ("^## \\[" v "\\]") { p = 1; next }
p && /^## \[/ { exit }
p { print }
' CHANGELOG.md > /tmp/notes.md
else
: > /tmp/notes.md
fi
# A body that is only whitespace reads as a page nobody wrote. Say what
# is true instead: the version, and where the artifacts actually are.
#
# The PyPI name is the repository name with hyphens: the repo is
# `invisible_playwright` and the project is `invisible-playwright`.
# PyPI redirects the underscore form, so getting this wrong would have
# produced a link that works and is still wrong to read. And no
# backticks in the body - they would be command substitution inside a
# double-quoted shell string, which is how fourteen quoted terms once
# became empty strings.
PKG=$(printf '%s' "${{ github.event.repository.name }}" | tr '_' '-')
if [ -z "$(tr -d '[:space:]' < /tmp/notes.md)" ]; then
printf '%s\n' \
"$PKG $VERSION is on PyPI." \
"" \
"Artifacts and checksums: https://pypi.org/project/$PKG/$VERSION/" \
> /tmp/notes.md
fi
if gh release create "$TAG" --title "$TAG" --notes-file /tmp/notes.md; then
echo "::notice::release page created for $TAG"
exit 0
fi
echo "::error::the release page for $TAG could not be created. The package IS published; create the page by hand or a later run of the release gate will refuse over it."
exit 1
-479
View File
@@ -1,479 +0,0 @@
# ─────────────────────────────────────────────────────────────────────────────
# release.yml — build all 5 patched-Firefox targets at $0 and publish them as
# DRAFT GitHub Release assets, named per the wrapper contract (constants.ARCHIVE_NAME).
# DRAFT on purpose: a human runs the realness gate and only THEN un-drafts + bumps
# BINARY_VERSION. Nothing auto-ships (issue #14 lesson).
#
# PACKAGING (issue #14: dangling symlinks broke 265 downloads — never again):
# Linux → cp -aL (dereference ALL symlinks into real files) + rm dev tools +
# strip + sanitize + tar at ROOT, then validate_release.py as a HARD
# in-pipeline gate (the exact battle-tested script from the source repo).
# Win → mach package; zip the CONTENTS of dist/firefox (clean tree, NOT
# dist/bin) so firefox.exe sits at the zip ROOT.
# macOS → mach package; ad-hoc codesign the .app; PRESERVE its internal relative
# symlinks (a .app legitimately has them — cp -aL would break it); verify
# every symlink is relative+internal; tar the bundle. --version self-gate.
#
# DRIVE GATE (the firefox-8 catcher): after build, every binary is DRIVEN by
# Playwright on its native runner (launch via juggler + real page + JS roundtrip,
# headless, no screenshot → GPU-free, zero proxy). A juggler-less binary renders
# a screenshot fine but is undrivable — only an actual drive catches that. The
# proxy realness gate (fppro/webrtc) stays LOCAL — it needs secrets.
#
# Trigger: push a tag `firefox-N`, or run manually. Hybrid runners, all free.
# ─────────────────────────────────────────────────────────────────────────────
name: release
on:
push:
tags: ['firefox-*']
workflow_dispatch:
inputs:
source_ref:
description: 'invisible_firefox ref to build'
default: 'stealth/150'
release_tag:
description: 'release tag to publish the draft under (e.g. firefox-9)'
required: true
env:
SOURCE_REPO: feder-cr/invisible_firefox
SOURCE_REF: ${{ github.event.inputs.source_ref || 'stealth/150' }}
jobs:
build:
name: build-${{ matrix.leg }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 350
strategy:
fail-fast: false
matrix:
include:
- leg: linux-x86_64
runner: ubuntu-24.04
family: linux
target: ''
rust_target: x86_64-unknown-linux-gnu
win_disables: 'no'
extra_pkgs: ''
asset: firefox-150.0.1-stealth-linux-x86_64.tar.gz
- leg: linux-arm64
runner: ubuntu-24.04-arm
family: linux
target: ''
rust_target: aarch64-unknown-linux-gnu
win_disables: 'no'
extra_pkgs: ''
asset: firefox-150.0.1-stealth-linux-arm64.tar.gz
- leg: win-x86_64
runner: ubuntu-24.04
family: win
target: x86_64-pc-windows-msvc
rust_target: x86_64-pc-windows-msvc
win_disables: 'yes'
extra_pkgs: 'msitools p7zip-full zip'
asset: firefox-150.0.1-stealth-win-x86_64.zip
- leg: macos-arm64
runner: macos-15
family: mac
target: aarch64-apple-darwin
rust_target: aarch64-apple-darwin
win_disables: 'no'
extra_pkgs: ''
asset: firefox-150.0.1-stealth-macos-arm64.tar.gz
- leg: macos-x86_64
runner: macos-15-intel
family: mac
target: x86_64-apple-darwin
rust_target: x86_64-apple-darwin
win_disables: 'no'
extra_pkgs: ''
asset: firefox-150.0.1-stealth-macos-x86_64.tar.gz
steps:
- name: Free disk + 16G swap (Linux runners)
if: matrix.family != 'mac'
run: |
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android \
/usr/local/share/boost "${AGENT_TOOLSDIRECTORY:-/opt/hostedtoolcache}" 2>/dev/null || true
sudo fallocate -l 16G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile || true
- name: Checkout patched Firefox source
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: ${{ env.SOURCE_REPO }}
ref: ${{ env.SOURCE_REF }}
fetch-depth: 1
# Record which invisible_firefox commit this build came from. The publish
# job turns the range previous-release..this commit into the release notes
# (scripts/gen_release_notes.py), and re-publishes it as a source-commit.txt
# asset so the NEXT release knows where to start the changelog. One leg is
# enough — all legs check out the same SOURCE_REF.
- name: Record source commit (for auto release notes)
if: matrix.leg == 'linux-x86_64'
shell: bash
run: git rev-parse HEAD > source-commit.txt && cat source-commit.txt
- name: Upload source-commit artifact
if: matrix.leg == 'linux-x86_64'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: source-commit
path: source-commit.txt
if-no-files-found: error
retention-days: 7
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install Linux build tools
if: matrix.family != 'mac'
run: |
sudo apt-get update
sudo apt-get install -y util-linux binutils ${{ matrix.extra_pkgs }}
- name: Select Xcode 26.2 + export SDK path (macOS)
if: matrix.family == 'mac'
run: |
sudo xcode-select -s /Applications/Xcode_26.2.app
SDKP="$(xcrun --show-sdk-path)"
echo "SDK_PATH=$SDKP" >> "$GITHUB_ENV"
echo "macOS SDK $(xcrun --sdk macosx --show-sdk-version) at $SDKP"
- name: Add Rust target
run: rustup target add ${{ matrix.rust_target }} || true
- name: Extend the repo .mozconfig (NO mold; +target/SDK as needed)
run: |
test -f .mozconfig || { echo "ERROR: no .mozconfig in source"; exit 1; }
rm -f mozconfig
{
echo ""
echo "# --- release CI levers for ${{ matrix.leg }} (mold intentionally OFF — it segfaults libxul) ---"
echo "ac_add_options --disable-debug-symbols"
} >> .mozconfig
if [ -n "${{ matrix.target }}" ]; then echo "ac_add_options --target=${{ matrix.target }}" >> .mozconfig; fi
if [ "${{ matrix.family }}" = "mac" ]; then echo "ac_add_options --with-macos-sdk=$SDK_PATH" >> .mozconfig; fi
if [ "${{ matrix.win_disables }}" = "yes" ]; then
{ echo "ac_add_options --disable-default-browser-agent";
echo "ac_add_options --disable-maintenance-service";
echo "ac_add_options --disable-update-agent"; } >> .mozconfig
fi
if [ "${{ matrix.family }}" = "mac" ]; then NCPU=$(sysctl -n hw.ncpu); else NCPU=4; fi
{ echo "mk_add_options MOZ_PARALLEL_BUILD=$NCPU";
echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-rel"; } >> .mozconfig
echo "----- final .mozconfig -----"; cat .mozconfig
- name: Build
run: ./mach build
# ── LINUX: dereference symlinks (issue #14) + strip + sanitize + tar@root + GATE
- name: Package + validate (Linux)
if: matrix.family == 'linux'
run: |
set -e
DIST=obj-rel/dist/bin
STAGING=staging
rm -rf "$STAGING"; mkdir -p "$STAGING" out
cp -aL "$DIST/." "$STAGING/" # -L: dereference ALL symlinks into real files
N=$(find "$STAGING" -type l | wc -l)
[ "$N" -eq 0 ] || { echo "ERROR: $N symlinks remain after cp -aL"; exit 1; }
for t in xpcshell certutil pk12util rapl; do rm -f "$STAGING/$t"; done
# JUGGLER GATE: the binary is undrivable by Playwright without it (see 70-known-bugs)
{ [ -e "$STAGING/chrome/juggler.manifest" ] && [ -d "$STAGING/chrome/juggler" ]; } \
|| { echo "ERROR: juggler missing from package (chrome/juggler) — Playwright can't drive it"; exit 1; }
echo "juggler GATE OK (loose chrome/juggler present)"
find "$STAGING" -type f \
\( -name '*.so' -o -name firefox -o -name firefox-bin -o -name plugin-container \
-o -name pingsender -o -name glxtest -o -name vaapitest -o -name updater \) \
-exec strip --strip-debug {} + 2>/dev/null || true
STAGING="$STAGING" python3 scripts/linux_sanitize.py || true # no-op in CI (no /home/feder), defensive
tar --owner=0 --group=0 --numeric-owner --mtime="2026-01-01 00:00:00 UTC" \
-czf "out/${{ matrix.asset }}" -C "$STAGING" . # firefox at ROOT
echo "=== HARD GATE: scripts/validate_release.py (the issue-#14 protector) ==="
python3 scripts/validate_release.py --linux "out/${{ matrix.asset }}" --linux-only
ls -la out/
# ── WINDOWS (cross): zip the CLEAN dist/firefox tree, firefox.exe at root
- name: Package (Windows cross)
if: matrix.family == 'win'
run: |
set -e
# Do NOT swallow a mach failure: `./mach package || echo` lets set -e pass
# and would fall through to a stale tree. A release MUST come from the clean
# dist/firefox; dist/bin is the dev tree (cruft + loose juggler that masked
# the firefox-7/8 packaging bugs), never acceptable for a release.
./mach package
[ -f obj-rel/dist/firefox/firefox.exe ] \
|| { echo "ERROR: mach package did not produce a clean dist/firefox tree"; exit 1; }
WIN_APP=obj-rel/dist/firefox
echo "packaging from: $WIN_APP"
# JUGGLER GATE: omni.ja must carry juggler (else Playwright can't drive it)
[ -f "$WIN_APP/omni.ja" ] || { echo "ERROR: no omni.ja in $WIN_APP"; exit 1; }
python3 -c "import zipfile,sys; sys.exit(0 if any('juggler' in n.lower() for n in zipfile.ZipFile('$WIN_APP/omni.ja').namelist()) else 1)" \
|| { echo "ERROR: juggler missing from $WIN_APP/omni.ja — Playwright can't drive it"; exit 1; }
echo "juggler GATE OK (win)"
mkdir -p out
( cd "$WIN_APP" && zip -qr "$GITHUB_WORKSPACE/out/${{ matrix.asset }}" . ) # firefox.exe at zip ROOT
ls -la out/
# ── macOS: package .app, ad-hoc sign, verify relative-internal symlinks, --version gate, tar
- name: Package + validate (macOS)
if: matrix.family == 'mac'
run: |
set -e
./mach package
APP="$(find obj-rel/dist -maxdepth 2 -name '*.app' -type d | head -1)"
[ -n "$APP" ] || { echo "ERROR: no .app produced"; exit 1; }
echo "built app: $APP"
# JUGGLER GATE: the .app's omni.ja must carry juggler (else Playwright can't drive it)
python3 -c "import zipfile,sys,glob; jas=glob.glob('$APP/Contents/Resources/omni.ja')+glob.glob('$APP/Contents/Resources/browser/omni.ja'); sys.exit(0 if jas and any(any('juggler' in n.lower() for n in zipfile.ZipFile(j).namelist()) for j in jas) else 1)" \
|| { echo "ERROR: juggler missing from .app omni.ja — Playwright can't drive it"; exit 1; }
echo "juggler GATE OK (mac)"
codesign --force --deep --sign - --timestamp=none "$APP"
codesign --verify --deep --strict --verbose=2 "$APP"
echo "=== --version GATE ==="
"$APP/Contents/MacOS/firefox" --version
echo "=== critical files present ==="
for need in "Contents/MacOS/firefox" "Contents/Info.plist"; do
[ -e "$APP/$need" ] || { echo "ERROR: missing $need"; exit 1; }
done
echo "=== Info.plist well-formed + required keys (a malformed plist → Finder 'damaged') ==="
plutil -lint "$APP/Contents/Info.plist"
for key in CFBundleExecutable CFBundleIdentifier CFBundleShortVersionString; do
plutil -extract "$key" raw -o - "$APP/Contents/Info.plist" >/dev/null \
|| { echo "ERROR: Info.plist missing $key"; exit 1; }
done
EXEC="$(plutil -extract CFBundleExecutable raw -o - "$APP/Contents/Info.plist")"
[ -e "$APP/Contents/MacOS/$EXEC" ] \
|| { echo "ERROR: CFBundleExecutable '$EXEC' has no matching binary in Contents/MacOS"; exit 1; }
echo "=== verify NO absolute symlinks in the .app (relative-internal ones are fine) ==="
BAD="$(find "$APP" -type l -print0 | xargs -0 -I{} sh -c 't=$(readlink "{}"); case "$t" in /*) echo "{} -> $t";; esac')"
[ -z "$BAD" ] || { echo "ERROR: absolute symlinks in .app (break on user machines):"; echo "$BAD" | head -5; exit 1; }
echo "mac .app OK: critical files present, no absolute symlinks"
STABLE="$(dirname "$APP")/Firefox.app"
[ "$APP" = "$STABLE" ] || mv "$APP" "$STABLE"
mkdir -p out
tar -czf "out/${{ matrix.asset }}" -C "$(dirname "$STABLE")" Firefox.app # preserves internal symlinks
ls -la out/
- name: Upload build artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: asset-${{ matrix.leg }}
path: out/${{ matrix.asset }}
if-no-files-found: error
retention-days: 7
# DRIVE GATE — the firefox-8 catcher. A raw `firefox --screenshot` proves
# nothing about automation: a juggler-less binary renders fine and ships
# broken (firefox-8 did exactly that). So we DRIVE every binary the way users
# will: Playwright launches it over the juggler pipe, loads a real page, and
# round-trips JS. A binary missing/broken juggler throws TargetClosedError
# here and the release never publishes. Headless, NO screenshot → GPU-free,
# so it can't false-fail on the GPU-less hosted runners. Zero proxy / zero
# secrets → safe in public CI (the proxy realness gate stays local, by design).
# Each leg runs on its NATIVE runner so we test the real artifact, not a cross
# surrogate. Playwright is pinned to a version validated against this build's
# juggler; bump it in lockstep when the juggler is re-synced from upstream.
gate:
name: gate-${{ matrix.leg }}
needs: build
runs-on: ${{ matrix.runner }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
include:
# `extra: --full` adds the mouse/keyboard/canvas/navsurface interaction
# checks. Only on linux-x86_64 (historically the most reliable hosted
# runner): the interaction code is platform-identical JS (omni.ja), so
# one reliable full run catches a firefox-2-class regression for all
# platforms. The other legs run SMOKE (launch+http+UA+webdriver) — the
# firefox-8/juggler catcher — which is robust even on the flaky
# windows-latest runner. See scripts/ci_drive_gate.py.
- leg: linux-x86_64
runner: ubuntu-24.04
kind: linux
asset: firefox-150.0.1-stealth-linux-x86_64.tar.gz
extra: '--full'
- leg: linux-arm64
runner: ubuntu-24.04-arm
kind: linux
asset: firefox-150.0.1-stealth-linux-arm64.tar.gz
extra: ''
- leg: win-x86_64
runner: windows-latest
kind: win
asset: firefox-150.0.1-stealth-win-x86_64.zip
extra: ''
- leg: macos-arm64
runner: macos-15
kind: mac
asset: firefox-150.0.1-stealth-macos-arm64.tar.gz
extra: ''
- leg: macos-x86_64
runner: macos-15-intel
kind: mac
asset: firefox-150.0.1-stealth-macos-x86_64.tar.gz
extra: ''
steps:
- name: Checkout wrapper (for scripts/ci_drive_gate.py)
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- name: Download asset
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: asset-${{ matrix.leg }}
path: art
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install Playwright driver (no bundled browser — we override executable_path)
# Pin from a SINGLE source (scripts/playwright_pin.txt) so release.yml and
# verify-assets.yml can't drift to different versions. The drive gate then
# ENFORCES playwright↔juggler compatibility: an incompatible pin fails the
# launch/drive (TargetClosedError / protocol error) and nothing publishes.
# Bump the pin file in lockstep when the juggler is re-synced from upstream.
shell: bash
run: python -m pip install --quiet "playwright==$(cat scripts/playwright_pin.txt)"
- name: Linux system deps for headless firefox
if: matrix.kind == 'linux'
run: sudo "$(which python)" -m playwright install-deps firefox
- name: Extract + locate firefox binary
shell: bash
run: |
set -e
mkdir -p ff
A="art/${{ matrix.asset }}"
case "${{ matrix.kind }}" in
win) python -c "import zipfile; zipfile.ZipFile('$A').extractall('ff')"; EXE="ff/firefox.exe";;
linux) tar xzf "$A" -C ff; EXE="ff/firefox";;
mac) tar xzf "$A" -C ff; EXE="ff/Firefox.app/Contents/MacOS/firefox";;
esac
[ -e "$EXE" ] || { echo "ERROR: firefox binary not found at $EXE"; exit 1; }
chmod +x "$EXE" 2>/dev/null || true
echo "FF_EXE=$EXE" >> "$GITHUB_ENV"
echo "located: $EXE"
- name: DRIVE GATE — Playwright launch via juggler + real page (+ interaction on --full)
shell: bash
run: python scripts/ci_drive_gate.py "$FF_EXE" ${{ matrix.extra }}
# CLOAK + WEBGL-MASKING GUARDS — run the wrapper's e2e cloak/gamma checks
# against THIS leg's freshly-built artifact, on its native runner. The
# wrapper's headless=True is headed+hidden (cloak on Win/macOS, its own
# Xvfb on Linux). Linux (Xvfb + llvmpipe) and Windows (WARP) give a
# software WebGL context on the GPU-less hosts, so the WebGL-dependent
# assertions run there. macOS GitHub runners expose NO WebGL in the CI
# session at all (even vanilla Firefox; macOS has no software-GL fallback),
# so on the mac legs the WebGL checks self-skip and the cloak is validated
# via its non-blank screenshot + CGWindowAlpha == 0. test_cloak asserts the
# window is hidden (Windows DWMWA_CLOAKED / macOS CGWindowAlpha) AND still
# renders — the macOS leg is the only place the cocoa cloak patch gets RUN.
# The webgl guard catches a regression of the gamma readPixels noise back to
# the pixelscan-maskable ±1 spike form (covered on Linux + Windows).
- name: Install pyobjc Quartz (macOS — to read the cloak window alpha)
if: matrix.kind == 'mac'
run: python -m pip install --quiet pyobjc-framework-Quartz
- name: Cloak + WebGL-masking guards (headed)
shell: bash
run: |
python -m pip install --quiet ".[dev]"
INVPW_BINARY_PATH="$FF_EXE" python -m pytest \
tests/test_cloak.py \
"tests/test_fingerprint_surface.py::test_webgl_readpixels_no_masking_signature" \
-m e2e -o addopts='' -q
publish:
name: publish-draft-release
needs: [build, gate]
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout wrapper (for scripts/gen_release_notes.py)
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Download all build assets
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with: { pattern: asset-*, path: dl, merge-multiple: true }
- name: Download source-commit metadata
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with: { name: source-commit, path: src-meta }
- name: Assert all 5 target archives present (no silent partial release)
run: |
cd dl
EXPECTED="
firefox-150.0.1-stealth-linux-x86_64.tar.gz
firefox-150.0.1-stealth-linux-arm64.tar.gz
firefox-150.0.1-stealth-win-x86_64.zip
firefox-150.0.1-stealth-macos-arm64.tar.gz
firefox-150.0.1-stealth-macos-x86_64.tar.gz
"
for a in $EXPECTED; do
[ -s "$a" ] || { echo "ERROR: missing/empty release asset: $a (a build leg silently dropped out?)"; exit 1; }
done
echo "all 5 target archives present"
- name: Generate checksums.txt
run: |
cd dl; ls -la
# explicit glob — never include checksums.txt itself (the `*`-includes-itself trap)
sha256sum firefox-150.0.1-stealth-* > checksums.txt
echo "----- checksums.txt -----"; cat checksums.txt
- name: Resolve release tag
id: tag
run: |
TAG="${{ github.event.inputs.release_tag }}"
[ -z "$TAG" ] && TAG="${GITHUB_REF_NAME}"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
# bare revision number for the release title: firefox-10 -> 10
N="${TAG#firefox-}"
echo "num=$N" >> "$GITHUB_OUTPUT"
# previous release tag, for the changelog range (firefox-10 -> firefox-9)
case "$N" in (*[!0-9]*|'') echo "prevtag=" >> "$GITHUB_OUTPUT";;
(*) echo "prevtag=firefox-$((N-1))" >> "$GITHUB_OUTPUT";; esac
echo "publishing DRAFT release for tag: $TAG"
- name: Build release notes from the source commits
id: notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
CUR="$(cat src-meta/source-commit.txt 2>/dev/null | tr -d '[:space:]')"
echo "this build's source commit: ${CUR:-<none>}"
# previous release's recorded source commit — gives the changelog range.
# Missing (first automated notes / firefox-0) -> notes omit the changelog.
PREV=""
PREVTAG="${{ steps.tag.outputs.prevtag }}"
if [ -n "$PREVTAG" ] && gh release download "$PREVTAG" -R "${{ github.repository }}" \
--pattern source-commit.txt --dir prev 2>/dev/null; then
PREV="$(cat prev/source-commit.txt | tr -d '[:space:]')"
echo "previous ($PREVTAG) source commit: $PREV"
else
echo "no previous source-commit.txt — changelog section omitted this time"
fi
python scripts/gen_release_notes.py --tag "${{ steps.tag.outputs.tag }}" \
--current "$CUR" --prev-sha "$PREV" --source-repo "${{ env.SOURCE_REPO }}" > body.md
echo "----- generated body.md -----"; cat body.md
# publish THIS build's source commit so the next release can diff from it
cp src-meta/source-commit.txt dl/source-commit.txt
- name: Create DRAFT release with all assets
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: invisible_firefox (150.0.1) rev ${{ steps.tag.outputs.num }}
draft: true
prerelease: false
fail_on_unmatched_files: true
files: |
dl/*.tar.gz
dl/*.zip
dl/checksums.txt
dl/source-commit.txt
body_path: body.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-214
View File
@@ -1,214 +0,0 @@
# ─────────────────────────────────────────────────────────────────────────────
# republish.yml — re-gate + publish an EXISTING build's artifacts WITHOUT rebuilding.
#
# When a release run's 5 builds all SUCCEEDED but the publish was blocked by a
# GATE/TEST bug (not a binary defect), rebuilding all five targets (hours) just to
# re-run a few-minute test is wasteful. This workflow downloads the binary artifacts
# from a prior `release` run, re-runs the (now-fixed) drive gate + cloak/WebGL guards
# against those exact byte-identical binaries on their native runners, and — only if
# green — publishes the DRAFT release. Same publish logic as release.yml (draft, notes,
# checksums, source-commit) so the human still runs the realness gate before un-drafting.
#
# Inputs:
# build_run_id : the `release` run whose `asset-*` + `source-commit` artifacts to reuse
# (must be within the 7-day artifact retention window).
# release_tag : tag to publish the draft under (e.g. firefox-11).
# ─────────────────────────────────────────────────────────────────────────────
name: republish
on:
workflow_dispatch:
inputs:
build_run_id:
description: 'release run id whose built artifacts to reuse (no rebuild)'
required: true
release_tag:
description: 'release tag to publish the draft under (e.g. firefox-11)'
required: true
env:
SOURCE_REPO: feder-cr/invisible_firefox
jobs:
gate:
name: gate-${{ matrix.leg }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 25
permissions:
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- leg: linux-x86_64
runner: ubuntu-24.04
kind: linux
asset: firefox-150.0.1-stealth-linux-x86_64.tar.gz
extra: '--full'
- leg: linux-arm64
runner: ubuntu-24.04-arm
kind: linux
asset: firefox-150.0.1-stealth-linux-arm64.tar.gz
extra: ''
- leg: win-x86_64
runner: windows-latest
kind: win
asset: firefox-150.0.1-stealth-win-x86_64.zip
extra: ''
- leg: macos-arm64
runner: macos-15
kind: mac
asset: firefox-150.0.1-stealth-macos-arm64.tar.gz
extra: ''
- leg: macos-x86_64
runner: macos-15-intel
kind: mac
asset: firefox-150.0.1-stealth-macos-x86_64.tar.gz
extra: ''
steps:
- name: Checkout wrapper (for scripts/ci_drive_gate.py — the FIXED gate)
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- name: Download asset from the existing build run (no rebuild)
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: asset-${{ matrix.leg }}
path: art
run-id: ${{ github.event.inputs.build_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install Playwright driver (pinned, no bundled browser)
shell: bash
run: python -m pip install --quiet "playwright==$(cat scripts/playwright_pin.txt)"
- name: Linux system deps for headless firefox
if: matrix.kind == 'linux'
run: sudo "$(which python)" -m playwright install-deps firefox
- name: Extract + locate firefox binary
shell: bash
run: |
set -e
mkdir -p ff
A="art/${{ matrix.asset }}"
case "${{ matrix.kind }}" in
win) python -c "import zipfile; zipfile.ZipFile('$A').extractall('ff')"; EXE="ff/firefox.exe";;
linux) tar xzf "$A" -C ff; EXE="ff/firefox";;
mac) tar xzf "$A" -C ff; EXE="ff/Firefox.app/Contents/MacOS/firefox";;
esac
[ -e "$EXE" ] || { echo "ERROR: firefox binary not found at $EXE"; exit 1; }
chmod +x "$EXE" 2>/dev/null || true
echo "FF_EXE=$EXE" >> "$GITHUB_ENV"
echo "located: $EXE"
- name: DRIVE GATE — Playwright launch via juggler + real page (+ interaction on --full)
shell: bash
run: python scripts/ci_drive_gate.py "$FF_EXE" ${{ matrix.extra }}
- name: Install pyobjc Quartz (macOS — to read the cloak window alpha)
if: matrix.kind == 'mac'
run: python -m pip install --quiet pyobjc-framework-Quartz
- name: Cloak + WebGL-masking guards (headed)
shell: bash
run: |
python -m pip install --quiet ".[dev]"
INVPW_BINARY_PATH="$FF_EXE" python -m pytest \
tests/test_cloak.py \
"tests/test_fingerprint_surface.py::test_webgl_readpixels_no_masking_signature" \
-m e2e -o addopts='' -q
publish:
name: publish-draft-release
needs: [gate]
runs-on: ubuntu-24.04
permissions:
actions: read
contents: write
steps:
- name: Checkout wrapper (for scripts/gen_release_notes.py)
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Download all build assets from the existing build run (no rebuild)
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
pattern: asset-*
path: dl
merge-multiple: true
run-id: ${{ github.event.inputs.build_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download source-commit metadata from the existing build run
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: source-commit
path: src-meta
run-id: ${{ github.event.inputs.build_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Assert all 5 target archives present (no silent partial release)
run: |
cd dl
EXPECTED="
firefox-150.0.1-stealth-linux-x86_64.tar.gz
firefox-150.0.1-stealth-linux-arm64.tar.gz
firefox-150.0.1-stealth-win-x86_64.zip
firefox-150.0.1-stealth-macos-arm64.tar.gz
firefox-150.0.1-stealth-macos-x86_64.tar.gz
"
for a in $EXPECTED; do
[ -s "$a" ] || { echo "ERROR: missing/empty release asset: $a (a build leg silently dropped out?)"; exit 1; }
done
echo "all 5 target archives present"
- name: Generate checksums.txt
run: |
cd dl; ls -la
sha256sum firefox-150.0.1-stealth-* > checksums.txt
echo "----- checksums.txt -----"; cat checksums.txt
- name: Resolve release tag
id: tag
run: |
TAG="${{ github.event.inputs.release_tag }}"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
N="${TAG#firefox-}"
echo "num=$N" >> "$GITHUB_OUTPUT"
case "$N" in (*[!0-9]*|'') echo "prevtag=" >> "$GITHUB_OUTPUT";;
(*) echo "prevtag=firefox-$((N-1))" >> "$GITHUB_OUTPUT";; esac
echo "publishing DRAFT release for tag: $TAG"
- name: Build release notes from the source commits
id: notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
CUR="$(cat src-meta/source-commit.txt 2>/dev/null | tr -d '[:space:]')"
echo "this build's source commit: ${CUR:-<none>}"
PREV=""
PREVTAG="${{ steps.tag.outputs.prevtag }}"
if [ -n "$PREVTAG" ] && gh release download "$PREVTAG" -R "${{ github.repository }}" \
--pattern source-commit.txt --dir prev 2>/dev/null; then
PREV="$(cat prev/source-commit.txt | tr -d '[:space:]')"
echo "previous ($PREVTAG) source commit: $PREV"
else
echo "no previous source-commit.txt — changelog section omitted this time"
fi
python scripts/gen_release_notes.py --tag "${{ steps.tag.outputs.tag }}" \
--current "$CUR" --prev-sha "$PREV" --source-repo "${{ env.SOURCE_REPO }}" > body.md
echo "----- generated body.md -----"; cat body.md
cp src-meta/source-commit.txt dl/source-commit.txt
- name: Create DRAFT release with all assets
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: invisible_firefox (150.0.1) rev ${{ steps.tag.outputs.num }}
draft: true
prerelease: false
fail_on_unmatched_files: true
files: |
dl/*.tar.gz
dl/*.zip
dl/checksums.txt
dl/source-commit.txt
body_path: body.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+233 -2
View File
@@ -7,15 +7,82 @@ on:
branches: [main]
workflow_dispatch:
permissions:
contents: read
# One run of this workflow per branch at a time. A newer push cancels the older
# in-flight run as a whole, cleanly, instead of leaving its queued jobs to be
# cancelled one by one - which left the run marked failed even though nothing
# had actually failed. Keyed by workflow + ref so tests and e2e never cancel
# each other; only an older run of THIS workflow on the same branch is replaced.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# The gate was written FOR this repository on 2026-08-27, after 549 lines of
# Italian shipped here in one subsystem and 852 more were found in 33 files
# that were already public. It has been wired nowhere ever since: not into
# tests.yml, not into the pre-push hook, whose steps are pytest, pin, names,
# internals and publish. Both sibling packages copied the script AND the CI
# step; this one kept only the script, so the one repository the rule exists
# for is the one that never checked. Measured 2026-09-03, the first time
# anybody ran it here: four files, red.
#
# Its own job, and deliberately NOT behind core-on-index. Reading files needs
# no install, and hanging a language check off the availability of a package on
# an index would silently skip it during exactly the window when releases are
# being made.
english:
name: the repository is English
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: check the prose
# --selftest first: a language gate that has only ever printed "clean" is
# the same non-gate as any other, and this one can go blind from a single
# edit to its word list.
run: |
python scripts/check_english_only.py --selftest
python scripts/check_english_only.py
# `pip install -e ".[dev]"` below resolves `invisible-core==N.M.0` from the
# package index. The core is published BEFORE this package, so between the
# first push of this repo and that upload there is a window in which no
# install here can succeed. This gate answers "is it on the index?" and the
# unit job depends on the answer: during the window that job is SKIPPED (grey
# in the checks list, with the reason written into the run summary), never
# faked green; once the core is published it runs exactly as before. Full
# reasoning, including why `|| true`, `--no-deps` and a git fallback were all
# rejected, is in .github/workflows/core-on-index.yml.
core-on-index:
uses: ./.github/workflows/core-on-index.yml
unit:
name: pytest (${{ matrix.os }}, py${{ matrix.python }})
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python: ["3.11", "3.12"]
# Every version `requires-python = ">=3.11"` promises. Two of them were
# untested until 2026-08-01, and the user who opened issue #51 was on
# 3.14. test_marker_vocabulary.py compares this list to the floor.
python: ["3.11", "3.12", "3.13", "3.14"]
# Windows runners are the scarce, 2x-cost, slow-to-schedule ones, and a
# burst of pushes queues them for a long time. Run the FULL Python range
# on ubuntu (cheap, fast) and cover Windows on 3.12 only - this is a
# pure-Python package, the OS-specific surface is tiny. The python LIST
# above stays complete so test_marker_vocabulary still sees every version.
exclude:
- { os: windows-latest, python: "3.11" }
- { os: windows-latest, python: "3.13" }
- { os: windows-latest, python: "3.14" }
steps:
- uses: actions/checkout@v4
@@ -31,5 +98,169 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: arm the pre-push gates
# A fresh clone has no core.hooksPath, and the suite says so - the
# reminder moved into `invisible_core.testing` on 2026-07-28 and all
# three repos that existed then made the assertion (two now, since
# invisible_firefox was deleted on 2026-08-18), but only the core's CI
# had this step, so both consumers went red on it. Do here what a
# developer does once. It also means install_hooks.py is exercised on
# every runner instead of only on the one machine that ever ran it by
# hand.
run: python scripts/install_hooks.py
- name: undefined names and duplicate definitions
# F821 (undefined name) and F811 (redefinition) only. Not a style pass:
# these two are the rules that catch a name that cannot resolve, which
# `from __future__ import annotations` hides in an annotation and which
# a suite only finds if it happens to execute that line. Both bit on
# 2026-07-28 - a `throwaway_venv` used and imported nowhere took a
# user-install job red at RUNTIME, and six annotations named a type that
# was defined in no module at all.
#
# Zero violations in all three repos when this was added, so it is a
# gate rather than a cleanup backlog. Keep it that way.
run: |
python -m ruff check --select F821,F811,F601 --no-cache --output-format concise .
- name: Run pytest
run: pytest tests/ -v --tb=short
shell: bash
run: |
set -o pipefail # or tee would swallow pytest's exit code
pytest tests/ -v --tb=short -rs | tee tests-report.txt
# This repo has the largest suite of the three and was the only one with
# no floor. pytest's exit code cannot distinguish "everything passed"
# from "the marker expression deselected everything", and `addopts`
# already filters on two markers - one more, or a typo in one, silently
# turns 726 tests into 0 and reports success.
- name: Refuse a run in which the suite deselected itself
shell: bash
run: |
python - <<'PY'
import pathlib, re, sys
text = pathlib.Path("tests-report.txt").read_text(encoding="utf-8", errors="ignore")
m = re.search(r"(\d+) passed", text)
passed = int(m.group(1)) if m else 0
# FLOOR, not a target. It exists because a mis-wired selection runs
# almost nothing and still exits 0 - the exit code cannot see it.
#
# Was 600 until 2026-07-27, when 322 tests MOVED to invisible_core:
# they covered core modules and reached them through this package's
# four-line back-compat shims, so six real breaks in core code were
# surviving the core's own suite. Nothing shrank; the tests are in the
# package they test. This suite runs ~420 now.
#
# Keep it a little under the real count. It is a tripwire for "the
# selection collapsed", not an assertion about how many tests exist.
if passed < 380:
print(f"only {passed} test(s) ran (expected 380+) - the selection "
f"dropped most of the suite and the exit code cannot see it",
file=sys.stderr)
sys.exit(1)
print(f"{passed} tests ran")
PY
# ONE SINGLE CONTEXT FOR BRANCH PROTECTION. Measured 2026-08-13: this
# repo's protection required `pytest (windows-latest, py3.11)`, which the
# matrix explicitly EXCLUDES a few lines up - a context no job can ever
# produce, so a protection that could never be satisfied. With
# `enforce_admins` set to false every push went through anyway and nobody
# noticed. Same shape in the core and in the manager.
#
# A list of matrix names drifts every time the matrix changes, and that is
# exactly how it got here. This job depends on the whole matrix and its
# name never changes.
#
# SKIPPED IS NOT FAILED, and that is the part specific to this repo. `unit`
# is skipped on purpose when `core-on-index` says the pin is not yet on the
# index: during that window no install can succeed, and the workflow chose
# to SKIP instead of faking green. A gate that required `success` would
# turn that choice into a red and push toward dropping the protection on
# release day of all days. So it refuses on `failure` and `cancelled`,
# never on `skipped`.
# The guides are the surface a stranger copies first, and until 2026-09-08
# nothing read them: one page published `page.accessibility.snapshot()`, which
# this fork does not have, so anybody who ran that block got an AttributeError.
# A broken test is seen by whoever runs the suite; a broken guide is seen once,
# by a reader who then leaves.
#
# It needs the package importable, because it asks the REAL classes what they
# have rather than carrying a list that would drift from them - so it takes
# core-on-index's answer exactly as `unit` does, and is SKIPPED during the
# window rather than faked green.
docs-api:
name: the guides name an API that exists
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e .
- name: check the guides against the API
# --selftest first, for the same reason the English gate does it: this
# one goes blind from a single edit to the list of names it inspects.
run: |
python scripts/check_docs_api_surface.py --selftest
python scripts/check_docs_api_surface.py
gate:
needs: [core-on-index, unit, docs-api]
if: always()
runs-on: ubuntu-latest
steps:
- name: refuse unless nothing failed
run: |
echo "core-on-index: ${{ needs.core-on-index.result }}"
echo "unit: ${{ needs.unit.result }}"
echo "docs-api: ${{ needs.docs-api.result }}"
case "${{ needs.unit.result }}" in
failure|cancelled) echo "the suite did not pass"; exit 1 ;;
esac
case "${{ needs.core-on-index.result }}" in
failure|cancelled) echo "the index check did not run"; exit 1 ;;
esac
case "${{ needs.docs-api.result }}" in
failure|cancelled) echo "the guides name something that does not exist"; exit 1 ;;
esac
echo "ok"
# Measured 2026-09-04: 0.10.0 was on the index while main sat on 0.10.0 with
# FIFTEEN commits of different content on top of the tag - 39 files, 841
# insertions, the screenshot clip fix among them. A release from there would
# have published NOTHING and reported success, because publish.yml treats an
# already-present version as a deliberate no-op: right for a re-pushed tag,
# indistinguishable from somebody forgetting to bump. The fix could not have
# reached anybody, and nothing would have said so.
#
# Pull requests only: on main straight after a release the version IS the
# published one until somebody bumps, and a gate that is red at rest is one
# people learn to skip. Bumping publishes nothing - publishing happens on a
# tag push - so main on an unreleased version is the normal state between
# releases and the rule costs one line.
version:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# The gate diffs the tree against the tag of the published
# version; a shallow clone has no tags and cannot tell.
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: the version this change proposes is still free
env:
IPW_CHECK_VERSION: "1"
run: |
python -m pip install --upgrade pip
pip install pytest
python -m pytest -q tests/test_version_is_not_taken.py
+183
View File
@@ -0,0 +1,183 @@
# ─────────────────────────────────────────────────────────────────────────────
# user-install.yml - can a person who has never seen this repo install it and
# drive a browser, on the two operating systems we claim to support?
#
# WHY THIS EXISTS, SEPARATELY FROM e2e.yml.
# e2e.yml installs the wrapper FROM THE CHECKOUT and then pins Playwright by
# hand. That is the right shape for testing a change: it exercises the code in
# the PR. It is the wrong shape for answering "does the published thing work",
# and the difference is not academic:
#
# * a checkout install never resolves `invisible-core==X.Y.Z` from the index,
# so the entire pin mechanism - the part most likely to break a release,
# and the reason a binary bump is now a three-package release - is outside
# what that job can see;
# * installing a blessed `playwright==<pin>` afterwards REPAIRS the venv. If
# the declared range resolves to a client the shipped Juggler cannot speak,
# that manual line turns the job green while every fresh install is broken.
# What a user gets is what pip resolves from the declaration, and that is
# what has to be under test.
#
# So this workflow installs nothing from the checkout except the test files. It
# takes `pip install invisible-playwright` from the index, in an empty venv, and
# runs it the way somebody's first script would.
#
# WHY IT MUST NOT BE MADE TOLERANT.
# There is a real window in which this cannot pass: between publishing the core
# and publishing the consumers. The tempting fixes - `|| true`, `--no-deps`, a
# git fallback - all produce a GREEN job that installed nothing, and that lie
# outlives the window by months. A red run during a publish is correct and
# readable. See core-on-index.yml, which makes the same argument at length.
#
# WHY BOTH OPERATING SYSTEMS.
# Windows is the primary target, and the two most recent defects were
# Windows-only by construction: firefox.exe is a launcher stub that spawns the
# real browser and exits, so a killed runner used to leave the tree behind, and
# the job-object fix for it has no counterpart on Linux. A Linux-only matrix
# would have seen neither.
# ─────────────────────────────────────────────────────────────────────────────
name: user-install
on:
workflow_dispatch:
inputs:
source:
description: "index (what users get) or git (an unpublished commit)"
required: false
default: index
type: choice
options: [index, git]
schedule:
# Weekly (Monday). The published artifacts do not change on their own, but
# everything around them does: pip resolves a new Playwright, GitHub moves a
# release asset, an index mirror lags. Those break users without any commit
# here, so a run triggered only by pushes would never see them. Weekly is
# enough to catch that drift without adding a Windows job to the queue daily.
- cron: "17 6 * * 1"
release:
types: [published]
permissions:
contents: read
concurrency:
group: user-install-${{ github.ref }}
cancel-in-progress: true
jobs:
install:
name: ${{ matrix.os }} - install from ${{ github.event.inputs.source || 'index' }} and launch
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false # one OS failing must not hide the other's result
matrix:
os: [ubuntu-24.04, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
# Only what the TEST needs. The package under test is installed by the
# test itself, into a venv it creates, from the index - installing it
# here as well would put a second copy on the path and the assertions
# would be reading the wrong one.
- name: Test harness only
run: python -m pip install --upgrade pip pytest packaging
# PyPI does not serve a new version to pip the instant twine finishes, and
# this workflow runs on `release:` - which fires seconds after the upload.
# MEASURED 2026-07-28: invisible-firefox 0.2.6 was uploaded, the release was
# created about forty seconds later, and the pip install below still resolved
# 0.2.5. The job reported a forgotten publish that had happened two minutes
# earlier, which is the most expensive kind of red: it looks exactly like the
# real defect this workflow exists to catch.
#
# Bounded at five minutes, so a genuinely forgotten publish still fails. The
# PER-VERSION endpoint is the authority; the aggregate `info.version` lags it
# by minutes and has its own trap, so this asks for the exact URL.
#
# Only on `release:`. A scheduled or dispatched run is not racing anything,
# and a wait there would hide a real absence behind five minutes of polling.
- name: wait for the index to serve this version
if: github.event_name == 'release'
shell: bash
run: |
python - <<'PY'
import json, os, sys, time, tomllib, urllib.error, urllib.request
dist = tomllib.load(open("pyproject.toml", "rb"))["project"]["name"]
version = tomllib.load(open("pyproject.toml", "rb"))["project"]["version"]
url = f"https://pypi.org/pypi/{dist}/{version}/json"
deadline = time.monotonic() + 300
n = 0
while True:
n += 1
try:
with urllib.request.urlopen(url, timeout=30) as r:
if json.load(r).get("urls"):
print(f"::notice::{dist} {version} is on the index (attempt {n})")
sys.exit(0)
except urllib.error.HTTPError as e:
if e.code != 404:
print(f"::warning::index returned HTTP {e.code}; not waiting further")
sys.exit(0)
except OSError as e:
print(f"index unreachable ({e}); retrying")
if time.monotonic() >= deadline:
print(f"::warning::{dist} {version} still not on the index after 300s; "
f"running the checks anyway so a real absence is reported")
sys.exit(0)
time.sleep(10)
PY
- name: Linux runtime libraries for the browser
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgtk-3-0 libdbus-glib-1-2 libasound2t64
- name: The user path, end to end
env:
# The release walk asks the GitHub API once per published version.
# Unauthenticated that is 60 calls an hour PER RUNNER IP, and the
# walk hit 403 on its eleventh call when measured by hand. A
# rate-limited walk SKIPS, and a skip is not a check.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INVPW_E2E_SOURCE: ${{ github.event.inputs.source || 'index' }}
shell: bash
run: |
set -o pipefail # or the tee below would swallow pytest's exit code
if [ "${{ runner.os }}" = "Linux" ]; then
xvfb-run -a python -m pytest tests/test_release_e2e.py tests/test_upgrade_e2e.py -m e2e \
-o addopts="" -v -rs | tee e2e-report.txt
else
python -m pytest tests/test_release_e2e.py tests/test_upgrade_e2e.py -m e2e \
-o addopts="" -v -rs | tee e2e-report.txt
fi
# A run whose tests all SKIPPED is not a pass, and it is the failure this
# suite is most exposed to: every test here is gated on `-m e2e` and
# several on a platform. `-rs` above prints the skips; this turns "nothing
# ran" into a refusal rather than a green tick.
- name: Refuse a run in which nothing actually ran
shell: bash
run: |
python - <<'PY'
import pathlib, re, sys
# pytest's own exit code cannot distinguish "all passed" from "all
# skipped", so the count is read back from the report it wrote.
report = pathlib.Path("e2e-report.txt")
if not report.is_file():
print("no report written; the step above did not run", file=sys.stderr)
sys.exit(1)
text = report.read_text(encoding="utf-8", errors="ignore")
m = re.search(r"(\d+) passed", text)
passed = int(m.group(1)) if m else 0
if passed < 6:
print(f"only {passed} test(s) actually ran (expected at least 6) - a suite that skipped "
f"itself is not a pass", file=sys.stderr)
sys.exit(1)
print(f"{passed} tests ran")
PY
-111
View File
@@ -1,111 +0,0 @@
# ─────────────────────────────────────────────────────────────────────────────
# verify-assets.yml — re-runnable DRIVE GATE for an EXISTING release's assets.
#
# release.yml drive-gates every binary it builds. This does the same drive test
# WITHOUT rebuilding: it downloads a release's already-published assets (works on
# DRAFT releases too via GITHUB_TOKEN) and drives each one on its native runner.
#
# Use it to:
# • drive-test a release that was built before the in-pipeline gate existed
# (e.g. firefox-9, built on the old release.yml), or
# • re-verify any shipped release on demand (regression check).
#
# Same single-source-of-truth drive logic as release.yml: scripts/ci_drive_gate.py.
# Headless, no screenshot → GPU-free. Zero proxy / zero secrets.
# ─────────────────────────────────────────────────────────────────────────────
name: verify-assets
on:
workflow_dispatch:
inputs:
release_tag:
description: 'release tag whose assets to drive-test (e.g. firefox-9)'
required: true
permissions:
# write (not read) is required: GitHub only exposes DRAFT releases to tokens
# with push access. With contents:read, `gh release download` on a draft tag
# 404s ("release not found"). This workflow only READS assets — the elevated
# scope is solely to make draft releases visible to GITHUB_TOKEN.
contents: write
jobs:
drive:
name: drive-${{ matrix.leg }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
include:
# --full (interaction) only on the reliable linux-x86_64 leg; others run
# the robust SMOKE drive. Same rationale as release.yml's gate.
- leg: linux-x86_64
runner: ubuntu-24.04
kind: linux
asset: firefox-150.0.1-stealth-linux-x86_64.tar.gz
extra: '--full'
- leg: linux-arm64
runner: ubuntu-24.04-arm
kind: linux
asset: firefox-150.0.1-stealth-linux-arm64.tar.gz
extra: ''
- leg: win-x86_64
runner: windows-latest
kind: win
asset: firefox-150.0.1-stealth-win-x86_64.zip
extra: ''
- leg: macos-arm64
runner: macos-15
kind: mac
asset: firefox-150.0.1-stealth-macos-arm64.tar.gz
extra: ''
- leg: macos-x86_64
runner: macos-15-intel
kind: mac
asset: firefox-150.0.1-stealth-macos-x86_64.tar.gz
extra: ''
steps:
- name: Checkout wrapper (for scripts/ci_drive_gate.py)
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- name: Download the release asset (draft releases included)
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
mkdir -p art
gh release download "${{ github.event.inputs.release_tag }}" \
--repo "${{ github.repository }}" \
--pattern "${{ matrix.asset }}" \
--dir art
ls -la art/
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install Playwright driver (no bundled browser — we override executable_path)
# Single-source pin (see release.yml); the drive gate enforces juggler compat.
shell: bash
run: python -m pip install --quiet "playwright==$(cat scripts/playwright_pin.txt)"
- name: Linux system deps for headless firefox
if: matrix.kind == 'linux'
run: sudo "$(which python)" -m playwright install-deps firefox
- name: Extract + locate firefox binary
shell: bash
run: |
set -e
mkdir -p ff
A="art/${{ matrix.asset }}"
case "${{ matrix.kind }}" in
win) python -c "import zipfile; zipfile.ZipFile('$A').extractall('ff')"; EXE="ff/firefox.exe";;
linux) tar xzf "$A" -C ff; EXE="ff/firefox";;
mac) tar xzf "$A" -C ff; EXE="ff/Firefox.app/Contents/MacOS/firefox";;
esac
[ -e "$EXE" ] || { echo "ERROR: firefox binary not found at $EXE"; exit 1; }
chmod +x "$EXE" 2>/dev/null || true
echo "FF_EXE=$EXE" >> "$GITHUB_ENV"
echo "located: $EXE"
- name: DRIVE GATE — Playwright launch via juggler + real page (+ interaction on --full)
shell: bash
run: python scripts/ci_drive_gate.py "$FF_EXE" ${{ matrix.extra }}
-103
View File
@@ -1,103 +0,0 @@
# ─────────────────────────────────────────────────────────────────────────────
# verify-cloak.yml — re-runnable CLOAK + WEBGL-MASKING GUARDS for an EXISTING
# build run's artifacts, WITHOUT rebuilding Firefox (~3h on the mac legs).
#
# release.yml runs these same guards in its `gate` job against each freshly-built
# artifact. This re-runs them against the artifacts of a PRIOR build run (input
# `run_id`) using the CURRENT wrapper code on the default branch — so a test-only
# fix (e.g. making the macOS leg tolerant of the runner's missing WebGL) can be
# validated against the real binaries in ~10 min instead of paying a full rebuild.
#
# Same guard command as release.yml's gate. Headed-but-cloaked; zero proxy / zero
# secrets. The macOS legs are the only place the cocoa cloak patch actually RUNS.
# ─────────────────────────────────────────────────────────────────────────────
name: verify-cloak
on:
workflow_dispatch:
inputs:
run_id:
description: 'build run id whose asset-* artifacts to re-gate (e.g. 27346856197)'
required: true
permissions:
contents: read
actions: read # download-artifact needs this to read another run's artifacts
jobs:
guard:
name: guard-${{ matrix.leg }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
# Same legs/runners/assets as release.yml's gate matrix.
include:
- leg: linux-x86_64
runner: ubuntu-24.04
kind: linux
asset: firefox-150.0.1-stealth-linux-x86_64.tar.gz
- leg: linux-arm64
runner: ubuntu-24.04-arm
kind: linux
asset: firefox-150.0.1-stealth-linux-arm64.tar.gz
- leg: win-x86_64
runner: windows-latest
kind: win
asset: firefox-150.0.1-stealth-win-x86_64.zip
- leg: macos-arm64
runner: macos-15
kind: mac
asset: firefox-150.0.1-stealth-macos-arm64.tar.gz
- leg: macos-x86_64
runner: macos-15-intel
kind: mac
asset: firefox-150.0.1-stealth-macos-x86_64.tar.gz
steps:
- name: Checkout wrapper (current default branch — the FIXED tests)
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: { fetch-depth: 1 }
- name: Download build asset from the prior run (no rebuild)
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: asset-${{ matrix.leg }}
path: art
run-id: ${{ github.event.inputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install Playwright driver (no bundled browser — we override executable_path)
# Single-source pin (see release.yml); the wrapper enforces juggler compat.
shell: bash
run: python -m pip install --quiet "playwright==$(cat scripts/playwright_pin.txt)"
- name: Linux system deps for headless firefox
if: matrix.kind == 'linux'
run: sudo "$(which python)" -m playwright install-deps firefox
- name: Extract + locate firefox binary
shell: bash
run: |
set -e
mkdir -p ff
A="art/${{ matrix.asset }}"
case "${{ matrix.kind }}" in
win) python -c "import zipfile; zipfile.ZipFile('$A').extractall('ff')"; EXE="ff/firefox.exe";;
linux) tar xzf "$A" -C ff; EXE="ff/firefox";;
mac) tar xzf "$A" -C ff; EXE="ff/Firefox.app/Contents/MacOS/firefox";;
esac
[ -e "$EXE" ] || { echo "ERROR: firefox binary not found at $EXE"; exit 1; }
chmod +x "$EXE" 2>/dev/null || true
echo "FF_EXE=$EXE" >> "$GITHUB_ENV"
echo "located: $EXE"
- name: Install pyobjc Quartz (macOS — to read the cloak window alpha)
if: matrix.kind == 'mac'
run: python -m pip install --quiet pyobjc-framework-Quartz
- name: Cloak + WebGL-masking guards (headed)
shell: bash
run: |
python -m pip install --quiet ".[dev]"
INVPW_BINARY_PATH="$FF_EXE" python -m pytest \
tests/test_cloak.py \
"tests/test_fingerprint_surface.py::test_webgl_readpixels_no_masking_signature" \
-m e2e -o addopts='' -q
+62 -8
View File
@@ -5,21 +5,35 @@ name: webrtc-e2e
# Manual (workflow_dispatch) on purpose: it needs a firefox-N binary that
# carries the WebRTC fixes (synthetic srflx in genuine nICEr form + the
# default-route fallback behind a proxy). Run it after publishing such a
# binary — it is the release gate for "WebRTC looks real behind a proxy".
# binary - it is the release gate for "WebRTC looks real behind a proxy".
# Until that binary ships, test_not_blocked_behind_tcp_only_socks is EXPECTED
# to fail (the old binary is fully blocked behind a SOCKS proxy), which is the
# whole point of the gate.
#
# No smartproxy / credentials: the "behind a proxy" condition is faked by an
# No external proxy provider, no credentials: the "behind a proxy" condition is faked by an
# in-process TCP-only SOCKS5 server (refuses UDP ASSOCIATE) and the egress IP
# is injected as an RFC 5737 TEST-NET address. Fully self-contained.
on:
workflow_dispatch:
permissions:
contents: read
jobs:
# `pip install -e ".[dev]"` below resolves `invisible-core==N.M.0` from the
# package index, and the core is published BEFORE this package. This gate
# answers whether it is there yet; during that window the realness job is
# SKIPPED with the reason in the run summary rather than faked green, and
# once the core is up it runs unchanged. See
# .github/workflows/core-on-index.yml.
core-on-index:
uses: ./.github/workflows/core-on-index.yml
webrtc-e2e:
name: webrtc realness (ubuntu, py3.12)
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -35,13 +49,53 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Fetch the patched Firefox binary
run: python -m invisible_playwright fetch
- name: Resolve binary path
run: echo "STEALTHFOX_E2E_BINARY=$(python -m invisible_playwright path)" >> "$GITHUB_ENV"
- name: Fetch the patched Firefox binary and expose its path
shell: bash
run: |
# NOT `echo "VAR=$(cmd)" >> $GITHUB_ENV`. echo exits 0 whatever the
# substitution did, so `set -e` never sees a failure and an EMPTY
# value lands in the environment. Both tests below then hit
# `pytest.skip("no patched binary")`, pytest exits 0, and the job is
# green having verified nothing - which is exactly what run #1 did.
set -euo pipefail
FETCH_OUTPUT="$(python -m invisible_playwright fetch)"
printf '%s\n' "$FETCH_OUTPUT"
BIN="$(printf '%s\n' "$FETCH_OUTPUT" | tail -n 1)"
if [ -z "$BIN" ] || [ ! -e "$BIN" ]; then
echo "invisible_playwright fetch returned '$BIN', which is not a" >&2
echo "file. Refusing to run a suite that would skip itself green." >&2
exit 1
fi
echo "STEALTHFOX_E2E_BINARY=$BIN" >> "$GITHUB_ENV"
- name: Run WebRTC realness e2e (xvfb for the headless Firefox)
run: |
set -o pipefail
sudo apt-get update && sudo apt-get install -y xvfb
xvfb-run -a pytest tests/test_webrtc_realness.py -m e2e -o addopts="" -v -rs
xvfb-run -a pytest tests/test_webrtc_realness.py -m e2e -o addopts="" -v -rs | tee webrtc-report.txt
# Run #1 was GREEN with the headline assertion skipped: "1 passed, 1
# skipped", and the skipped one is the test this workflow's own header
# calls the point of the gate. pytest's exit code cannot tell that from a
# pass, and this file was the only one of four without a floor.
- name: Refuse a run whose main assertion did not execute
shell: bash
run: |
python - <<'PY'
import pathlib, re, sys
text = pathlib.Path("webrtc-report.txt").read_text(encoding="utf-8", errors="ignore")
passed = int((re.search(r"(\d+) passed", text) or [0, 0])[1] or 0)
skipped = int((re.search(r"(\d+) skipped", text) or [0, 0])[1] or 0)
if skipped:
print("these tests SKIPPED, so the gate verified less than it "
"claims:", file=sys.stderr)
for line in text.splitlines():
if line.startswith("SKIPPED"):
print(" " + line, file=sys.stderr)
if passed < 2 or skipped:
print(f"{passed} passed / {skipped} skipped - this gate exists for "
f"the synthetic-srflx assertion; a run that skips it is not "
f"a pass.", file=sys.stderr)
sys.exit(1)
print(f"{passed} tests ran, none skipped")
PY
+8
View File
@@ -6,3 +6,11 @@ build/
.pytest_cache/
.venv/
firefox-source/
# Third-party source trees kept on disk for on-demand compatibility audits.
# They are somebody else's code, with their own licence and their own .git, and
# they must never be committed into this repository: `git add -A` would either
# stage 3.9 MB of Apache-2.0 sources into an MIT repo or, worse, record a bare
# gitlink that nobody can clone. The sdist/wheel excludes only protect the
# published artifacts, not the repo, so the ignore has to live here too.
tests/playwright-upstream/
+735 -20
View File
@@ -6,14 +6,719 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
## [Unreleased]
### Added
- `timezone="auto"`: the browser timezone is auto-derived from the egress IP. By default (no explicit timezone) it ALWAYS resolves — from the proxy egress when a proxy is set, otherwise from the host's own public IP — so the zone can never disagree with the IP (the classic `timezone_mismatch` signal). An explicit `"Area/City"` is the only way to force a specific zone. On failure: with a proxy the launch raises (no silent host-TZ fallback behind a foreign proxy); without a proxy it falls back to the host TZ so a transient lookup can't break the launch.
- The egress IP is mapped to its IANA zone with an offline mmdb (`daijro/geoip-all-in-one`). It auto-updates against the upstream weekly rebuild: cached locally, re-checked after `GEOIP_REFRESH_DAYS` (7), older copies pruned, and a stale cache is reused when offline. `STEALTHFOX_GEOIP_MMDB` points at your own `.mmdb` to skip the download.
- `resolve_session_timezone(timezone, proxy)` and `ensure_geoip_mmdb()` re-exported at the package root (plus `GeoTimezoneError`) so integrations that own their launch can reproduce the resolution.
- `tests/test_geo.py` (37) + `tests/test_geoip_update.py` (freshness / auto-update / offline fallback) unit tests.
## [0.13.2] - 2026-09-07
### Fixed
- **`page.goto()` now answers with the Response, instead of always `None`.**
The navigation itself was never broken - the page loaded, the `response`
events carried the right statuses and `expect_response` worked - but the
return value was hardcoded to `None`, so `page.goto(url).status` was not
reachable. `page.reload()` answers with a Response too, and so does history
navigation, which shares that code path but is still held back by a separate
engine defect of its own. A redirect chain answers with the FINAL response,
and a same-document navigation still answers `None`, as upstream does.
Crawlee treats a `None` here as a failed load, so a `PlaywrightCrawler`
driven by this package failed every request; it now finishes them.
## [0.13.1] - 2026-09-06
### Changed
- New runtime dependencies: `requests[socks]` (SOCKS egress lookup), `maxminddb` (mmdb reader), `tzdata` (IANA database for `zoneinfo`, which Windows lacks).
- **The engine is `firefox-29`, through `invisible-core 29.19.0`.** It carries
the screencast that `page.screencast.start(on_frame=...)` needs, so the
feature shipped in 0.13.0 now has an engine that answers it, and the
full-window frame no longer carries the Windows resize border. Nothing
else moves: the pin follows the seal.
## [0.13.0] - 2026-09-05
### Added
- **`page.screencast.start(on_frame=...)` streams JPEG frames of the browser
WINDOW.** `page.screenshot()` gives the content viewport and can never show
the pointer, which is drawn in the chrome document precisely so that no page
can see it. The screencast captures the window through the operating system
in the parent process - tab strip, address bar and pointer included, nothing
injected into the page - and hands each frame to `on_frame` as JPEG bytes
with the captured window's size. Needs an engine from `firefox-28` on;
`size=` bounds the frame (scaled down to fit, never up, default 1280x800)
and `quality=` the JPEG quality (default 80). `path=` (a video file) is
refused by name: the engine has no video encoder.
### Fixed
- **Two threads writing the Juggler pipe could splice two commands into one
line.** Frames are acknowledged from the reader thread while the caller's
thread dispatches input; the pipe now has a write lock, and a
`Connection.post` that sends without waiting for the reply.
## [0.12.3] - 2026-09-05
### Fixed
- **Orphaned `.tmp-<tag>-<pid>` trees in the engine cache are swept.** Through
`invisible-core 27.19.0`: a download killed during `verifying` or
`extracting` used to leave up to the whole extracted tree behind, because
only a fresh download by the same pid ever removed it. `ensure_binary` now
removes the trees whose process is gone, on every call, and leaves alone
this process's own tree, a live process's tree and anything not named after
a pid. The MCP server 0.13.0 starts the download with the process, which made
a killed download an ordinary event rather than a Ctrl-C.
## [0.12.2] - 2026-09-05
### Changed
- **The launch counter lives on the engine's repository.** Every session now
declares `invisible_firefox.usage_ping.url` through `invisible-core 27.18.0`,
pointing at the `usage-counter` release of `firefox_antidetect_patch`, the
repository that builds and ships the engine. The engine's compiled default
says the same from the next build. Engines older than firefox-21 do not read
the pref and are not counted. To opt out of the ping, set
`invisible_firefox.usage_ping.enabled` to `False` in `extra_prefs`.
- **The `browser launches` badge is back.** It was removed in 0.7.2 because the
counter behind it lived on a repository that had been deleted, so the badge
would have redrawn a frozen number every morning. The counter has lived on
this repository since 2026-08-19 and is counting again, so the figure the
badge shows is live. It is cumulative, and it undercounts: engines before
firefox-21 still ask the old address, and they rejoin only as they upgrade.
## [0.12.1] - 2026-09-05
### Fixed
- **A persistent profile keeps its cookies and storage for the next session.**
Since 0.8.0, `profile_dir=` kept nothing: the first session on a profile set a
cookie and a localStorage entry and read both back, the second session on the
same profile read an empty jar and `None`, and on disk `cookies.sqlite` held
zero rows. The persistent launch handed back an ordinary context, a Juggler
container with its own userContextId, and Juggler deletes a container's
cookies and storage together with the identity when the context is removed;
everything a session wrote lived in a container that died with the session.
The persistent context is now the browser's default one, the one whose state
is the profile's, addressed by omitting `browserContextId` and never removed;
closing it closes the browser, as upstream does. Found by a clean-environment
check of 0.12.0, on the day after the docs page promised "logging in once
instead of every run".
### Added
- **A test that a persistent profile keeps state**, e2e: two sessions on one
profile, cookie and localStorage written in the first and read in the second,
and the cookie row read from `cookies.sqlite` in between, so a regression
cannot pass by keeping the data where the page sees it and the disk does not.
Against 0.12.0 it fails on the on-disk read.
## [0.12.0] - 2026-09-04
### Fixed
- **The first launch on Windows works.** On a machine that had never run the
engine from that path, the first `InvisiblePlaywright(...)` exited with
`3221226505` (0xC0000409) before the protocol came up, and the second one
worked. It was Firefox's launcher process, not the browser: on a new path
`firefox.exe` runs as the launcher first and forwards the Juggler pipe to the
real browser, and it read that pipe from CRT descriptors 3 and 4, which the
Node.js driver provides and this client does not, since it names the handles
in `PW_PIPE_READ` / `PW_PIPE_WRITE`. The launcher died on `_get_osfhandle(3)`;
the next launch found a launcher timestamp with no browser timestamp in the
registry and disabled the launcher for that path, which is why it failed
exactly once per machine and why nothing about the cache directory mattered.
The engine is firefox-27, where the launcher forwards the handles it is
handed. Every Windows first launch since 0.8.0, the release where this client
replaced the Node driver, had this; the daily Windows install check had been
red since 2026-08-31. (#144)
### Added
- **A test for the first launch from a path Firefox has never run from**,
Windows only, e2e. It removes the launcher's registry values for the binary
under test, launches once, and checks both that the page answers and that the
launcher recorded a start followed by the browser's, so a success with the
launcher disabled, the path that always worked, does not pass. Against
firefox-26 it fails with the exit code above.
### Internal
- Engine pin moved to firefox-27 through `invisible-core 27.17.0`.
## [0.11.0] - 2026-09-04
### Fixed
- **A screenshot photographs where the page is.** The clip was
`{x: 0, y: 0, width: innerWidth, height: innerHeight}`, and that clip is in
document coordinates: not the window, but the top corner of the page at the
window's size. An agent that scrolled and looked got the same image every
time, and nothing in the image says so. `full_page` was not read at all:
800x600 came back where 800x4000 was asked for. (#136)
- **Two manual workflows stop calling the removed `path` command.** Both
called `python -m invisible_playwright path`, a subcommand removed when the
CLI became `fetch` plus `version`. The Windows launch matrix failed in all
three cells before reaching its launch probe, and the WebRTC gate had not run
since the removal. The existing parser gate scanned Python tests only, so
neither call site was in its perimeter; there is now one that reads the
workflows too. Thanks to @SamadhiFire for finding and fixing it. (#141)
### Added
- **A check that asks the index whether the version a change proposes is
still free**, on pull requests. This release exists partly because that
check found its own repository in the state it exists to prevent: 0.10.0 was
on the index while main sat on 0.10.0 with fifteen commits on top of the
tag, the screenshot fix among them. A release from there would have
published nothing and reported success, because the publish workflow treats
an already-present version as a deliberate no-op, which is right for a
re-pushed tag and indistinguishable from somebody forgetting to bump. (#142)
### Documentation
- Twelve pages stop shipping code that cannot run as pasted, tool metadata is
out of the shipped screenshots, and the front page names the agent layer
that sits on this engine. (#137, #138, #139, #140)
## [0.10.0] - 2026-09-03
### Added
- **Nine acting methods on `ElementHandle`.** `click`, `hover`, `fill`, `type`,
`press`, `focus`, `check`, `uncheck` and `select_option` now work on a handle,
so `page.query_selector("#go").click()` does what it does in Playwright. Until
now the driver served fourteen handle methods, every one of them a read, and
every action answered `ElementHandle has no method 'click'`.
They go through the same humanised path as the selector versions - approach,
hover, press, release, with the hit-target check and the actionability retry -
rather than a second, simpler one. Two click paths would be two fingerprints.
What differs is only what should: the node is not looked up again, and the
handle is still usable afterwards.
### Documentation
- **Two pages said there is no MCP server for this project.** Both were written
on 2026-07-27 and the server was published on 2026-08-19: true when written,
and afterwards they steered readers to Microsoft's server, which cannot carry
the seeded profile, for a problem ours solves. The integration page now opens
with ours and is what it actually is - how to point Microsoft's playwright-mcp
at this engine if you are already on it, and what that costs.
- **The README never mentioned either sibling.** A reader who would rather prompt
than script had one hand-off, to the page above, which told them no server
existed. There is now a short block after Install with both one-liners, and the
Related projects section lists the three siblings before the third-party ones.
- The Python floor was stated only as a badge image about 200 lines below the
install block, and the first-run download size disagreed across three READMEs,
all three wrong against the packaged seal. One home for it, here.
- Four wiki pages edited in a working tree on 2026-08-30, rescued onto a branch
and then lost a second time when the branch was never merged. Landed.
### Internal
- The English-only gate was written for this repository on 2026-08-27 and wired
nowhere: not into tests.yml, not into the pre-push hook. Both sibling packages
copied the script and the CI step; this one kept only the script. Run here for
the first time it found four Italian test files, now translated, and it runs in
CI from now on.
## [0.9.0] - 2026-09-02
### Fixed
- **`wait_for_timeout` has never waited.** A request for 2000ms returned in
1ms, in both the sync and the async API and in every caller of either, for as
long as this package has had its own driver. Nothing raised, so nothing
showed.
The defect was in `_juggler/server.py`, the driver written here to replace the
Node one: `op_wait_for_timeout` read `params.get("timeout")`, a key the client
never sends for this call, so the sleep was always zero. The client sends
`waitTimeout`, which looks like a typo and is not - upstream Playwright
declares this one parameter under its own name because `timeout` is the
reserved key on that channel, carrying the per-call action timeout for every
other call.
⛔ The first attempt patched the vendored client instead, to make it send
the key the server happened to read. That is a fix at the symptom: it leaves
the defect in the code this project owns, the next re-vendor of upstream would
silently undo it, and it committed a false claim about the protocol into a
comment, this changelog and a test. Review caught it before it shipped.
What it cost, where it was found. A corpus run against real sites reported
three of them as blocked by three different anti-bot products, one with the
challenge markup sitting in the document; all three serve their real page once
the wait exists, so those verdicts were artefacts of the tool rather than
measurements of anything. A fourth site was reported as never loading and
loads in twenty seconds. In the MCP package a polling loop of sixty
one-second waits ran to completion instantly, so a test with a sixty-second
budget failed in fourteen for no reason anybody could see.
⛔ **This changes timings for existing callers**, which is why it is a
minor bump and not a patch. Code that called `wait_for_timeout` and returned
instantly will now take the time it asked for. That is the documented
behaviour of the API and the old behaviour was silently wrong, but a script
that waited in a loop will get slower rather than faster.
## [0.8.3] - 2026-08-31
### Changed
- **Pins `invisible-core` 26.17.0, which seals firefox-26.** That engine moves
every input handler in the visible-pointer overlay out of input delivery.
Until now only the `mousemove` one had been deferred; the press handler was
still adding a class, CREATING a DOM node, attaching a listener to it and
appending it - which starts a CSS animation - synchronously in the parent
process while a `mousedown` was in flight. That is more work than what had
been removed, and on the click path rather than the move path.
The move handler's cost was measured: with the overlay on, the median gap
between the `mousemove` events THE PAGE receives moved by a whole clamp step,
18 ms against 17, p = 0.0005. The press path was never measured, because the
bench that found the first one injects and listens for `mousemove` only - it
was watching the branch that had already been fixed. The remedy here is the
same rule applied to all four handlers rather than a second special case: a
handler records numbers and asks for a frame, and one place draws.
⛔ The timing gain is NOT measured. A press-path bench now exists and refuses
to run on a loaded machine, which is all that has been available. This is a
fix with a mechanism and a measured precedent, not a number.
- The core it pins also stops the pre-push hook from naming one cause for every
kind of publish-gate refusal.
## [0.8.2] - 2026-08-31
### Changed
- **The pinned engine moves to firefox-25, which has no updater.** Until now
every session showed an "Update available" badge in the toolbar shortly after
start. No preference could remove it: `app.update.auto` stops the download
rather than the notification, `app.update.suppressPrompts` only delays the
doorhanger because the badge is shown immediately and unconditionally, and
`app.update.disabledForTesting` is inert unless the browser is driven by
Marionette or the remote agent, which this package is not.
The engine is therefore built without the update machinery at all: the build
options are gone rather than switched off, so nothing checks for an update,
nothing can install one over the binary the seal pins, and the badge has no
code left to draw it. The update channel is unchanged, because the
application's remoting name derives from it.
One consequence is worth stating: a retail Firefox contacts Mozilla's update
service at startup and this build no longer does. No page can observe that -
no API exposes the updater's state - but anything watching the connection
can.
## [0.8.1] - 2026-08-30
### Fixed
- **`proxy=` with an `http` or `https` scheme was accepted and ignored.** The
page went out on the host's address while the timezone, the locale and the
WebRTC candidate had all been resolved through the proxy, so the session
announced one country and connected from another. That is worse than having
no proxy: it is the mismatch this package exists to avoid, produced by the
package. SOCKS was unaffected, which is why it went unnoticed.
The cause was three ways of expressing one thing, with the scheme choosing
between them: SOCKS wrote `network.proxy.*` preferences, HTTP was handed to
the Playwright driver to route per channel, and HTTP without a driver got
different preferences again. Removing the Node driver removed the middle one
and nothing said so. The other two are now gone rather than repaired: the
endpoint is read once and routed by the engine command, for every scheme. A
proxy that cannot be expressed refuses the launch instead of starting a
browser without it. Reported from outside, with a 24-site case study behind
it.
- **SOCKS proxies that require a username and password could not connect at
all.** The credentials reached the engine's channel filter and stopped there,
so the browser offered "no authentication" and the proxy closed the
connection. The symptom was a connection refused, which reads like a dead
proxy rather than a missing password. Needs the matching engine release.
- **`profile_dir=` raised `KeyError: 'browser'`.** A persistent context never
opened: the reply carried the context and not the browser, and the client
reads both.
### Changed
- Pins `invisible-core` 24.16.0, which seals the `firefox-24` engine. The proxy
credentials fix lives in the engine, so on an older binary that one is inert.
## [0.8.0] - 2026-08-30
### Removed
- The Node driver. `invisible_playwright._driver` (6 MB of vendored JavaScript)
and the `node.exe` downloader are gone, and the browser is now driven from
Python over the Juggler protocol directly. The wheel goes from 1.6 MB to
0.7 MB and the installed package from 11.2 MB to 6.5 MB, and a first install
no longer downloads a 92 MB Node runtime - it fetches the browser and nothing
else.
- `invisible-playwright show-trace`. The trace viewer is a Node application and
left with the runtime that ran it. Traces themselves are unaffected: they are
still recorded, and `playwright show-trace` from an ordinary Playwright
install opens them.
### Changed
- Pins `invisible-core` 23.16.0, which seals the `firefox-23` engine. That is the
engine carrying the two fixes below: both need it, and on an older binary the
Python half of each is inert.
- The visible pointer overlay is ON by default. It draws the Windows arrow,
with the package logo's green halo around it, in the browser's own chrome
window - which the page cannot reach, so no site sees a difference either
way. What it changes is what a person watching the screen sees. Pass
`show_cursor=False` for the previous behaviour.
### Fixed
- A teardown that was cancelled left the browser running. `asyncio.CancelledError`
inherits from `BaseException`, not from `Exception`, so the guard around each
close step never caught it: cancel the task and teardown stopped wherever it
had reached, skipping every later step including the one that reaps whatever
the close did not. A cancellation is now caught, kept, and re-raised once every
step has run, so it still propagates and nothing is left behind. Reported by
DatGuy1 in #104.
- A browser that had opened a few hundred pages stopped delivering events
entirely while still answering commands, so the next `new_page()` timed out
waiting for a session that had already been announced. Event delivery was a
chain of nested calls that grew by three per page and never shrank; past
roughly 330 pages it crossed Python's recursion limit, and the failure was
swallowed by the handler that keeps a bad callback from killing the
connection. Delivery is now flat and subscribers are removed when their page
closes.
- A closed page is now disposed, so neither the client's nor the server's
object registry grows for the life of the browser.
- A CSS query on a page returned the browser's own form widgets. Firefox builds
the controls inside `<input type=date|time>` in a shadow root it marks closed,
and the engine handed those to automation along with the closed roots a page
had authored, so the selector engine collected them as if the page had written
them: `page.locator("button")` answered 2 on a document with one button, and
the extra match was invisible. The damage was not the count. A click on the
invisible match reported success and sent nothing, so a site that had not
blocked anything looked like it had. Needs the matching engine release; the
guard is `Element::GetShadowRootForBindings` refusing UA widgets, which is
what the sibling API has done upstream since bug 2035665. Reported from
outside, with a 24-site case study behind it.
- `Response.text()` and `Response.body()` read the body again. The command they
rest on had been removed from Juggler while trimming it, and two more callers
used it without saying so: traces and HARs recorded with embedded content were
being written with every response body empty, and nothing raised. Bodies cost
memory again, bounded as upstream bounds them: 100 MB per tab, 10 MB per
response, oldest evicted first. Reading one from inside a `page.on("response")`
handler now waits for the request to finish instead of racing it, which is why
the main document used to fail where subresources did not.
## [0.7.4] - 2026-08-27
### Changed
- Pins `invisible-core` 21.16.0, which pins the `firefox-21` engine.
- The CI font gate writes its preferences into the profile instead of sending them
over the protocol. From `firefox-21` the engine refuses `Browser.enable` with a
`userPrefs` field rather than applying it late: preferences that arrive after
startup mean the first launch initialises graphics and fonts with the defaults
and the second with the stealth values, two different code paths. Nothing changes
for users of this package - the vendored driver already writes them into the
profile before startup.
## [0.7.3] - 2026-08-26
### Changed
- The Playwright client is now vendored inside the package. `invisible_playwright._pw`
(client) and `_driver` (Node driver) ship with the wheel, and `playwright` is no
longer a dependency: the code that runs is the code we ship. The vendored copy
carries four changes over upstream 1.61.1 - `set_content` waits for load the way a
driven page needs, ~643 KB of unused subsystems removed (android, electron, bidi,
recorder, chromium, webkit), `_exposeConsoleApi` neutralised, and `console.debug`
dropped from injected code. It is Apache-2.0 inside an otherwise MIT package;
`pyproject.toml` declares `MIT AND Apache-2.0` and `THIRD_PARTY_FORK.md` records
the provenance.
- Pins `invisible-core` 20.16.0.
### Removed
- **macOS is no longer supported.** Releases stopped at `firefox-20`; the CI builds
Windows and Linux only. On a Mac the package now refuses at launch with a message
that says why, instead of trying to download a binary that will not exist. Already
published macOS assets are untouched.
### Fixed
- Without a proxy the egress IP was discovered twice before the browser started -
two identical requests to an external service, from the real address, where a real
user makes none. It is discovered once now.
- `pyee` and `greenlet` are declared explicitly. They were transitive dependencies of
`playwright`; removing that dependency removed them too, while the vendored client
still imports them, so the wheel installed and then failed to import.
## [0.7.2] - 2026-08-18
### Fixed
- Pins `invisible-core` 20.15.0, which carries a fix for a defect that lived in
17 published core versions. An `http://` or `https://` proxy handed to
`build_launch_plan` produced NO proxy preference at all: `configure_proxy`
returns a non-SOCKS endpoint to its caller, because only Playwright can answer
a proxy's 407, and that path launches the binary with `subprocess` and had
nowhere to put it. The browser then went out on the machine's own address
while the geo layer had already resolved timezone, locale and egress THROUGH
the proxy, so the session announced one country and connected from another.
**This wrapper was never affected and needs no change on your side.** It hands
the endpoint to Playwright, and that was measured: the same exit IP as curl
through the same proxy, in http and in socks5. The fix matters if you also use
`invisible_core.launch.build_launch_plan` directly.
### Removed
- The `browser launches` badge. The counter behind it was a release asset hosted
on a repository that was deleted on 2026-08-18, so the series is frozen on its
last real value and the renderer would have redrawn that number every morning.
A frozen figure presented as current is worse than no figure. The history is
untouched and the SVG on the `badges` branch stays, because already-published
PyPI pages are serving it.
## [0.7.1] - 2026-08-17
### Changed
- Pins `invisible-core` 20.14.0, which seals firefox-20. The engine release is
the memory one: the same fingerprint at the same seed, the same detector
verdicts, less RAM and less CPU. The font faces stopped being copied twice on
their way into the shadow list, the bundle is opened by path instead of being
held in the heap, and the `.ttc` accounting now counts the faces we DECLARE
rather than every face the file happens to carry.
### Fixed
- This entry itself was missing until 2026-08-18. 0.7.1 shipped to the index on
2026-08-17 and the changelog stopped at 0.7.0, so for a day the released
version was undocumented. It was not caught by the release: the guard that
compares the index against this file, `test_the_changelog_documents_every_
version_it_claims_to_cover` in `tests/test_release_e2e.py`, is marked `e2e`
and the default selection deselects it. It fired on the first full e2e run
after the release, which is the run that happens for a reason unrelated to
releasing.
## [0.7.0] - 2026-08-11
### Changed
- Pins `invisible-core` 19.14.0, which seals firefox-19. The engine release
carries a `seal.json` asset for the first time, so the seal a client verifies
and the seal the build produced are the same bytes rather than two things
that agree.
- `session_kwargs` in the test bench no longer pins the proxy exit. It used a
literal session id, and the providers are sticky on it, so every realness
measurement this project made left through the same address: one distinct IP
in twenty-four hours, eleven events on it in one hour, and the detector had
classified it as a datacenter. The same binary on fresh exits scores 0, 3 and
0 where it scored 14. Consistency runs still pin one exit for their pair,
because that comparison is about our own determinism and a rotating exit puts
the network inside it.
### Fixed
- `scripts/ci_font_gate.py` asked a question whose answer could not mean
anything. It launched the engine raw, which since the generic-family map
became a declaration means launching it without one - and the engine does not
invent declarations. And it inferred "did this face load" from a line height
that we declare: it worked while the fallback measured 91 and the families 95,
and stopped the day the metrics became declared and the fallback landed on 95.
It now hands in the one declaration it needs and asserts which families SHARE
a face, measured from the ink box. Green on this build, on the previous
release, and on both platforms.
### Added
- Two e2e tests for failures the suite could not see: a session that dies under
heavy text shaping, and a frame reporting its parent's screen origin instead
of its own. Both validated by reintroducing the real defect in the engine and
rebuilding, not by reasoning about them.
## [0.6.1] - 2026-08-05
### Changed
- Pins `invisible-core` 18.13.0, which puts an upper bound in wall-clock time on the engine download. A `requests` timeout is per socket operation, so a connection delivering a byte every 59 seconds satisfied it forever and the transfer had no total limit; `INVISIBLE_DOWNLOAD_DEADLINE` (default 1800s) bounds it, and the refusal names the deadline, the elapsed time and the bytes received. Set it to 0 on a genuinely slow link.
- README: the Telegram invitation moved to the top and the status badges to the bottom.
## [0.6.0] - 2026-08-01
### Fixed
- `browser.new_page()` now gives the page the same context `browser.new_context()` does: the profile's viewport, screen, DPR, colour scheme, locale and timezone. It did not, because Playwright's `Browser.new_page` forwards to the IMPLEMENTATION object, whose own `new_page` calls `new_context` on itself, so a wrapper installed on the api object was never consulted. Measured in a real browser with the seed the e2e uses: `new_page` gave `innerWidth` 1280, Playwright's stock viewport, against a fingerprint reporting `screenWidth` 1920, while `new_context` gave 1906; a dark-pinned profile came back light on the same path. `new_page` is the call in this package's README, in the class docstring and in every example it ships, which is why this is a minor bump and not a patch.
- The engine-mismatch message told you to run `fetch --force`, three days after that flag was removed with four of the six subcommands. A test pinned the old string, so both were wrong together.
- Four tests marked `unit` drove `__enter__` with Playwright mocked and made two real network calls each, then sat out the lifetime guard's full 10s deadline waiting for a browser tree a mock never produces. 45.6s to 0.34s for that file. CI-only.
### Changed
- Requires `invisible-core==18.12.0`, which carries one prefs composition for all three entry points (`compose_session_prefs`), a `proxy=` argument on `get_default_stealth_prefs` that had no way to reach `configure_proxy` before, a proxy endpoint with no port refused rather than dropped silently, and a process scan that no longer asks psutil for the parent of every process on the machine.
- `build_prefs` delegates to that composition, so the three entry points that used to stack layers on top of `translate_profile_to_prefs` in their own order now agree, with the difference asserted as an exact set. What stays here is this path's delivery and its two decisions: the cloak, which only Windows and macOS need, and which generator draws the pointer path. `max_seconds_for` is applied here rather than passing `humanize` through, because `humanize=0` with the binary engine selected is a cap of nothing, not a request to disable motion, and passing it straight to the core would make it falsy and switch the generator off.
- Eight imports in `launcher.py` and `async_api.py` were unused and are gone. The ninth, `IANA_TO_POSIX_TZ` in `_session.py`, is not dead: the import IS the probe that turns an old core into a message about a version instead of a message about a symbol, so it keeps a `noqa` carrying the reason.
- `datetime.utcfromtimestamp` is replaced in `_recaptcha_seed.py`. It returns a naive datetime and has been deprecated since 3.12, which matters now that the matrix reaches 3.14.
- CI runs 3.11, 3.12, 3.13 and 3.14 on Ubuntu and Windows, every version `requires-python` promises; two of them had never run here. ruff selects F601 beside F821 and F811, because a dict literal with a repeated key silently keeps only the last one and Python does not warn.
- ruff is declared in the dev extra instead of being pip-installed unpinned on every run, so the tool that gates every push cannot change under us between two pushes. `pytest-mock` and `responses` were declared and used by no test in this package, and are dropped.
- Publishing is a workflow on a tag push using PyPI trusted publishing (OIDC, environment `pypi`), so there is no long-lived token on a machine or in a secret. The upload sits behind a gate that checks three things a person had to remember: the tag names the version being built, the `invisible-core==` pin is already on the index, and the suite passes, since a tag push does not trigger the ordinary test workflow. It needs a GitHub publisher registered on PyPI before its first run; until that exists the upload fails with `invalid-publisher`, which is the correct failure.
## [0.5.0] - 2026-08-01
### Changed
- The CLI is two commands, `fetch` and `version`. `path`, `clear-cache`, `doctor` and `fetch --force` are gone, and so is the tag argument. **Breaking for anybody scripting the four that were removed** - they fail loudly rather than being ignored, and a test asserts that. None of the behaviour is gone.
- `doctor` runs inside `fetch` now, on every run and before the download rather than after. That ordering is the point: a cached tree that no longer matches the seal is the case worth catching, and it is invisible to a "download if missing" that only looks at whether a file exists. It was the thing most worth doing and the thing least likely to be typed.
- `--force` is unnecessary once every run verifies: a tree is replaced because it does not match the seal, not because a flag was passed.
- `path` is the last line of `fetch`'s stdout, so `$(invisible-playwright fetch)` is the scripting form, and unlike `path` it guarantees the thing it names exists and matches. The mismatch report goes to stderr so it can never end up inside a captured path.
- `clear-cache` is deliberately NOT folded in. The cache root is shared with `invisible_firefox`, so pruning trees no seal points at would delete the other product's engine on a machine running both. `version` prints the location instead.
- The tag argument went with them: the seal decides which engine a build runs and `verify_engine` refuses anything else, so a tag on the command line could only ever name something that would then be rejected.
- The surface is asserted as an EXACT set, not a subset. A subset check passes while the CLI grows back one convenience at a time, which is how it reached six.
## [0.4.9] - 2026-08-01
### Changed
- Requires `invisible-core==18.11.0`. 18.10.0 classifies a 404 on the engine archive instead of raising a bare `HTTPError`, which is issue #51, and 18.11.0 removed the part of it that ran `pip install --upgrade` on the caller's environment: a library that installs things while it is running mutates an environment nobody asked it to touch, ignores whatever lockfile chose that version, and inside a container rewrites an image layer at runtime. What reaches a user of this package is that a 404 on the engine now says whether the release was retired on purpose, in which case no retry will find it and the message carries the upgrade command, or whether the tag is current and the fault is ours. Nothing in this package's behaviour changed.
### Fixed
- The README said the sampler draws "~400 fields". Measured against a real profile: 197 leaves on the most generous count, which treats every bundled font name as a field, and 155 prefs emitted. Corrected to ~200. `tests/test_readme_claims.py` now gates the engine version, the platform list, the download size, the documented subcommands in both directions, and every fenced Python example on the page - four claims that had nothing checking them.
- A publish was racing its own verification: the install e2e runs on `release:`, which fires seconds after the upload, and the index does not serve a new version to pip immediately, so the job reported a forgotten publish that had happened two minutes earlier. A bounded five-minute poll on the per-version endpoint, scoped to the release event. CI-only.
## [0.4.8] - 2026-07-28
### Changed
- Requires `invisible-core==18.9.0`, which carries a clearer engine refusal (it used to locate a missing juggler inside an `omni.ja` the tree does not have) and a publish gate that no longer reports a mistyped command with the same exit code as a broken gate. An exact pin means those reach a user only when this package's pin moves, so this release is what delivers them.
- CI runs ruff with F821 and F811 selected, those two only: they catch a name that cannot resolve, which is not a style question and not findable by running tests. Nothing here had ever run a linter, and there are zero violations once the three below are fixed.
### Fixed
- `Renderer` was used as an annotation six times in `_behaviour.py` and defined in no module in the repository. It survives only because `from __future__ import annotations` never evaluates an annotation, so the six were strings that looked like a type and a reader had no way to learn what the parameter accepts. It is a real alias now.
- `prof: Any` in `_motion.py`, with `Any` itself unimported. Importing it would have widened that module's deliberately tiny allowlist, which one of its own tests enforces, and there was no need: `prof` is the cumulative distance table `_profile_table` returns and `_profile_at` consumes, both annotated `list[float]` a few lines away.
- The install e2e imported the venv helpers from `invisible_core.testing`, which the runner does not have on purpose, so the job went red at collection having tested nothing. The helpers are local to those two files again, with the reason above them, and the core's suite now parses every file the user-install workflows name and refuses the import. CI-only.
- CI arms the hooks, because the suite asserts they are armed. The assertion moved into `invisible_core.testing` and all three repos started making it, but only the core's workflow ran `install_hooks.py`, so this repo went red on every push with a message about an unset config that reads like a developer's mistake rather than a missing CI step. CI-only.
## [0.4.7] - 2026-07-28
### Changed
- Requires `invisible-core==18.8.0`, which carries the work of the last two days: the prefs builder split into fourteen named steps with its output hash-identical across 400 profiles, the GeoIP fetch moved out of `download`, `invisible_core.pin` as a public module, and a publish gate whose index cross-check finally asks about the package it is gating.
- Nothing in this package's behaviour changed. The imports moved: it asks `invisible_core` for what that package exports instead of reaching into its private modules, and its own back-compat shims are for users again rather than for its own source.
### Fixed
- The suite could not tell a collapsed selection from a pass in one place and the install e2e imported the package it tests the install of in another; both are CI-only and neither reached a user.
## [0.4.6] - 2026-07-27
### Changed
- This package can no longer be published without a gate. A release used to be a bare `twine upload` of whatever happened to be in a directory - which is how 0.4.4 reached the index built from a tree that predated the fix it was meant to carry. The gate is `invisible_core.release`, one implementation for all three packages, and the pre-push hook runs it on a release tag. What makes it work is that `publish` builds and uploads *what it just built*, so a stale directory cannot be what ships.
- `PUBLISHED.json` records what actually reached the index, back-filled from the artifacts themselves.
- Requires `invisible-core==18.6.0`.
## [0.4.5] - 2026-07-27
### Fixed
- An environment holding an older `invisible-core` failed on the browser launch path with `ImportError: cannot import name 'IANA_TO_POSIX_TZ' from 'invisible_core'` - a symbol name, from a package whose version the reader did not choose. It now states which core version this build needs, keeps the original error inside the message for whoever is debugging, and ends with the command that fixes it. **0.4.4 has this bug and cannot be corrected in place; a PyPI filename is never re-uploaded. Use 0.4.5.**
## [0.4.4] - 2026-07-27
### Changed
- The process-lifetime machinery moved into `invisible-core`, shared with the profile manager. Both packages launch the same browser and both had the same leak; the manager had it a day longer because the fix lived here. `invisible_playwright._reaper` stays as a re-export, so nothing you import changes.
- The IANA-to-POSIX timezone table is the core's now. This package carried a byte-identical copy of all ten entries, including the Arizona row that exists because mapping it to `MST7MDT` made libc apply DST and an identification service deduce a Denver origin - and the core's own copy carried a comment admitting it had been copied from here. Two copies with a documented keep-in-sync obligation and nothing enforcing it.
### Fixed
- The lifetime guard counted an attempted job assignment as a successful one, so a process it had failed to adopt was never retried and the count it reported was a number of tries. Measured on the sibling package, that reported eight processes held while eight survived the kill. This package shipped the same accounting.
## [0.4.3] - 2026-07-27
### Fixed
- `async with InvisiblePlaywright(...)` no longer leaves browsers behind when the runner is killed. The lifetime guard added in 0.4.0 reached the sync entry point only, so every async user kept the entire leak while this file said it was closed. If you drive this package with `async with` on Windows, upgrading is the fix.
- The guard itself stopped adopting the process tree after the first process it found, so part of the tree stayed outside the kernel job even on the sync path. Found by killing the runner mid-session and counting the browsers still carrying that session's token: sync 0/0/0/0, async 2/0/0/2 - the same code on both, differing only in timing, which is what made an intermittent race look like a working feature. After the fix: ten sessions, zero survivors on both.
- `INVPW_TRUE_HEADLESS` now works on both entry points. It was read in the async class alone, so a documented environment variable applied or did not depending on whether you wrote `with` or `async with`.
### Changed
- The two entry points share their session logic instead of restating it: prefs, the launch environment and the IANA-to-POSIX timezone table live in one module both call. 80.6% of the async class was the sync class retyped, which is how a fix reaches one of them and a release note describes both.
- Requires `invisible-core==18.3.0`.
## [0.4.2] - 2026-07-26
### Changed
- The lifetime guard is a strategy object instead of a module of flags. `SessionToken` (a value object), `find_processes` (the only place psutil appears) and `LifetimeGuard` with a `JobObjectGuard` / `NullGuard` pair: `os.name` is tested in exactly one place, so no launcher code branches on the platform, and the Null implementation reports that it guarantees nothing rather than doing nothing while looking successful. Behaviour unchanged.
- The stroke planner is six named stages instead of one 203-line function, and the idle planner is a table of episodes instead of an if/elif chain with the weights written as bare literals in the branch conditions. Both verified byte-identical against recorded output, which caught two float-associativity regressions that no other test could see - `a * b * c` and `a * (b * c)` differ in the last bit, and that is enough to change a rounded pixel and every draw after it. A permanent fingerprint test now covers 576 cases and 16135 waypoints.
## [0.4.1] - 2026-07-26
### Changed
- Three long functions became named stages, with their output pinned before and after so the refactor could not change it in silence.
- The lifetime guard became a strategy rather than a module of flags.
- The forbidden-name scan no longer blocks a clone that has no word list.
## [0.4.0] - 2026-07-26
### Added
- Pointer movement is generated in this package, from the session seed, instead of by the engine. Existing code gets it with no edit: the six internal funnels every pointer action already goes through are wrapped, so a `page.click` written a year ago moves through the new generator. A plain `sync_playwright()` browser in the same process is untouched.
- Movement between actions: drift while reading, motion while the wheel turns, overshoot and correction, and movements that end on nothing. If every movement ends on something clickable, the set of endpoints is itself a signature however good each path is.
- `INVPW_CURSOR_ENGINE` selects the generator: `python` (default), `binary` (the previous behaviour) or `off`.
- The browser process tree is tied to this process's lifetime on Windows, so it cannot outlive a runner that was killed. Measured: eight survivors on the first attempt and twelve on the second before, zero after. `psutil` becomes a dependency for this - an optional reaper is absent exactly on the machines that need it, and silently. **This reached the SYNC entry point only. `async with` kept the whole leak through 0.4.2 - see 0.4.3.**
### Changed
- Install is now `pip install invisible-playwright`, from the index. The git URL is gone from the README, the CLI docs and the generated release notes. Nothing about the package changes for someone who was already installing it from git, except that pip can now see what it is holding.
- `invisible-core` is declared as an exact version specifier (`invisible-core== an exact version`) instead of a `git+https://...` direct reference. A direct reference carries no version, so there is nothing for `pip check` to compare and a broken environment reports clean; a real specifier is reported, exit 1, and a plain reinstall of this package repairs it. The cost is that a binary bump is now a release of every package that pins the core, which is deliberate.
- Requires `invisible-core>=18.2.0`, which bounds the timezone lookup as a step rather than only per request.
### Fixed
- `hover()` no longer fails intermittently on Windows. The approach now completes before the automation layer's hit-target check is installed, so the only event inside its window is that layer's own move, on target. Measured on a page whose target needs a scroll: 3 failures out of 3 before, 0 out of 3 after.
## [0.3.6] - 2026-07-25
### Fixed
- The browser tree now dies with this process even when the process is KILLED. An exception out of the `with` block was never the leak - `__exit__` runs and Playwright cleans up, measured over an interleaved A/B with zero survivors. The leak is the killed-runner path, where `__exit__` never executes at all: launch, kill the runner, and eight processes were still alive, twelve on the second attempt.
### Changed
- Declared as `invisible_playwright` on the index, pinning `invisible-core==18.1.0`.
## [0.3.5] - 2026-07-25
### Changed
- Playwright pin is back to `>=1.55,<=1.61.0`: the floor drop to `1.40` shipped in 0.3.4 is reverted. The conservative CI-tested floor (1.55) is kept together with the tested upper cap (1.61.0).
## [0.3.4] - 2026-07-24
### Changed
- Playwright floor lowered to `>=1.40,<=1.61.0`. The `1.55` floor was never a real compatibility bound - it was only the single minor that 0.3.1 had pinned. The `firefox-18` binary was smoke-tested (launch, `new_context`, navigate, evaluate, click) against 1.40, 1.45, 1.50 and 1.54 and passed on all four, so anyone on an older client keeps working; the upper cap stays at the tested 1.61.0. Reverted in 0.3.5.
## [0.3.3] - 2026-07-24
### Changed
- Playwright pin is now `>=1.55,<=1.61.0` (was `>=1.55,<1.62`). The open upper bound would let an untested version below 1.62 install and break a fresh setup the way 1.61 first did; the cap is now the exact version validated against this binary, 1.61.0. It moves forward on purpose, once a newer Playwright is tested against the binary.
- The expected Firefox version in the tests is derived from the constant instead of a hardcoded literal, so a binary bump no longer needs the test edited alongside it.
## [0.3.2] - 2026-07-24
### Changed
- Playwright pin moved to `>=1.55,<1.62` (was `>=1.55,<1.56`). The `firefox-18` binary rebases onto Firefox 151, which is what the latest Playwright (1.61) pairs with, so 1.61 now drives the binary natively - no more pinning to an older client. Both ends of the range were tested against the new binary (full browser suite on 1.61; drift-free protocol on 1.55). `scripts/playwright_pin.txt` -> 1.61.0.
- README badges are served as SVGs from the repo instead of a third-party badge service, so the header no longer depends on an external endpoint; the dynamic Firefox-version badge, which was the flaky one, is now static.
### Fixed
- The CI font gate checks that the whitelisted faces actually LOAD, not only that the family enumerates. Enumerating a font is not loading it, so the previous check could pass on a build that could name a family it could not render.
## [0.3.1] - 2026-07-13
### Fixed
- [#48](https://github.com/feder-cr/invisible_playwright/issues/48): Playwright 1.61 adds an `isMobile` field to the `Browser.setDefaultViewport` Juggler command that the FF150 binary does not accept, which kills the session. The range narrows from `>=1.40,<1.61` to the CI-tested 1.55.x (`>=1.55,<1.56`, single-sourced from `scripts/playwright_pin.txt`) so a fresh install always gets a compatible client. Widened again in 0.3.2, once `firefox-18` rebased onto Firefox 151.
### Changed
- The patched-Firefox source repo is now `feder-cr/firefox_antidetect_patch` (it was `feder-cr/invisible_firefox`, a name the profile manager took over). Release notes, CI references and the release URLs the download tests mock all point at the new name; the binaries themselves are unchanged.
- The wrapper no longer injects the font-list / system-UI environment variables at launch: the binary ships its own font bundle and is self-contained on that front. The integration tests were adapted and the font-sampling tests dropped.
### Added
- `scripts/ci_font_gate.py`: asserts the Windows font persona on every OS, so a Linux or macOS runner catches a font regression that would otherwise only show up on Windows.
## [0.3.0] - 2026-07-03
### Changed
- Pure config (seed -> fingerprint -> prefs, binary download, proxy, geo) is split out into a standalone `invisible-core` package with zero Playwright, so a profile manager can reuse it without pulling Playwright in. The wrapper depends on it and replaces the moved modules with full-alias shims: existing imports (public API, submodules, private names) and `isinstance` checks keep working unchanged. `tests/test_backcompat.py` locks that contract with 6 guards.
- `BINARY_VERSION` walks `firefox-7` -> `firefox-13` across this cycle: `firefox-8`, then `firefox-9` (`firefox-8` was found broken and is refused outright, not merely superseded), `firefox-10`, `firefox-11`, `firefox-12` (the cross-OS render-parity build) and `firefox-13` (geo-aware locale/Intl + the Windows font bundle + the audio gate).
- Playwright is capped at `<1.61` (`>=1.40,<1.61`) and the pin is single-sourced from `scripts/playwright_pin.txt` instead of being written in two places.
- WebGL personas: only the GPU buckets that survive the tampering checks are shipped, and the render-noise seed is decoupled from the persona seed.
- The dead `zoom.stealth.normalize_date_now` baseline pref is dropped.
- New runtime dependencies: `requests[socks]` (SOCKS egress lookup), `maxminddb` (mmdb reader), `tzdata` (IANA database for `zoneinfo`, which Windows lacks). After the split they arrive transitively through `invisible-core`.
### Added
- `timezone="auto"`: the browser timezone is auto-derived from the egress IP. By default (no explicit timezone) it ALWAYS resolves - from the proxy egress when a proxy is set, otherwise from the host's own public IP - so the zone can never disagree with the IP (the classic `timezone_mismatch` signal). An explicit `"Area/City"` is the only way to force a specific zone. On failure: with a proxy the launch raises (no silent host-TZ fallback behind a foreign proxy); without a proxy it falls back to the host TZ so a transient lookup can't break the launch.
- The egress IP is mapped to its IANA zone with an offline mmdb (`daijro/geoip-all-in-one`). It always tracks the upstream weekly rebuild: on every launch the current latest release tag is resolved from the `releases/latest/download` permalink (no GitHub API → no rate limit) and pulled only if newer than the cache, older copies pruned. Offline → the cached copy is reused; never a pinned tag (daijro prunes old releases, so a pin eventually 404s). `STEALTHFOX_GEOIP_MMDB` points at your own `.mmdb` to skip the download.
- `resolve_session_timezone(timezone, proxy)` and `ensure_geoip_mmdb()` re-exported at the package root (plus `GeoTimezoneError`) so integrations that own their launch can reproduce the resolution.
- `tests/test_geo.py` (37) + `tests/test_geoip_update.py` (freshness / auto-update / offline fallback) unit tests.
- Cross-OS render parity (needs `firefox-12`): the same font/canvas/WebGL fingerprint now renders consistently on Windows, Linux and macOS, so a Windows persona looks identical regardless of the host the binary runs on. Each whitelisted font renders a distinct canvas image (font-detection probes that dedup by rendered image keep every name), the standard Windows fonts (Calibri, Franklin Gothic, Gadugi, Javanese Text, Myanmar Text) are always present so the detected font set matches a real Windows install, and the per-seed render-noise leaves a solid-colour reference render byte-exact while still varying real fingerprint renders.
- GPU persona applied on every platform: Linux/macOS hosts now present a coherent Windows GPU (renderer + WebGL parameters) instead of the host's real adapter; pool re-rooted on a real-device GPU mix.
- `tests/test_canvas_render_stealth.py`, `tests/test_webgl_noise_active.py` and new `tests/test_sampler.py` cases: regression guards for per-font canvas distinctness, solid-readback purity under render-noise, and the always-present standard-font invariant.
- macOS support in the wrapper (x86_64 + arm64): the release pipeline builds five targets and the wrapper resolves the archive for the host it runs on.
- Headless is cloaked on Windows and macOS and runs under Xvfb on Linux, instead of the flagged headless mode; CI carries a cloak guard and a WebGL-masking guard. The cloak applies on the async path too.
- The e2e suite runs the real detectors offline (BotD, FingerprintJS, fpscanner, CreepJS, vendored under `tests/vendor/`) and a hermetic SOCKS5 auth + routing e2e, all on CI on every push. The 15 hand-rolled BotD imitations are dropped now that the real one runs.
- `fetch --force` on the CLI, to re-download an archive over a cached one.
### Fixed
- WebRTC behind a proxy ships the validated realness configuration, with CI guards: a fully blocked WebRTC is itself a tell, so the guard asserts the positive form and not merely the absence of a leak.
- The TLS ClientHello matches stock Firefox again: cipher `0xC009` was being offered and stock Firefox does not offer it.
- The humanize prefs were written under the wrong namespace.
- The font pool uses the real Windows 11 family name `franklin gothic medium`; the previous name does not exist on a real install.
## [0.2.0] - 2026-05-28
@@ -30,7 +735,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
## [0.1.8] - 2026-05-23
### Fixed
- [#20](https://github.com/feder-cr/invisible_playwright/issues/20): cross-origin iframes were unreachable from Playwright. `element_handle.content_frame()` returned `None`, `frame.evaluate()` threw cross-origin SOP errors, and `frame_locator(...).click()` timed out even with `force=True`. Root cause: FF150 defaults `fission.webContentIsolationStrategy=1` (`IsolateEverything`), which site-isolates every cross-origin iframe into a separate `webIsolated` content process even when `fission.autostart=False`. The parent's Juggler FrameTree then has a Frame placeholder with no docShell and no URL — every protocol op that needs to enter the iframe fails. Fix: pin `fission.webContentIsolationStrategy=0` (`IsolateNothing`) in the baseline prefs. The setting can be flipped back per session via `extra_prefs={"fission.webContentIsolationStrategy": 1}`.
- [#20](https://github.com/feder-cr/invisible_playwright/issues/20): cross-origin iframes were unreachable from Playwright. `element_handle.content_frame()` returned `None`, `frame.evaluate()` threw cross-origin SOP errors, and `frame_locator(...).click()` timed out even with `force=True`. Root cause: FF150 defaults `fission.webContentIsolationStrategy=1` (`IsolateEverything`), which site-isolates every cross-origin iframe into a separate `webIsolated` content process even when `fission.autostart=False`. The parent's Juggler FrameTree then has a Frame placeholder with no docShell and no URL - every protocol op that needs to enter the iframe fails. Fix: pin `fission.webContentIsolationStrategy=0` (`IsolateNothing`) in the baseline prefs. The setting can be flipped back per session via `extra_prefs={"fission.webContentIsolationStrategy": 1}`.
### Added
- `tests/test_cross_origin_iframe.py`: 4 unit + 5 e2e regression sentinels for cross-origin iframe interaction. The e2e layer runs entirely offline against two local HTTP servers on `127.0.0.1` (two ports = two SOP origins) and covers `page.frames` URL tracking, `content_frame()`, `frame.evaluate()`, `frame_locator(...).locator(...)`, and end-to-end `dispatch_event("click")` for plain, sandboxed and titled iframes. A future FF upgrade or fingerprint A/B that flips the pref back to `1` will fail the suite before shipping.
@@ -65,7 +770,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
## [0.1.4] - 2026-05-20
### Fixed
- [#13](https://github.com/feder-cr/invisible_playwright/issues/13): every page that threw an uncaught JS error (e.g. bunny.net) crashed the Playwright client with `TypeError: Cannot read properties of undefined (reading 'url')`. Root cause: upstream Playwright Juggler added a required `location` field to the `Page.uncaughtError` event in the 2026-05-07 roll ([microsoft/playwright@c8604ec](https://github.com/microsoft/playwright/commit/c8604ecd97)); our fork was carrying the pre-roll schema in every `firefox-N` build. Fix matches upstream — Runtime.js builds the `errorLocation`, PageAgent.js forwards it on both worker and runtime error paths, Protocol.js declares the schema field. Reporter: [@dionorgua](https://github.com/dionorgua).
- [#13](https://github.com/feder-cr/invisible_playwright/issues/13): every page that threw an uncaught JS error (e.g. bunny.net) crashed the Playwright client with `TypeError: Cannot read properties of undefined (reading 'url')`. Root cause: upstream Playwright Juggler added a required `location` field to the `Page.uncaughtError` event in the 2026-05-07 roll ([microsoft/playwright@c8604ec](https://github.com/microsoft/playwright/commit/c8604ecd97)); our fork was carrying the pre-roll schema in every `firefox-N` build. Fix matches upstream - Runtime.js builds the `errorLocation`, PageAgent.js forwards it on both worker and runtime error paths, Protocol.js declares the schema field. Reporter: [@dionorgua](https://github.com/dionorgua).
### Changed
- `BINARY_VERSION` bumped from `firefox-3` to `firefox-4`. JS-only change inside `chrome/juggler/`; `xul.dll` and `firefox.exe` are byte-identical to `firefox-3`.
@@ -73,23 +778,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
## [0.1.3] - 2026-05-19
### Changed
- `BINARY_VERSION` bumped from `firefox-2` to `firefox-3`. The new archives on both Windows and Linux are built from a clean clone of [feder-cr/invisible_firefox#stealth/150](https://github.com/feder-cr/invisible_firefox/tree/stealth/150) — the consolidated source-of-truth fork (renamed from `feder-cr/firefox`; the companion `feder-cr/firefox-stealth` patches repo was deleted, all patches now live as commits on top of `mozilla-firefox/firefox`).
- `BINARY_VERSION` bumped from `firefox-2` to `firefox-3`. The new archives on both Windows and Linux are built from a clean clone of [feder-cr/firefox_antidetect_patch#stealth/150](https://github.com/feder-cr/firefox_antidetect_patch/tree/stealth/150) - the consolidated source-of-truth fork (renamed from `feder-cr/firefox`; the companion `feder-cr/firefox-stealth` patches repo was deleted, all patches now live as commits on top of `mozilla-firefox/firefox`).
- The patched Firefox archive now ships the **proper C++ implementation** of `windowUtils.jugglerSendMouseEvent`, replacing the JS shim from 0.1.2.
### C++ fixes landed in this release
- **C1+C2**: `setDownloadInterceptor` IDL + cpp (re-landed for FF150).
- **C4**: 5 `nsIDocShell` stealth attributes (`fileInputInterceptionEnabled`, `overrideHasFocus`, `bypassCSPEnabled`, `forceActiveState`, `disallowBFCache`).
- **C5**: `LauncherProcessWin.cpp` + `nsWindowsWMain.cpp` juggler-pipe handle inheritance — without this, the Playwright pipe disconnects immediately on launch.
- **C6**: `juggler-navigation-started-renderer` / `-browser` observer notifications in `nsDocShell.cpp` and `CanonicalBrowsingContext.cpp` — without these, `Page.ready` never fires and `ctx.new_page()` hangs.
- **C5**: `LauncherProcessWin.cpp` + `nsWindowsWMain.cpp` juggler-pipe handle inheritance - without this, the Playwright pipe disconnects immediately on launch.
- **C6**: `juggler-navigation-started-renderer` / `-browser` observer notifications in `nsDocShell.cpp` and `CanonicalBrowsingContext.cpp` - without these, `Page.ready` never fires and `ctx.new_page()` hangs.
- **C7 (partial)**: storage stub for `nsIDocShell.languageOverride`. Workaround `InvisiblePlaywright(locale="")` recommended until full BC FIELD port lands.
### Verified
- Both archives built from same source: feder-cr/invisible_firefox commit `68906f1f9c55`.
- Both archives built from same source: feder-cr/firefox_antidetect_patch commit `68906f1f9c55`.
- Windows + Linux smoke suite green: launch, `ctx.new_page()`, `page.mouse.{move,down,up,click,wheel}`, `navigator.webdriver=false`, sannysoft 32/33 PASS.
- SHA256 published in `checksums.txt` on the `firefox-3` release.
### Notes
- This is the first release with a native Linux build of the patched binary (previous `firefox-3` draft mentioned shipping the Linux firefox-2 archive byte-for-byte; that no longer applies — Linux now has the full C++ patch series).
- This is the first release with a native Linux build of the patched binary (previous `firefox-3` draft mentioned shipping the Linux firefox-2 archive byte-for-byte; that no longer applies - Linux now has the full C++ patch series).
## [0.1.2] - 2026-05-18
@@ -103,8 +808,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
## [0.1.1] - 2026-05-18
### Fixed
- **Critical**: every `page.mouse.*`, `page.click(selector)`, `locator.click()`, `page.hover()`, `mouse.wheel()` failed on the patched Firefox 150 binary with `win.windowUtils.jugglerSendMouseEvent is not a function`. The Juggler JS was porting calls to a Playwright-specific C++ method that was never landed in the FF146→FF150 port; replaced with the Mozilla chrome-scope `win.synthesizeMouseEvent` helper which is present in FF150. Six call sites patched across `juggler/protocol/PageHandler.js` and `juggler/content/PageAgent.js`. Reporter: [@trob9](https://github.com/trob9) — [#9](https://github.com/feder-cr/invisible_playwright/issues/9).
- `_linkedBrowser.scrollRectIntoViewIfNeeded()` is now guarded at both call sites in `PageHandler.js` (`dispatchMouseEvent` and `dispatchWheelEvent`) — the method is not present on the shipped FF150 `<browser>` element, so the unguarded call threw before the mouse event was dispatched.
- **Critical**: every `page.mouse.*`, `page.click(selector)`, `locator.click()`, `page.hover()`, `mouse.wheel()` failed on the patched Firefox 150 binary with `win.windowUtils.jugglerSendMouseEvent is not a function`. The Juggler JS was porting calls to a Playwright-specific C++ method that was never landed in the FF146→FF150 port; replaced with the Mozilla chrome-scope `win.synthesizeMouseEvent` helper which is present in FF150. Six call sites patched across `juggler/protocol/PageHandler.js` and `juggler/content/PageAgent.js`. Reporter: [@trob9](https://github.com/trob9) - [#9](https://github.com/feder-cr/invisible_playwright/issues/9).
- `_linkedBrowser.scrollRectIntoViewIfNeeded()` is now guarded at both call sites in `PageHandler.js` (`dispatchMouseEvent` and `dispatchWheelEvent`) - the method is not present on the shipped FF150 `<browser>` element, so the unguarded call threw before the mouse event was dispatched.
### Added
- `tests/test_mouse.py`: 12-case regression suite covering every patched code path (mouse.move/click/dblclick/right-click, modifiers, locator.click/hover, wheel, manual mousedown+up, off-viewport move, humanize intermediate moves, scroll-and-click on offscreen element). Test cases inspired by `microsoft/playwright-python/tests/async/test_click.py`.
@@ -112,14 +817,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
### Notes
- The Stealthfox humanize Bezier expansion continues to fire intermediate `mousemove` events; the swap to `synthesizeMouseEvent` does not change the human-trajectory behavior (verified by test).
- The reCAPTCHA v3 score (0.90) and FingerprintPro / CreepJS results documented in the README are unaffected — `synthesizeMouseEvent` is a legitimate Mozilla helper that does not increase the anti-detect surface.
- The reCAPTCHA v3 score (0.90) and FingerprintPro / CreepJS results documented in the README are unaffected - `synthesizeMouseEvent` is a legitimate Mozilla helper that does not increase the anti-detect surface.
- A binary refresh of the patched Firefox archive on GitHub Releases is required for users to receive this fix (the Juggler JS is shipped inside the archive). The `BINARY_VERSION` will be bumped to `firefox-2` in that release.
## [0.1.0] - 2026-05-13
### Added
- Initial public release.
- `InvisiblePlaywright` sync and async context managers — drop-in replacement for `playwright.sync_api.Browser` / `async_api.Browser`.
- `InvisiblePlaywright` sync and async context managers - drop-in replacement for `playwright.sync_api.Browser` / `async_api.Browser`.
- StealthFox humanize hook: Bezier-curve mouse trajectories enabled by default.
- `_fpforge` Bayesian fingerprint sampler with ~400 fields per session.
- CLI: `invisible-playwright fetch | path | version | clear-cache`.
@@ -127,6 +832,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
- SOCKS5 / SOCKS4 / HTTP / HTTPS proxy support with auth.
- Linux x86_64 and Windows x86_64 binary support.
[Unreleased]: https://github.com/feder-cr/invisible_playwright/compare/v0.1.1...HEAD
[0.1.1]: https://github.com/feder-cr/invisible_playwright/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.1.0
[0.4.3]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.4.3
> The two oldest entries point at a COMMIT, not a tag: 0.1.0 and 0.1.1
> predate arriving on PyPI (the index starts at 0.3.5) and never had
> a tag. Creating one today is not harmless: `publish.yml` triggers
> on `v*`, and for a version the index does not serve, `already-published`
> does not short-circuit, so a new tag could kick off a publish
> attempt. The commit is the same information without that risk.
[0.1.1]: https://github.com/feder-cr/invisible_playwright/compare/7a983e99c53fa1ec1a443651a4dd9de42258dc61...589c848e07a67c459969a2ddfb79851f48b10eff
[0.1.0]: https://github.com/feder-cr/invisible_playwright/commit/7a983e99c53fa1ec1a443651a4dd9de42258dc61
[0.4.4]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.4.4
[0.4.5]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.4.5
[0.4.6]: https://github.com/feder-cr/invisible_playwright/releases/tag/v0.4.6
+10 -7
View File
@@ -6,8 +6,8 @@ Thanks for your interest in improving this project. Contributions are welcome vi
- **Bug?** Open a [bug report](https://github.com/feder-cr/invisible_playwright/issues/new?template=bug_report.yml).
- **Idea?** Open a [feature request](https://github.com/feder-cr/invisible_playwright/issues/new?template=feature_request.yml).
- **Security issue?** Do **not** open a public issue — see [SECURITY.md](SECURITY.md).
- **The C++ patches** live in the companion repo [feder-cr/invisible_firefox](https://github.com/feder-cr/invisible_firefox) (branch `stealth/150`). Bugs in fingerprint spoofing usually belong there.
- **Security issue?** Do **not** open a public issue - see [SECURITY.md](SECURITY.md).
- **The C++ patches** live in the companion repo [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch) (branch `stealth/151`). Bugs in fingerprint spoofing usually belong there.
## Scope
@@ -18,7 +18,7 @@ This repository ships the **Python wrapper** (`invisible_playwright`) around a p
- Binary download/caching, CLI, proxy plumbing
- Tests, docs, examples, packaging
Out of scope (belongs in `invisible_firefox`):
Out of scope (belongs in `firefox_antidetect_patch`):
- Changes to the Firefox C++ source
- New preferences exposed by the patched binary
@@ -26,6 +26,9 @@ Out of scope (belongs in `invisible_firefox`):
## Development setup
To *use* the package you do not need any of this: `pip install invisible-playwright`.
The steps below are for working on the code.
```bash
git clone https://github.com/feder-cr/invisible_playwright.git
cd invisible_playwright
@@ -40,7 +43,7 @@ Requires Python 3.11+ and one of: Windows x86_64, Linux x86_64.
## Running tests
```bash
pytest # unit + integration (default — fast)
pytest # unit + integration (default - fast)
pytest -m e2e # end-to-end, requires the patched binary
pytest -m slow # wheel-build regression tests
```
@@ -50,7 +53,7 @@ Markers are defined in `pyproject.toml`. The default run excludes `slow` and `e2
## Pull requests
1. Fork and create a topic branch (`fix/...`, `feat/...`, `docs/...`).
2. Keep PRs focused — one logical change per PR.
2. Keep PRs focused - one logical change per PR.
3. Add or update tests for any behavior change.
4. Make sure the default `pytest` run is green.
5. Follow [Conventional Commits](https://www.conventionalcommits.org/) for commit messages (e.g. `fix(launcher): handle missing profile dir`).
@@ -63,9 +66,9 @@ CI must be green before merge.
Before opening, please:
- Search [existing issues](https://github.com/feder-cr/invisible_playwright/issues) — the bug may already be tracked.
- Search [existing issues](https://github.com/feder-cr/invisible_playwright/issues) - the bug may already be tracked.
- Reproduce on the **latest release** if possible.
- Confirm the issue is in the Python wrapper, not the patched Firefox itself. If a fingerprint is leaking or a detector flags the browser, open the issue at `feder-cr/invisible_firefox` instead.
- Confirm the issue is in the Python wrapper, not the patched Firefox itself. If a fingerprint is leaking or a detector flags the browser, open the issue at `feder-cr/firefox_antidetect_patch` instead.
Include:
+7754
View File
File diff suppressed because it is too large. Load diff
+160 -67
View File
@@ -1,64 +1,69 @@
# invisible_playwright
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-dark.png">
<img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-light.png" alt="invisible_playwright" width="720">
</picture>
<h3 align="center">Free antidetect browser stealth for Playwright: undetected Firefox fingerprint, headless or headed.<br>
Python web scraping and captcha bypass. Open source, and it passes every bot detection test.</h3>
</div>
[![tests](https://github.com/feder-cr/invisible_playwright/actions/workflows/tests.yml/badge.svg)](https://github.com/feder-cr/invisible_playwright/actions/workflows/tests.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![Firefox 150.0.1](https://img.shields.io/badge/firefox-150.0.1-orange.svg)](https://www.mozilla.org/firefox/)
[![GitHub release](https://img.shields.io/github/v/release/feder-cr/invisible_playwright.svg)](https://github.com/feder-cr/invisible_playwright/releases)
[![GitHub stars](https://img.shields.io/github/stars/feder-cr/invisible_playwright.svg?style=social)](https://github.com/feder-cr/invisible_playwright/stargazers)
[![browser launches](https://img.shields.io/github/downloads/feder-cr/invisible_firefox/usage-counter/total?label=browser%20launches&color=blue)](https://github.com/feder-cr/invisible_firefox/releases/tag/usage-counter)
![invisible_playwright - 5/5 detection suites passed](https://raw.githubusercontent.com/feder-cr/invisible_playwright/7a8693c6b4386e9a84dd93bedc479ca8654482e1/docs/screenshots/hero.gif)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-Federico%20Elia-0A66C2?logo=linkedin&logoColor=white)](https://it.linkedin.com/in/federico-elia-5199951b6)
## How it works
**Stealth Firefox that passes every bot detection test. Drop-in Playwright replacement, fingerprint patched at the C++ level, not a JavaScript shim.**
Anti-bots ask two questions, and reCAPTCHA, hCaptcha and Cloudflare Turnstile score the answers. invisible_playwright answers yes to both.
![invisible_playwright - 5/5 detection suites passed](docs/screenshots/hero.gif)
**1. Is this a real browser?** Yes. It is Firefox, patched at the C++ source level.
- The browser fingerprint is set inside the engine, not injected into the page: navigator, screen, GPU/WebGL, canvas, fonts, audio, WebRTC, timezone, network. Headless or headed, the same values either way.
- No JS shim, no override, no seam to read.
## Why it's powerful
**2. Is a real person using it?** Yes. The actions are humanized in the driver.
- Every click, hover and drag follows a natural mouse path with human timing, no teleporting cursor.
- Each input is byte-identical to a real mouse: real input source, pressure, trusted events.
**Most other anti-detect browsers patch Chromium at the JavaScript level** - they override `navigator`, `WebGLRenderingContext.getParameter`, canvas APIs, and so on via injected scripts. This has two fatal problems:
**And one thing the stock driver cannot do.** Playwright's own documentation says
"Closed-mode shadow roots are not supported", and measured on 2026-09-05 against a page
carrying one open and one closed root, stock Playwright returned zero matches for the
closed content in Firefox and in Chromium alike. This engine returns the element, while
the page still reads `null` from `element.shadowRoot`, so nothing observable to the page
changes. The three-arm table and the page that reproduces it:
[closed shadow roots](https://github.com/feder-cr/invisible_playwright/wiki/closed-shadow-root-playwright).
1. **JS patches are detectable.** Anti-bots enumerate native function `.toString()`, check descriptor configurability, compare property enumeration order, watch for prototype mutations. Every patch leaves a fingerprint of its own. CreepJS has an entire battery of "lies detectors" built around this.
2. **Chromium itself is now suspect.** Residential-proxy bot traffic is overwhelmingly Chromium-based, so detectors weight anything Chromium-shaped as risky by default. Chromium-based forks inherit Chrome's open-source layers (BoringSSL, Blink, V8, ANGLE) cleanly, but they still cannot fully match Chrome in practice: Chrome ships closed-source components on top (Widevine, proprietary codecs, Google Update / Safe Browsing endpoints) that flip detectable JS feature flags and network signals, and forks lag Chrome's release cadence by days to weeks, leaving telltale version-specific behaviours that detectors lock onto.
**invisible_playwright patches Firefox at the C++ level.** The spoofed values come back out through the normal Gecko paths - there is no JS shim, no override, no `Object.defineProperty`. **From the page's point of view, the browser is just telling the truth.** Anti-bot lie-detectors have nothing to latch onto.
invisible_playwright spoofs **all the layers that matter, together, coherently**: Navigator, screen, GPU/WebGL, Canvas, fonts, audio, WebRTC, timezone, DevTools detection, SOCKS5 auth, and the rest. See [feder-cr/invisible_firefox](https://github.com/feder-cr/invisible_firefox) for the full per-layer breakdown of which C++ files are patched and why.
Everything is driven by preferences - no hardcoded values in the binary. You change one pref, you change the spoofed value.
Driven by the standard Playwright API. Full breakdown: [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch).
---
## How it compares
**CloakBrowser** ships a similar pitch for Chromium, but its binary is **closed source** (the source-level patches are not published, you only get the compiled output), and it still hits the Chromium reCAPTCHA ceiling. The commercial anti-detect browsers (**Multilogin**, **GoLogin**, AdsPower, Dolphin, Kameleo) are paid SaaS that overlay JS-layer spoofing on a patched Chromium. Managed profiles are nice but raw detection bypass sits below both Camoufox and us.
| | invisible_playwright | Camoufox | CloakBrowser | Multilogin |
|---|---|---|---|---|
| Engine | Firefox 150 | Firefox (~1 year old base) | Chromium | Chromium fork |
| Patch depth | C++ source | C++ source | C++ source | JS overrides |
| Maintenance | Active | Gap (~1 year) | Active | Active SaaS |
| Open source | ✅ MIT | ✅ MPL | ❌ Closed source | ❌ Closed source |
| `.toString()` clean | ✅ | ✅ | ✅ | ❌ Detectable shims |
| Canvas / WebGL / Audio | ✅ C++ | ⚠️ Drift vs current FF | ✅ C++ | ⚠️ JS override |
| SOCKS5 auth | ✅ Patched | ❌ | ⚠️ Playwright proxy | ⚠️ Varies |
| **reCAPTCHA v3 score** | **0.90** | ~0.3-0.5 | ~0.3-0.5 | ~0.3-0.6 |
| FP Pro - bot detected | ✅ Not detected | ❌ Detected | ❌ Detected | ❌ Detected |
| CreepJS lies | ✅ 0 | ❌ Multiple | ✅ 0 | ❌ Multiple |
| Cost | Free | Free | Free | From $99/mo |
## Still seeing captchas or anti-bot? It's the proxy.
Once the browser is handled it stops being the variable. If you are still getting challenged, the tell is no longer the browser, it is the IP you come from. Around 90% of proxies are public: anyone can rent the same address, so it is already known and sits on the blocked-IP lists sites check. A perfect browser on a known IP still loses.
---
## Install
```bash
pip install git+https://github.com/feder-cr/invisible_playwright.git
python -m invisible_playwright fetch # one-time ~100 MB download, SHA256-verified
pip install invisible-playwright
python -m invisible_playwright fetch # one-time download, sha256-verified: 240 MB (Windows) / 262 MB (Linux x86_64) / 253 MB (Linux arm64), about 550 MB unpacked
```
Supported platforms: **Windows x86_64**, **Linux x86_64 / arm64**, **macOS arm64 / x86_64**. On macOS the app is ad-hoc signed (not notarized): if Gatekeeper complains, clear the quarantine flag once with `xattr -dr com.apple.quarantine` on the cached `Firefox.app`.
Requires **Python 3.11 or newer**.
Supported platforms: **Windows x86_64**, **Linux x86_64 / arm64**. macOS is no longer supported (releases stopped at firefox-20); on a Mac the package refuses at launch with a clear message rather than downloading a binary that no longer exists.
### If you would rather prompt than script
This page is the engine, as a Python library. There are two ways to use it
without writing code, and both are one line:
- **From an MCP client you already have** (Claude Code, Claude Desktop,
Cursor): `claude mcp add stealth -- uvx aihawk`. See
[the MCP server page](https://github.com/feder-cr/AIHawk/wiki/mcp-server).
- **With an interface and a model included**, needing only an OpenRouter key:
`uvx aihawk ui --openrouter-key sk-or-...`. See
[AIHawk](https://github.com/feder-cr/AIHawk).
Same engine underneath, and the second is a client of the first.
---
@@ -74,7 +79,7 @@ Supported platforms: **Windows x86_64**, **Linux x86_64 / arm64**, **macOS arm64
+ with InvisiblePlaywright() as browser:
```
Every session gets a unique, coherent fingerprint drawn from real-world Firefox telemetry (GPU / audio / fonts / ~400 other fields) and Bezier-curve mouse motion baked into the browser itself.
Every session gets a distinct fingerprint (GPU, audio, fonts, screen, ~200 fields) and Bezier-curve mouse motion.
**Sync**
```python
@@ -98,19 +103,7 @@ async with InvisiblePlaywright(proxy={"server": "socks5://...", "username": "u",
The `browser` object is a `playwright.sync_api.Browser` / `playwright.async_api.Browser` - every Playwright method works as-is.
---
### Random fingerprint per session
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright() as browser:
page = browser.new_page()
page.goto("https://creepjs-api.web.app")
```
Every call samples a new coherent profile. Log the seed to reproduce interesting runs:
Log the seed to replay a run:
```python
sf = InvisiblePlaywright()
@@ -138,7 +131,7 @@ with InvisiblePlaywright(proxy=proxy) as browser:
...
```
Schemes supported: `socks5`, `socks4`, `http`, `https`. Auth works on all of them (SOCKS5 via patched `nsProtocolProxyService.cpp`, HTTP/HTTPS via Playwright). DNS is routed through the proxy by default, no local leak.
Schemes supported: `socks5`, `socks4`, `http`, `https`. DNS is routed through the proxy by default, no local leak.
### Timezone
@@ -150,7 +143,7 @@ The browser timezone follows `timezone=`:
with InvisiblePlaywright(proxy=proxy) as browser:
...
# explicit IANA zone always wins — the only way to force a specific zone
# explicit IANA zone always wins, the only way to force a specific zone
with InvisiblePlaywright(proxy=proxy, timezone="America/New_York") as browser:
...
```
@@ -179,24 +172,124 @@ Full list of pinnable keys, how pinning interacts with the Bayesian sampler, and
## CLI
The installed command is `invisible-playwright`, with a hyphen. `python -m
invisible_playwright` works identically and needs nothing on PATH.
```bash
invisible_playwright fetch # download the binary if missing
invisible_playwright fetch --force # re-download even if cached
invisible_playwright path # print the absolute path to the cached binary
invisible_playwright version # wrapper and binary versions
invisible_playwright clear-cache # remove all cached binaries
invisible-playwright fetch # download the engine if missing, check every cached
# one against the seal, print the path
invisible-playwright version # wrapper, core and engine versions, and where the
# engine is cached
```
## Documentation, guides and comparisons
All of it reads better, and is searchable, in
**[the wiki](https://github.com/feder-cr/invisible_playwright/wiki)**,
organised into four sections instead of one flat list:
- **[Documentation](docs/documentation.md)** -
installation, the two-line switch from plain Playwright, proxy/timezone
configuration, pinning specific fields, the CLI.
- **[Guides](docs/guides.md)** - how
detection actually works, in seven groups: browser identity, canvas/WebGL/fonts/
audio, network and WebRTC, the automation layer, AI agents, the detectors themselves
explained from source, and testing.
- **[Comparisons](docs/comparisons.md)** -
against Camoufox, Patchright, nodriver and playwright-stealth, and the case for
Firefox over Chromium generally.
- **[Integrations](docs/integrations/)** -
Scrapy, Crawlee, Robot Framework, CodeceptJS, test runners, Playwright MCP, and the
frameworks it does not fit, by name.
If you don't know where to start: [Three ways to make Playwright undetected](docs/playwright-stealth-levels.md)
is the map most other pages link back to, [Playwright detected as a bot on one site](docs/playwright-detected-as-bot.md)
is the troubleshooting order, and [navigator.webdriver is not the tell you think it is](docs/navigator-webdriver-explained.md)
explains the most famous property in this space and why patching it alone buys you
almost nothing.
The detectors section now covers the commercial anti-bot products by name, each
read from its own documentation or from confirmed reverse engineering:
[Cloudflare Bot Management](docs/cloudflare-bot-management-explained.md) and
[Turnstile](docs/cloudflare-turnstile-explained.md),
[DataDome](docs/datadome-explained.md), [Kasada](docs/kasada-explained.md),
[Akamai Bot Manager](docs/akamai-bot-manager-explained.md),
[PerimeterX](docs/perimeterx-explained.md), [hCaptcha](docs/hcaptcha-explained.md),
[Imperva](docs/imperva-incapsula-explained.md), and
[the rest of the set](docs/guides-detectors-explained.md).
- [crawl4ai stealth and custom browser engines](docs/crawl4ai-stealth-custom-browser.md) - browser_type accepts firefox but there is no executable_path; where the adapter seam is
- [Why headless browsers render different fonts](docs/headless-fonts-differ.md) - the three causes, the per-platform font sets, and why the fix is not installing more fonts
- [How to make Linux and macOS report real Windows fonts](docs/bundled-fonts-cross-platform.md) - one manifest, three font backends convinced not to ask the host, and the four seams still open
- [measureText and TextMetrics as a fingerprinting surface](docs/measuretext-textmetrics-fingerprinting.md) - ten-plus numbers from one call needing no permission prompt, and the two mistakes we made fixing it
- [What privacy.resistFingerprinting really does](docs/resist-fingerprinting.md) - and why this project sets it to false on purpose
- [The ChromeDriver cdc_ variable](docs/cdc-variable-explained.md) - why renaming it is not removing it, and what that generalises to
- [What bot.sannysoft.com actually checks](docs/sannysoft-explained.md) - row by row, and the canvas-in-iframe test nobody reads
- [How CreepJS decides you are lying](docs/creepjs-explained.md) - four detection techniques, and why blocking the probe is itself recorded
- [Firefox preferences that silently do nothing](docs/firefox-prefs-not-applying.md) - five reasons, starting with the one that cost us a real bug
- [What BotD actually detects](docs/botd-explained.md) - twenty detectors, and why most are not about bots at all
- [Why a FingerprintJS visitor ID changes](docs/fingerprintjs-visitor-id.md) - it is a hash of 41 components, so one moving moves all of it
## Related projects
invisible_playwright takes a different angle than the major Firefox-hardening projects but stands on their shoulders:
**The other pieces of this one.** The engine is the middle of three, and the
two around it are how most people reach it:
- **[arkenfox/user.js](https://github.com/arkenfox/user.js)** - the canonical Firefox configuration for privacy/security hardening via prefs. Reading arkenfox is how you understand which `user.js` knobs matter; invisible_playwright goes further by patching the C++ source where prefs alone are insufficient (Canvas noise, WebGL parameter overrides, font whitelisting, WebRTC IP swap, DevTools detection bypass).
- **[LibreWolf](https://librewolf.net)** - a Firefox fork bundled with sensible privacy defaults. Same audience, different distribution model: LibreWolf ships a configured Firefox binary, invisible_playwright ships source patches + a wrapper for automation.
- **[Camoufox](https://github.com/daijro/camoufox)** - the most well-known open-source anti-detect Firefox project. We share design goals on the fingerprint-spoofing side; the implementation approach differs (Camoufox patches a wider surface and ships its own fingerprint database, while invisible_playwright sticks closer to vanilla and drives spoofing from a Bayesian sampler).
- **[invisible_core](https://github.com/feder-cr/invisible_core)** - seed to
fingerprint to preferences, plus proxy and geolocation. This package pins it.
- **[AIHawk](https://github.com/feder-cr/AIHawk)** - this engine as an MCP
server (`uvx aihawk`, for any client that brings its own
model) and, in the same package, an interface with a model included, from
one command. The interface is a client of the server, with no private path
to the browser.
**The open-source neighbours**, and what each one is for.
**On the Firefox side**
- **[Camoufox](https://github.com/daijro/camoufox)** - an anti-detect Firefox that also patches at the C++ level. It covers a wider surface and ships its own fingerprint database; this project derives a fingerprint from a seed with a Bayesian sampler, so one number reproduces one machine. [Full comparison](docs/vs-camoufox.md).
- **[LibreWolf](https://librewolf.net)** - a Firefox fork with privacy defaults. It ships a configured binary for people to browse with; this ships source patches plus an automation wrapper.
- **[arkenfox/user.js](https://github.com/arkenfox/user.js)** - Firefox hardening through preferences. Where a preference is enough, use it; this project patches C++ where one is not.
**On the Chromium side**
- **[Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright)** - a patched Playwright fork, so the stealth work lands in the driver rather than in the browser binary. [Full comparison](docs/vs-patchright.md).
- **[nodriver](https://github.com/ultrafunkamsterdam/nodriver)** - the successor to `undetected-chromedriver`, driving Chrome over CDP directly and removing the WebDriver-flavoured tells. [Full comparison](docs/vs-nodriver.md).
- **[playwright-stealth](https://github.com/Mattwmaster58/playwright_stealth)** - an init-script patch applied before the page loads. Its own maintainer calls it a proof-of-concept; [full comparison](docs/vs-playwright-stealth.md).
- **[puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra)** - the original of this init-script lineage, still widely recommended. Its repository's last substantive commit is from mid-2024; [what that means in practice](docs/puppeteer-extra-stealth-unmaintained.md).
- **[selenium-stealth](https://github.com/diprajpatra/selenium-stealth)** - the same approach on Selenium/CDP. Its repository's last commit is from December 2021; [what that means in practice](docs/selenium-stealth-unmaintained.md).
- **[pyppeteer](https://github.com/pyppeteer/pyppeteer)** - the unofficial Python port of Puppeteer. Its own README says it's unmaintained and points to `playwright-python` instead; [what that recommendation is actually about](docs/pyppeteer-unmaintained-playwright.md).
- **[rebrowser-patches](https://github.com/rebrowser/rebrowser-patches)** - fixes the `Runtime.enable` CDP leak on Chromium, independently converging on close to the same fix Patchright uses. [Full comparison](docs/vs-rebrowser-patches.md).
- **[fingerprint-suite](https://github.com/apify/fingerprint-suite)** - generates a coherent fingerprint with a Bayesian network, close to this project's own generation approach, then injects it into a Playwright or Puppeteer page on either Chromium or Firefox. [Full comparison](docs/vs-fingerprint-suite.md).
- **[playwright-with-fingerprints](https://github.com/bablosoft/playwright-with-fingerprints)** - injects fingerprint values sourced from a remote paid service, Windows-only, pinned to a specific Chromium build. [Full comparison](docs/vs-playwright-with-fingerprints.md).
Which of these fits depends on the layer your problem is at, and on whether you need Firefox or Chromium. [Three ways to make Playwright undetected](docs/playwright-stealth-levels.md) works through what each layer can and cannot reach, including what this one costs.
If you are picking between engines rather than tools, note that a large share of AI agent frameworks drive Chromium over CDP, which decides the question for you: [AI browser agents and stealth](docs/ai-browser-agents-stealth.md).
---
## License
MIT - see [LICENSE](LICENSE). The patched Firefox binary is distributed under the MPL-2.0 (Firefox upstream license). The C++ patches against mozilla-central that produce that binary are at [feder-cr/invisible_firefox](https://github.com/feder-cr/invisible_firefox).
MIT - see [LICENSE](https://github.com/feder-cr/invisible_playwright/blob/main/LICENSE). The patched Firefox binary is distributed under the MPL-2.0 (Firefox upstream license). The C++ patches against mozilla-central that produce that binary are at [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch).
---
## Disclaimer
This project is for educational purposes only. It is provided as-is, with no warranties. I take no responsibility for how it is used. Use it at your own risk and in compliance with the laws of your jurisdiction.
---
<p align="center">
Built by <a href="https://it.linkedin.com/in/federico-elia-5199951b6">Federico Elia</a>
&nbsp;<a href="https://it.linkedin.com/in/federico-elia-5199951b6"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/linkedin.svg" alt="LinkedIn"></a>
</p>
<p align="center">
<a href="https://github.com/feder-cr/invisible_playwright/actions/workflows/tests.yml"><img src="https://github.com/feder-cr/invisible_playwright/actions/workflows/tests.yml/badge.svg" alt="tests"></a>
<a href="https://github.com/feder-cr/invisible_playwright/blob/main/LICENSE"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/license.svg" alt="License: MIT"></a>
<a href="https://www.python.org/downloads/"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/python.svg" alt="Python 3.11+"></a>
<a href="https://github.com/feder-cr/firefox_antidetect_patch/releases"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/firefox.svg" alt="Firefox 151.0"></a>
<img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/badges/docs/badges/launches.svg" alt="browser launches">
<a href="https://github.com/feder-cr/invisible_playwright/stargazers"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/badges/docs/badges/stars.svg" alt="GitHub stars"></a>
</p>
+22 -29
View File
@@ -1,8 +1,12 @@
# Security Policy
## Disclaimer
This is an educational project. It is provided as-is, with no warranties. The maintainers take no responsibility for how it is used. Use it at your own risk and in compliance with the laws of your jurisdiction.
## Supported versions
Only the latest release on `main` receives security fixes.
Only the latest release on `main` receives fixes.
| Version | Supported |
|---------|-----------|
@@ -11,44 +15,33 @@ Only the latest release on `main` receives security fixes.
## Reporting a vulnerability
**Please do not report security issues via public GitHub issues, discussions, or pull requests.**
Do not report security issues via public GitHub issues, discussions, or pull requests.
Use one of the following private channels:
Send a report to `federico.elia.majo@gmail.com` with subject prefix `[security][invisible_playwright]`.
1. **GitHub Private Vulnerability Reporting** (preferred): open an advisory at https://github.com/feder-cr/invisible_playwright/security/advisories/new
2. **Email**: `federico.elia.majo@gmail.com` with subject prefix `[security][invisible_playwright]`
Include:
Please include:
- A clear description of the issue and impact
- Steps to reproduce (minimal repro preferred)
- The version of `invisible_playwright` and OS where it was observed
- Whether you have a suggested fix
## What to expect
- Acknowledgement of your report within **7 days**
- An initial assessment and tracking issue (private) within **14 days**
- Coordinated disclosure: a fix and public advisory are released together; reporters are credited unless they prefer to remain anonymous
- What the issue is and what it affects
- Steps to reproduce
- Version of `invisible_playwright` and OS
- Fix suggestion if you have one
## Scope
In scope:
- The Python wrapper `invisible_playwright` (this repo)
- The binary download/verification flow (SHA256 pinning, fetch endpoints)
- The Python wrapper (this repo)
- The binary download and verification flow
- The CLI
Out of scope here (report to the relevant project):
Out of scope:
- Vulnerabilities in the patched Firefox C++ source — open a private report at [feder-cr/invisible_firefox](https://github.com/feder-cr/invisible_firefox/security/advisories/new)
- Vulnerabilities in upstream Firefox / mozilla-central — report to Mozilla per https://www.mozilla.org/security/
- Vulnerabilities in third-party dependencies (`playwright`, `requests`, etc.) — report to those projects directly
- Vulnerabilities in the patched Firefox source - report to [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch/security/advisories/new)
- Upstream Firefox / mozilla-central - report to Mozilla directly
- Third-party dependencies - report to those projects
## Out of scope
Not security issues:
- Reports that the browser is detected by a specific anti-bot service — open a regular GitHub issue, this is a product-quality concern, not a security one
- Social engineering of maintainers
- Denial of service requiring physical access or local privileged access
Thank you for helping keep the project and its users safe.
- The browser being detected by an anti-bot service - open a regular issue
- Social engineering
- DoS requiring physical or local privileged access
+15
View File
@@ -0,0 +1,15 @@
---
title: "docs/ source folder"
description: "This folder is the Jekyll source for the published documentation site. Read it there, with search and proper navigation, not as raw files."
nav_exclude: true
search_exclude: true
sitemap: false
---
# docs/ source folder
This folder is the source the wiki is rendered from. Read it with search and
navigation in **[the wiki](https://github.com/feder-cr/invisible_playwright/wiki)**.
`index.md` is what the site root actually serves. This file exists so the folder
still shows something sensible when browsed directly on github.com.
+281
View File
@@ -0,0 +1,281 @@
---
title: "about:webrtc: read your real ICE candidates"
description: "Read your live ICE candidates in Firefox's built-in about:webrtc: tell a real LAN-IP leak from a masked .local host and a proxy-egress srflx line."
parent: "Network, Proxy and WebRTC"
grand_parent: "Guides"
nav_order: 17
---
# about:webrtc: read your real ICE candidates
A public leak site gives you a verdict and a couple of IP strings. Firefox ships a
page that gives you the raw material behind that verdict: every
[ICE candidate](https://datatracker.ietf.org/doc/html/rfc8445) the
browser gathered, its type, its address, its priority, and the timeline of when each
one arrived. It is `about:webrtc`, it is built in, it needs no extension, and it is
the first place to look after any change to a WebRTC or proxy setting.
This page is how to read it, what the three interesting candidate states look like
line by line, how to pair it with `about:config`, and how to reproduce the same read
from a Playwright script so a bad candidate fails a test instead of a real session.
## Why a leak site is not enough
A leak site aggregates. It runs the gathering for you, picks the addresses it thinks
matter, and prints something like "Local IP" and "Public IP" with a green or red
badge. That summary hides exactly the distinctions you need while debugging, because
three very different underlying states can round to the same badge:
- A host candidate carrying a raw `192.168.x.x` LAN address. This is a real leak, and
it is *worse* than a stock browser, which hides that address by default.
- A host candidate carrying an obfuscated `<uuid>.local` name. This is the correct
state, and it is what a stock Firefox produces.
- A server-reflexive (`srflx`) candidate whose address is your proxy egress, with a
plausible NAT port and a priority in the range a real candidate uses.
A "No Leak" badge can be produced by the second and third states working correctly,
and it can also be produced by WebRTC being suppressed to the point that nothing is
gathered at all, which is [its own detectable signal](webrtc-leak-proxy.md). The
badge does not tell you which. The candidate list does.
## Opening about:webrtc and reading a session
Type `about:webrtc` into the address bar. The page is empty until a peer connection
exists, so open a page that creates one first, then come back to it. Each connection
gets a collapsible block; expand it and the two things worth reading are:
- **ICE Stats / the candidate table.** Every gathered candidate with its type
(`host`, `srflx`, `relay`), its address, its port, its protocol and its priority.
- **The ICE gathering log / timeline.** Timestamped lines showing when gathering
started, when each candidate was added, and when it finished. A candidate that
arrives suspiciously early (time zero, no round trip) is as much a tell as a wrong
address, and the timeline is the only view that shows arrival time.
You are reading for three things: that a host candidate exists and is masked, that a
server-reflexive candidate exists and points at the exit you expect, and that the
timeline looks like a browser talking to a
[STUN](https://datatracker.ietf.org/doc/html/rfc8489) server rather than fabricating an
answer instantly.
## The three states a leak site collapses into one
Three candidate states, plus a suppressed section that gathers nothing, all round to
the same one-word leak-site badge. The table below is how each reads in the candidate
list; the lines underneath show the exact shape of each one.
| State | Candidate line | Leak-site badge | Verdict |
|---|---|---|---|
| Leak | `typ host` with a raw `192.168.x.x` LAN address | "Local IP" / red warning | Real leak, worse than stock |
| Correct host | `typ host` with a `<uuid>.local` name | "No Leak", local IP shown as "-" | Shipped, correct |
| Correct srflx | `typ srflx` with your proxy egress address | contributes to "No Leak" | Correct exit |
| Suppressed | nothing gathered at all | "No Leak" | Detectable tell, a FAIL |
Here is what each state looks like as a candidate line, so you can recognise it on
sight in the table.
**Leak (worst case).** The host candidate carries the machine's real LAN address:
```text
candidate:0 1 UDP 2122252543 192.168.1.24 51894 typ host
```
If you see a private `192.168.x.x`, `10.x.x.x` or `172.16-31.x.x` address on a `typ
host` line, WebRTC is handing out your internal network address. A stock browser does
not do this; it masks it. Seeing it means a masking setting is off, and you are now
more identifiable than a default install.
**Correct host.** The same candidate with the address replaced by a per-session
[mDNS](https://datatracker.ietf.org/doc/html/rfc6762) name:
```text
candidate:0 1 UDP 2122252543 3f1c9a7e-....local 51894 typ host
```
The `.local` name is what a stock Firefox emits by default, and a leak site reads it
as "No Leak" with the local IP shown as "-". This is the shipped state here: the
patched engine keeps host-address obfuscation on, so the host line is a `.local` name
and never a raw LAN IP.
**Correct srflx.** The server-reflexive candidate carries your public exit and a NAT
port:
```text
candidate:1 1 UDP 1686052863 203.0.113.45 49731 typ srflx raddr 0.0.0.0 rport 0
```
Behind a proxy, that address must be the proxy egress, not your real public IP and not
a private address. The port should sit in the ephemeral NAT range and the priority
should look like a real `srflx` priority rather than a round, hand-picked number.
Getting the [priority and foundation right, not just the address](webrtc-ice-candidate-spoofing.md),
is what separates a candidate that survives inspection from one that only survives a
leak badge.
## Pairing it with about:config
`about:webrtc` shows you the result; `about:config` shows you the switches that
produced it. Open a second tab on `about:config` and filter on two prefixes.
- **`media.peerconnection.*`** are the standard Firefox WebRTC prefs. The one that
governs the host state above is `media.peerconnection.ice.obfuscate_host_addresses`:
`true` gives you the `.local` name, `false` gives you the raw LAN IP. If
`about:webrtc` shows a `192.168.x.x` host, this is the first pref to check.
- **`zoom.stealth.webrtc.*`** is where the product exposes its own WebRTC controls,
including the egress the synthetic `srflx` is built from and the IPv6 host
suppression. These are set per session by the launcher from the proxy you pass, so
in normal use you read them here to confirm the wrapper resolved the right exit,
rather than editing them by hand.
The workflow is: change one pref, reload the page that builds the connection, refresh
`about:webrtc`, and read the candidate that changed. One switch at a time keeps cause
and effect legible, which is the same discipline that makes a bisect a bisect.
## Driving the same session from Playwright
The manual read is for exploring. Once you know which candidate line matters, you want
it as an assertion that runs every session, and `InvisiblePlaywright` returns a real
Playwright `Browser`, so the same code that opens `about:webrtc` can also gather
candidates programmatically.
First, opening the built-in page under a seeded, proxied session so you can eyeball it:
```python
from invisible_playwright import InvisiblePlaywright
PROXY = {"server": "socks5://gate.example.com:1080", "username": "u", "password": "p"}
with InvisiblePlaywright(seed=42, proxy=PROXY) as browser:
page = browser.new_page()
# Gathering only starts after setLocalDescription, not at construction,
# so about:webrtc has nothing to show until the offer is set.
page.goto("https://example.com")
page.evaluate("""
async () => {
const pc = new RTCPeerConnection();
pc.createDataChannel('x');
await pc.setLocalDescription(await pc.createOffer());
}
""")
inspector = browser.new_page()
inspector.goto("about:webrtc")
print("Expand the session to read candidates + the gathering timeline")
inspector.wait_for_timeout(3000)
```
Then the same read as data, so a wrong candidate fails a check instead of a session.
This gathers the candidate strings the page itself would list and prints them:
```python
from invisible_playwright import InvisiblePlaywright
PROXY = {"server": "socks5://gate.example.com:1080", "username": "u", "password": "p"}
GATHER = """
async () => {
const pc = new RTCPeerConnection();
pc.createDataChannel("probe");
const lines = [];
pc.onicecandidate = (e) => { if (e.candidate) lines.push(e.candidate.candidate); };
await pc.setLocalDescription(await pc.createOffer());
await new Promise((r) => setTimeout(r, 3000));
pc.close();
return lines;
}
"""
with InvisiblePlaywright(seed=42, proxy=PROXY) as browser:
page = browser.new_page()
page.goto("https://example.com")
candidates = page.evaluate(GATHER)
host = [c for c in candidates if "typ host" in c]
srflx = [c for c in candidates if "typ srflx" in c]
for c in candidates:
print(c)
# Assert the positive shape, not the absence of a leak.
assert host and all(".local" in c for c in host), "host must be an mDNS .local name"
assert srflx, "a proxied session must still produce a server-reflexive candidate"
assert not any(
p in c for c in host for p in ("192.168.", "10.", "172.16.")
), "no raw LAN address on a host line"
```
Because the identity is seed-derived, `seed=42` gives the same session every run, so a
candidate that fails this on one run fails it on the next, and you can [replay the
exact browser that produced it](quickstart.md) instead of chasing a random draw.
## A before-and-after you can measure
The distinction is not theoretical. With host obfuscation off, a leak page reports the
host candidate as the real LAN address and shows the red "WebRTC exposes your Local IP"
warning; the same page on the shipped baseline reports "No Leak" with the local IP as
"-", because the host line is now a `<uuid>.local` name and the only routable address
on the page is the proxy egress on the `srflx` line. Same session, one pref, and the
difference is the whole point of reading candidates instead of badges.
Assert the presence of the right candidate, not the absence of a wrong one. A WebRTC
section that comes back empty passes every "no leak" test and is itself a signal, which
is the same false pass that a [verdict-based test hides and a field comparison
catches](how-to-test-bot-detection.md).
## Conclusion
`about:webrtc` turns WebRTC from a badge into a list you can read. It shows the host
candidate so you can confirm it is a `.local` name and not a raw LAN IP, the
server-reflexive candidate so you can confirm it is your proxy egress with a plausible
port and priority, and the gathering timeline so you can confirm the answers arrived
the way a browser produces them rather than instantly. Pair it with `about:config` to
see the switches behind each line, drive the same read from Playwright to make it a
test, and change one pref at a time so every difference has a cause.
## Short answers to the questions that lead here
**What is about:webrtc for?** It is Firefox's built-in inspector for live peer
connections: the full ICE candidate list, each candidate's type and address and
priority, and the gathering timeline. It shows the detail a leak site summarises away.
**Why is my host candidate a 192.168 address?** Host-address obfuscation is off. A
stock Firefox emits a `<uuid>.local` name instead, and a raw LAN address is a real
leak. Check `media.peerconnection.ice.obfuscate_host_addresses` in `about:config`.
**What should the srflx candidate show behind a proxy?** Your proxy egress address,
with a NAT-range port and a realistic priority. Not your real public IP, not a private
address, and not a suspiciously round priority value.
**A leak site says "No Leak" but I still get flagged. Why?** "No Leak" can mean the
candidates are correct, or it can mean WebRTC was suppressed and gathered nothing,
which is itself detectable. The candidate list tells you which; the badge does not.
**Can I read about:webrtc from Playwright?** You can navigate to it with `page.goto`,
and you can gather the same candidate strings programmatically with `page.evaluate`
over a real [`RTCPeerConnection`](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection),
which turns the manual read into an assertion.
**Why does an empty WebRTC section count as a failure?** Because a real browser behind
NAT always emits at least a host and a server-reflexive candidate. Emitting nothing is
not neutral; it is a shape no ordinary browser has, so assert presence, not absence.
## Sources
- Mozilla's Firefox Source Docs, [Debugging WebRTC Calls](https://firefox-source-docs.mozilla.org/contributing/debugging/debugging_webrtc_calls.html),
retrieved 2026-08-28, for `about:webrtc` itself, read directly rather than through a
third-party summary.
- Mozilla Support, [Configuration Editor for Firefox](https://support.mozilla.org/en-US/kb/about-config-editor-firefox),
retrieved 2026-08-28, for `about:config`, read the same way.
- This project's WebRTC release gates and their per-event diagnostics, including the
incident where a negative-only check passed a fully blocked WebRTC section behind a
proxy, and the host-obfuscation fix that moved the host line from a raw LAN IP to a
`.local` name.
**See also:** [what actually leaks through a proxy](webrtc-leak-proxy.md),
[the srflx fields beyond the address](webrtc-ice-candidate-spoofing.md), and
[everything that has to agree with your exit IP](timezone-proxy-mismatch.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. Every candidate line in
this page is one I have read off about:webrtc while chasing a leak that a badge missed.*
@@ -0,0 +1,250 @@
---
title: "Do accelerometer and gyroscope APIs leak on desktop?"
description: "Desktop Firefox doesn't leak sensor data. Why a spoofed desktop must never invent motion events, and how to verify the sensor surface matches your platform claim."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 32
---
# Do accelerometer and gyroscope APIs leak on desktop?
Short version: on a real desktop Firefox they do not leak, because there is
nothing to leak. The generic Sensor APIs that expose an accelerometer or a
gyroscope reading are a Chromium feature, and the older DeviceOrientation and
DeviceMotion events stay silent on a machine with no motion hardware.
So the interesting question is not "how do I hide my sensors" - it is "am I sure my
automated desktop is not inventing motion data a real desktop would never
produce". A desktop that emits accelerometer or gyroscope readings is a
mobile-or-fake tell, and it contradicts the platform string sitting right next
to it.
This page walks through what a genuine desktop exposes, why faking motion is a
consistency failure rather than a clever disguise, what the patched build
reports, and how to check the surface yourself.
## What desktop Firefox actually exposes
Desktop Firefox exposes almost nothing on this surface: the generic Sensor
API is absent entirely, and the older DeviceMotion/DeviceOrientation events
exist as properties but never fire without motion hardware. Those are the two
separate families of device-motion API, and they behave very differently
across engines.
The **generic Sensor APIs** - [`Accelerometer`](https://developer.mozilla.org/en-US/docs/Web/API/Accelerometer),
[`Gyroscope`](https://developer.mozilla.org/en-US/docs/Web/API/Gyroscope),
`LinearAccelerationSensor`, `AbsoluteOrientationSensor` and the rest of that
family - are implemented in Chromium and, at time of writing, not in Firefox at
all. On a real Firefox, `typeof Accelerometer` is `"undefined"`. A page that
tries `new Gyroscope()` gets a `ReferenceError`. This is not a stealth trick;
it is simply what the engine ships.
The **[DeviceOrientation and DeviceMotion](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent) events** - `window.ondeviceorientation`,
`window.ondevicemotion` - do exist as properties in Firefox, because they are
part of an older, more widely shipped spec. But existing as a property is not
the same as firing. On a desktop with no accelerometer and no gyroscope, you can
add a `devicemotion` listener and it will never be called. The event surface is
present; the data behind it is silent.
So a truthful desktop Firefox answers the sensor question three ways at once:
the generic Sensor constructors are absent, the motion event handlers exist but
never fire, and `DeviceMotionEvent.requestPermission` (the iOS gesture gate) is
also absent because it is a mobile Safari construct. All three of those agree
with each other and with a `navigator.platform` of `Win32`.
## Why a desktop that emits motion is a tell
The failure mode here is not "a detector reads your accelerometer". It is a
detector noticing that your accelerometer exists at all when your platform says
it should not.
Detection on this surface is a cross-check, the same shape as every other
consistency check. A page reads `navigator.platform`, `navigator.userAgent` and
`navigator.oscpu`, decides you are claiming a Windows desktop, and then asks a
question a Windows desktop has a known answer to: does `window.DeviceMotionEvent`
ever produce a non-null reading? A desktop says no.
If yours says yes - if some
well-meaning spoof layer decided to synthesize plausible-looking motion so the
sensor "would not look dead" - you have just told the page you are a phone
wearing a desktop user agent, which is a contradiction no real device produces.
This is why the honest move is silence, not simulation. The instinct to fill
every surface with realistic data is exactly wrong here: on a desktop the
realistic data is no data. The values that have to agree are your platform, your
oscpu, your touch surface and your motion surface, and they agree by all
pointing at the same kind of machine.
If you want the platform side of that
in depth, see
[keeping navigator.platform and oscpu consistent](navigator-platform-oscpu-consistency.md);
the closely related touch side, where a desktop must report zero touch points,
is in [maxTouchPoints and pointer type](navigator-maxtouchpoints-pointer.md).
The general rule, which shows up on every fingerprint surface: a suppressed or
absent signal is not automatically a red flag. It is a red flag only when it
disagrees with what you claim to be. A desktop with no motion sensor is
correct. A mobile user agent with no motion sensor is the tell.
## What the patched build reports
invisible_playwright is a real Firefox patched at the C++ level and driven by
stock Playwright. On the sensor surface its job is the easy kind: report exactly
what a real Windows Firefox reports, which is silence.
The generic Sensor
constructors stay absent, the DeviceMotion and DeviceOrientation handlers exist
but never fire, and nothing invents a reading to fill the gap. Because the whole
identity is seed-derived, the platform string, the oscpu string, the touch
surface and this motion surface all come from one coherent machine rather than
from four independent guesses, so they agree by construction.
That is the point of the demonstration below. There is nothing to configure and
no sensor flag to set - the correct desktop behaviour is the default, and the
launch is the ordinary two lines.
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
report = page.evaluate("""async () => {
const motionFired = [];
window.addEventListener('devicemotion', e => motionFired.push(e), { once: true });
await new Promise(r => setTimeout(r, 300));
return {
platform: navigator.platform,
hasAccelerometerCtor: typeof Accelerometer !== 'undefined',
hasGyroscopeCtor: typeof Gyroscope !== 'undefined',
hasDeviceMotionEvent: 'DeviceMotionEvent' in window,
hasRequestPermission:
typeof (window.DeviceMotionEvent || {}).requestPermission === 'function',
motionEventsSeen: motionFired.length,
};
}""")
print(report)
# platform: 'Win32'
# hasAccelerometerCtor: False <- generic Sensor API is Chromium-only
# hasGyroscopeCtor: False
# hasDeviceMotionEvent: True <- handler exists...
# hasRequestPermission: False <- iOS-only, correctly absent
# motionEventsSeen: 0 <- ...but never fires: no motion hardware
```
Pass the same `seed` and the surrounding identity comes back identical every
run, so if you are bisecting a block you are changing one thing at a time rather
than chasing a fresh random machine on each attempt.
## Verify it yourself against a stock browser
Do not take the output above on faith - the useful test is a diff, not a
verdict. Open the same probe in a stock desktop Firefox on the same machine and
compare field by field. The two should agree on every line: same absent
constructors, same present-but-silent event handlers, same zero motion events.
Anything that differs between the automated browser and the stock one, other
than the exit address, is a candidate worth explaining.
Then extend the same probe to the neighbouring surfaces that have to tell the
same story - platform, oscpu, `maxTouchPoints`, screen. A detector reads them
together, so you should too.
The method for turning that comparison into
something trustworthy, including why one green run is not a pass and why an empty
result is a failure rather than a clean sheet, is in
[how to test bot detection without a false pass](how-to-test-bot-detection.md).
For the wider point that a missing signal counts as a signal, the
[screen-size and headless tells](screen-size-headless-tells.md) page covers the
same idea on a different surface.
## What this fixes and what it does not
Matching the sensor surface makes invisible_playwright look like a genuine
desktop Firefox on one more axis, and that is real: the fingerprint, the TLS
handshake and the driver layer read as an ordinary Firefox, which is why a
consistent identity passes most in-page detection. But the sensor surface is a
narrow win, and it is worth being blunt about the boundary.
Reporting the correct silence does nothing for the parts of a session that are
not browser properties at all. It does not clean your **IP reputation** - a
perfectly consistent desktop on a datacenter or already-flagged address still
loses on the address.
It does not manage **per-account quotas or rate limits** -
those are counted server-side regardless of how real the browser looks. And it
does not shape your **behaviour or timing** - a pointer that teleports, a form
filled in eighty milliseconds, or an agent that pauses in a shape that looks
like model latency will be flagged no matter how honest the sensor readings are.
Those are yours to supply: a clean residential exit and human pacing. If your
fingerprint is clean and you are still blocked, that separation is the whole
subject of [why you can be blocked with a clean fingerprint](why-blocked-with-a-clean-fingerprint.md).
So the honest framing: device-sensor consistency is one correct answer among
many, it costs you nothing here because the default is already right, and it is
necessary but nowhere near sufficient on its own.
## Conclusion
Accelerometer and gyroscope do not leak on desktop Firefox because desktop
Firefox has nothing to report: the generic Sensor APIs are Chromium-only, and
the motion events exist as handlers that never fire. The mistake to avoid is
over-correction - synthesizing motion data so the surface "does not look dead"
turns a correct silence into a contradiction with your platform string.
The patched build reports the same silence a real Windows Firefox does, keeps it
coherent with platform, oscpu and the touch surface because they all derive from
one seed, and leaves the parts it cannot touch - address, quotas, behaviour -
clearly labelled as yours.
## Short answers to the questions that lead here
**Does desktop Firefox expose accelerometer or gyroscope data?** No. The generic
Sensor API constructors are Chromium-only and absent in Firefox, and the older
DeviceMotion and DeviceOrientation events stay silent with no motion hardware.
**Is a silent sensor surface a red flag?** Only if it disagrees with what you
claim. A desktop with no motion sensor is correct; a mobile user agent with no
motion sensor is the tell.
**Should I fake motion events to look more real on a desktop?** No. That is the
one thing that breaks it - a desktop emitting accelerometer or gyroscope
readings contradicts its own platform string.
**Do the DeviceMotion event handlers exist at all in Firefox?** Yes, the
`ondevicemotion` and `ondeviceorientation` properties are present, but they never
fire without hardware, so a listener is simply never called.
**Does invisible_playwright need a sensor flag set for this?** No. Reporting the
correct desktop silence is the default; there is nothing to configure.
**Does getting the sensor surface right mean I will not be detected?** No. It
helps with fingerprint consistency, not with IP reputation, account quotas, rate
limits, or behaviour and timing, which you still have to supply.
## Sources
- W3C, [Generic Sensor API](https://www.w3.org/TR/generic-sensor/), retrieved
2026-08-28, for the base framework that `Accelerometer`, `Gyroscope` and the
rest of that family extend as concrete sensor interfaces, an engine feature
present in Chromium and not in Firefox, read from each engine's own
behaviour rather than from a summary.
- W3C, [Device Orientation and Motion](https://www.w3.org/TR/orientation-event/),
retrieved 2026-08-28, for the DeviceOrientation and DeviceMotion event model
and its attribute definitions.
- This project's release gates, which compare the patched build's surfaces field
by field against a stock desktop Firefox on the same machine.
**See also:** [navigator.platform and oscpu consistency](navigator-platform-oscpu-consistency.md),
[maxTouchPoints and pointer type](navigator-maxtouchpoints-pointer.md), and
[why you can be blocked with a clean fingerprint](why-blocked-with-a-clean-fingerprint.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The sensor surface
is the easy kind of honest: the correct answer is to report nothing, and the only
way to fail is to invent data a real desktop would never send.*
+223
View File
@@ -0,0 +1,223 @@
---
title: "Accept-Language header vs navigator.languages"
description: "Accept-Language and navigator.languages must agree: one Firefox pref feeds both, so an injection-only spoof that moves one and not the other is a clear tell."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 21
---
# Accept-Language header vs navigator.languages
A real browser reports its preferred languages in two completely separate places. It
sends an `Accept-Language` header on every HTTP request, decided by the network stack
before any page runs. And it exposes `navigator.language` and `navigator.languages` to
JavaScript, read from the page after it loads. Two surfaces, two code paths, and a
detector that reads both expects them to tell the same story.
They do, in a stock browser, because both come from one setting. The interesting failure
is what happens when a stealth layer touches only one of them.
## One preference feeds both surfaces
In Firefox the language preference lives in a single about:config string,
`intl.accept_languages`, with a value like `en-US,en`. That one string is the source for
two different consumers:
- The **network stack** formats it into the `Accept-Language` request header, adding the
quality values (`en-US,en;q=0.5`) a browser normally attaches.
- The **JavaScript engine** parses the same string into the `navigator.languages` array
and its first element into `navigator.language`.
Because both read the same preference, they cannot disagree. Change the preference and
the header changes and the array changes, together, in the same load. There is no way,
inside a genuine browser, to make the header say one thing and the property say another,
because there is only one value and both surfaces quote it.
That single-source property is worth stating plainly, because it is exactly the invariant
a naive spoof breaks.
## Why an injection-only spoof splits the two
A large class of stealth tooling works by running JavaScript in the page before the
site's own code: it redefines `navigator.languages` with `Object.defineProperty`, or it
patches the getter. That reaches exactly one of the two surfaces. It can make
`navigator.languages` return `["en-US", "en"]` to any script that asks.
It never touches the header. The `Accept-Language` header was formatted and sent by the
network layer, which is compiled C++ and does not read the JavaScript you injected. So
the request that fetched the page carried whatever the underlying browser's real
preference was, while the property in the page now claims something else.
The split lines up field by field like this:
| Surface | Real browser | Injection-only spoof |
|---|---|---|
| `Accept-Language` header | formatted from the language preference | unchanged real value (sent by the network layer) |
| `navigator.languages` | parsed from the same preference | overridden in the page |
| Do the two agree? | yes, one shared source | no, they diverge |
A detector does not need to be clever to catch this. It reads the `Accept-Language` it
received on the request, reads `navigator.languages` from a script it served, and
compares the two strings. When the header says one language set and the property says
another, that contradiction is the tell. It is the same shape of mistake as
[running two spoofers that answer the same question differently](playwright-detected-as-bot.md):
one value moves, its twin does not, and the gap between them is louder than either value
alone.
The same reasoning extends to the request headers a browser sends about itself, which is
why [the Sec-Fetch and client-hint headers](client-hints-sec-fetch.md) have to line up
with the rest of the identity for the same structural reason: a header the page cannot
see is a header an injection cannot fix.
## How this project keeps header and property in agreement
Because the fingerprint is applied at the browser level, not in the page, the
language is set through the same native preference a real profile uses, so both surfaces
read from it. There is nothing to inject into the page and nothing to keep in sync: the
header and the array are the same value formatted twice, by the browser, the way they
always are.
The code that drives it is stock Playwright. Switching a normal Playwright script over is
the launch line and nothing else:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
langs = page.evaluate("navigator.languages")
print("navigator.languages =", langs)
```
The `browser` returned is a real Playwright `Browser`, so every method you already use
works unchanged. The seed makes the whole identity reproducible: the same seed yields the
same language set, the same GPU, the same screen, run after run, which is what lets a
failure be replayed instead of guessed at.
## Prove they match, do not assume it
The point of this page is a check you can run, not a claim to trust. Capture the
`Accept-Language` header the browser actually sent, read `navigator.languages` from the
loaded page, and compare the two directly. Use any endpoint that echoes request headers
back; the snippet below reads the header off the outgoing request instead, so it needs no
particular server:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
sent_header = {}
def capture(request):
if "accept-language" in request.headers:
sent_header["value"] = request.headers["accept-language"]
page.on("request", capture)
page.goto("https://example.com")
header = sent_header.get("value", "")
array = page.evaluate("navigator.languages")
print("Accept-Language header :", header)
print("navigator.languages :", array)
# The header's primary tag and the array's first entry must be the same language.
header_primary = header.split(",")[0].split(";")[0].strip()
assert header_primary == array[0], (header_primary, array[0])
print("header and property agree")
```
Follow the method from
[how to test whether your browser is detected](how-to-test-bot-detection.md): assert the
values are present and agree, not asserting nothing looks wrong. A property that
comes back empty, or a header your capture never saw, is a failure and not a pass. Run it
against a stock browser on the same machine too, and the header and array should match
there in exactly the same way.
## Match the language to the exit, the same way you match the timezone
Header and property agreeing with each other is necessary but not sufficient. Both of
them also have to agree with where the request appears to come from.
A session whose exit address resolves to one country while the browser advertises the
language of another is a contradiction of the same family as
[a timezone that does not match the proxy](timezone-proxy-mismatch.md). The two values
are individually plausible and jointly wrong, which is precisely what field-by-field
comparison catches and a single-value check does not. If you
[rotate through several exits](how-to-rotate-proxies-playwright.md), the language set is
one more field that should track the exit rather than staying pinned to whatever the host
machine happens to prefer. Pass the proxy at launch and let the identity be built to fit
it, rather than setting the language by hand and hoping it lines up:
```python
from invisible_playwright import InvisiblePlaywright
proxy = {"server": "socks5://gate.example.com:1080", "username": "u", "password": "p"}
with InvisiblePlaywright(seed=42, proxy=proxy) as browser:
page = browser.new_page()
page.goto("https://example.com")
print("languages =", page.evaluate("navigator.languages"))
```
## Conclusion
The `Accept-Language` header and `navigator.languages` are read from one browser
preference, so in a genuine browser they cannot diverge. That is the whole reason the
pair is worth checking: a stealth layer that lives in the page can move the property and
never the header, and the gap it opens is a cleaner signal than any single value. Set the
language where the browser itself reads it, keep it consistent with the exit, and verify
by comparison rather than assumption.
## Short answers to the questions that lead here
**Do Accept-Language and navigator.languages have to match?** Yes. In a real browser both
are formatted from one preference, so a mismatch is a contradiction that only a spoof
produces.
**Why does setting navigator.languages in JavaScript not work?** Because it reaches only
the page-facing property. The `Accept-Language` header was already sent by the network
layer, which does not read your injected script, so the header still carries the old
value.
**How do I set the browser language in Playwright?** Let the fingerprint layer set the
native preference so both surfaces read from it, rather than overriding the property in
the page. Here the language comes with the seeded identity.
**Should the language match the proxy country?** It should be consistent with the exit,
the same way the timezone has to be. A language from one continent on an exit in another
is a mismatch a detector can pair up.
**How do I check the two agree?** Capture the `Accept-Language` header the browser sent,
read `navigator.languages` from the loaded page, and compare the primary language tag of
each. Do it against a stock browser as well.
**Does the q-value in the header matter?** It should be present. A real browser attaches
quality values like `;q=0.5`; a header that is a bare comma list with none is itself
slightly unusual.
## Sources
- Firefox's `intl.accept_languages` preference, which is the single value both the request
header and the `navigator.languages` array are formatted from.
- [MDN: `Navigator.languages`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages)
and [MDN: `navigator.language`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language),
the page-facing properties an injection redefines.
- [MDN: the `Accept-Language` request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Accept-Language),
including the quality (`q`) values a browser attaches, sent by the network stack before any page script runs.
- This project's own realness gates, which compare request headers against in-page
properties field by field rather than reading either in isolation.
**See also:** [when the timezone does not match the proxy](timezone-proxy-mismatch.md),
[when the TLS fingerprint and the user agent disagree](tls-fingerprint-user-agent-mismatch.md),
[the checklist for being detected on one site](playwright-detected-as-bot.md), and
[how to test whether your browser is detected](how-to-test-bot-detection.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The header and the array
come from one preference, which is exactly what an injection-only spoof gets wrong.*
+24
View File
@@ -0,0 +1,24 @@
---
title: "AI agent retry loops trip rate limits, not fingerprints"
description: "Retry and re-plan loops multiply requests into a volume signal; throttling belongs in the agent loop. This page moved to the AIHawk wiki."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 17
---
# AI agent retry loops trip rate limits, not fingerprints
This page moved to the AIHawk wiki, where the agent-experience content now
lives:
**[Agent retry loops trip rate limits, not fingerprints](https://github.com/feder-cr/AIHawk/wiki/agent-retry-loops-rate-limits)**
The one-paragraph version: an agent that retries and re-plans multiplies its
requests, and volume is scored server-side against your address and account.
No browser property changes a request count. Throttle in the loop that
produces the requests.
Related mechanism pages that stay on this wiki:
[why you can be blocked with a clean fingerprint](why-blocked-with-a-clean-fingerprint.md)
and [ASN and IP reputation in bot detection](asn-and-ip-reputation-in-bot-detection.md).
+26
View File
@@ -0,0 +1,26 @@
---
title: "Why AI browser agents have their own timing signal"
description: "An LLM loop emits machine-regular action gaps and instant pointer jumps - a behavioral signal no fingerprint fixes. This page moved to the AIHawk wiki."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 10
---
# Why AI browser agents have their own timing signal
This page moved to the AIHawk wiki, where the agent-experience content now
lives:
**[The timing signal AI agents give off](https://github.com/feder-cr/AIHawk/wiki/ai-agent-timing-signal)**
The short version it still owes you here: a think-act loop pauses for model
latency, and that pause repeats with a regularity no human produces. The
pointer arc between actions is the engine's job, and this engine humanises it;
the step-to-step rhythm is produced by the agent loop, which no fingerprint
work reaches.
The mechanism layer stays on this wiki:
[mouse-dynamics behavioural biometrics](mouse-dynamics-behavioural-biometrics.md),
[keystroke timing detection](keystroke-timing-detection-playwright.md), and
[human-like mouse movement](human-mouse-movement.md).
+279
View File
@@ -0,0 +1,279 @@
---
title: "AI browser agents and stealth: what fits and what does not"
description: "Most AI browser agents drive Chromium over CDP, so a stealth Firefox does not drop in. What each tool exposes, checked from source, and what applies regardless."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 1
---
# AI browser agents and stealth: what fits and what does not
Most AI browser agents cannot run a stealth Firefox, because they speak the Chrome
DevTools Protocol (CDP) and Firefox does not answer it. The few built on Playwright can
select Firefox in principle, but rarely expose a custom binary. And on a server the engine
is usually not what gets the agent blocked in the first place.
If your agent works on your laptop and gets challenge pages on a server, there are two
separate questions and they get answered as one. The first is whether you can swap the
browser underneath. The second is whether swapping it would fix your problem.
For most of these tools the first answer is no, for a reason that is structural rather
than accidental. The second answer is often no as well, and for a different reason.
This page is what each project actually exposes, checked by reading its source, the split
that decides all of it, what applies no matter which engine you run, the signal specific
to agent-driven sessions, and the one route that does accept a different engine.
## The split that decides everything: CDP or Playwright
Browser automation divides into two families and the boundary matters more than any
configuration option.
**Tools that speak the Chrome DevTools Protocol** talk directly to a Chromium-family
browser. CDP is Chromium's own protocol. Firefox does not implement it in the way these
drivers expect, so an `executablePath` pointing at a Firefox build does not produce a
working session: the driver would be speaking a language the browser does not answer.
**Tools built on Playwright** go through an abstraction that already supports
[three engines](https://playwright.dev/docs/browsers) - Chromium, Firefox and WebKit.
Swapping the binary is then a question of whether the tool exposes the launch option,
not of whether the protocol matches.
Almost every AI browser agent is in the first family. That is a reasonable engineering
choice, since CDP gives fine-grained control that agent loops want, and it is also why
"can I use a stealth Firefox with my agent" usually has a short answer.
## What each project actually exposes
Only two of these five projects expose a custom-binary option, and both expect a Chromium
build. The table below is read from each repository on 2026-07-27 and 2026-07-28, with
star counts from the same check.
| Project | Stars | Family | Custom binary | Firefox |
|---|---|---|---|---|
| browser-use | 107k | CDP, Chrome | `executable_path` on `BrowserProfile` | no |
| Stagehand | 24k | CDP, Chromium | `executablePath`, documented | no |
| Skyvern | 23k | CDP | not exposed | no |
| crawl4ai | 75k | Playwright | **no `executable_path`** | `browser_type="firefox"` |
| Maxun | 17k | Playwright | not exposed | not exposed |
Three others that come up in these searches are not Playwright tools at all:
`agent-browser` and `obscura` are written in Rust, and `BrowserOS` has no Playwright
dependency in its manifest. Star count does not tell you what a project drives.
## browser-use
The configuration is real: `executable_path`, `channel`, `user_data_dir`, `proxy`, `args`
and `headless` on `BrowserProfile`. The surrounding code is Chrome executable discovery
and Chrome profile handling, and the channel type is a Chromium channel.
The useful move there is pointing `executable_path` at your **real installed Chrome**
instead of the bundled Chromium, and pointing `user_data_dir` at a profile that has been
used. [The full version is here](browser-use-detection.md).
## Stagehand
Exposes `executablePath` and documents it, which is more than most. The rest of the
codebase is CDP: local CDP discovery, CDP tailing, a CDP client. Chromium references
outnumber Firefox ones by a wide margin, and the Firefox mentions are in an OpenAPI
schema and a client for someone else's API, not in a launch path.
So the option exists and it expects a Chromium build.
## Skyvern
CDP throughout. There is no exposed way to point at a different binary, and the protocol
would not match if there were.
## crawl4ai
The only one of these built on Playwright with Firefox genuinely selectable, through
`browser_type="firefox"`. What is missing is any field naming a binary, so you get
Playwright's managed build. Its own stealth mode applies `playwright-stealth`, which its
documentation notes does not support Firefox, so that combination is largely inert.
[The full version is here](crawl4ai-stealth-custom-browser.md).
## Maxun
Playwright is in the manifest and no executable path is exposed. As a no-code platform
that is a coherent product decision instead of an oversight.
## What applies regardless of the engine
Swapping the browser engine changes none of the tells a server leaks, and those tells
matter more than the binary question because they are true for every tool, CDP or
Playwright. On a server, all of these are true at once and none of them is about
automation:
- **No GPU**, so WebGL reports a software renderer.
[What those strings give away](webgl-renderer-strings.md).
- **A container font set** that does not match the claimed platform.
[Why installing more is not the fix](headless-fonts-differ.md).
- **No audio device**, and no speech voices.
[The seven audio values](audiocontext-fingerprinting.md) and
[the voice list](speech-synthesis-voices.md).
- **A screen with no taskbar** and a default resolution.
[The relationships that must hold](screen-size-headless-tells.md).
- **Codec support** describing a slim build, including whether decoding is hardware
accelerated. [Three surfaces in one API](codec-fingerprinting.md).
- **A TLS handshake** decided before any of this.
[Which nothing above the network stack can reach](ja3-ja4-tls-fingerprint.md).
Swapping the browser engine does not change a single item on that list. If your agent
fails in a container and works on your laptop, this is almost certainly where the
difference is, and it is the same for a CDP tool and a Playwright tool.
[The container walkthrough](playwright-docker-detection.md) goes through it in order.
## The signal that is specific to agents
One signal no fingerprint work touches is the rhythm of the agent loop itself. An agent
thinks between actions: it reads the page, calls a model, waits, then acts. The resulting
rhythm has a shape no person produces.
- Long pauses clustered around **model latency** rather than around reading speed.
- **No movement during the pause.** A person drifts, scrolls slightly, hovers. An agent's
pointer is motionless for two seconds and then arrives.
- Actions landing **dead centre** on targets, because coordinates come from an
accessibility tree rather than from a hand.
- **No wasted actions.** People hover over things they do not click and change their
minds.
This explains blocks that arrive **after** a few interactions rather than at first load,
and that timing is the cheapest diagnostic you have.
[Human-like pointer motion](human-mouse-movement.md) covers what can be done about the
mechanical half, and [the cadence between actions gets a page of its own](ai-agent-timing-signal.md),
because smoothing a single click's path does not smooth the gaps between clicks.
## This stopped being a theoretical concern in 2026
Agent-driven browsing used to be rare enough that most detection stacks didn't bother
building a dedicated signal for it. That changed this year, and it changed from two
directions that solve the problem in opposite ways. Fingerprint, the commercial
fingerprinting vendor behind FingerprintJS, shipped a product in early 2026 that treats
"is this an authorized AI agent" as its own question: it verifies agents from partner
providers such as OpenAI, AWS AgentCore and Browserbase through a cryptographic
signature on their HTTP requests, not by scoring how they behave.
Academic research published the same year took the opposite route. A large-scale study
deployed honeysites behind several real anti-bot mechanisms, ran six LLM-based web
agents against them, and found every agent distinguishable from a human, and from each
other, using network, HTTP and browser-level fingerprinting alone, with no behaviour
involved. The finding that matters most for this page is a third one: the stealth
features some of those agents carried often made them easier to single out, not harder.
The practical upshot for anyone running an agent against a real site: "is this an
agent" now has a funded answer on the fingerprint side and on the authentication side
alike, independent of whatever engine sits underneath.
Neither 2026 development actually measures the timing and pointer-behaviour signal from
the previous section, so treat that signal as resting on its own reasoning, not on
outside confirmation. What both developments do confirm is that an agent's technical
identity, not just its behaviour, is now something sites are actively paid to notice,
which raises the cost of getting either the engine's fingerprint or the loop's rhythm
wrong.
## The route that does accept a different engine
If you want an engine whose fingerprint is set in its own source and you want an agent to
drive it, the working combination today is MCP rather than CDP.
Microsoft's `playwright-mcp` accepts a browser and an executable path and speaks MCP, so
any agent framework that talks MCP can drive a patched Firefox through it.
[That integration is written up here](integrations/playwright-mcp.md).
The trade is explicit: you give up the agent loop of whichever framework you were using
and get an engine-level fingerprint. Whether that is worth it depends on which of the two
problems at the top of this page you actually have.
## Conclusion
The honest summary is that the agent ecosystem standardised on CDP, and CDP means
Chromium. A Firefox engine does not drop into browser-use, Stagehand or Skyvern, and
crawl4ai is one missing field away rather than one protocol away.
More importantly, for most people the engine is not the binding constraint. The container
is. Every item in the machine list above is true whichever tool you picked, and none of
them is fixed by a stealth setting inside it.
Work out which problem you have first: a block at the first request points at the machine
or the address, and a block after several actions points at behaviour.
## Short answers to the questions that lead here
**Can I use a stealth Firefox with browser-use?** No. It drives Chrome over CDP.
**Does Stagehand support a custom browser?** Yes, `executablePath`, and it expects a
Chromium build.
**Can crawl4ai use a patched engine?** Not through configuration. It accepts
`browser_type="firefox"` but has no field naming a binary.
**Why does my agent work locally and fail in Docker?** Because the container answers
differently about the GPU, the fonts, the audio device and the screen. The agent is
identical.
**How do you make an AI agent undetectable?** You do not, as a single setting. Three
separate problems each need their own fix: the engine fingerprint (what patching Firefox
at the C++ level answers), the machine surfaces a container gives away regardless of
engine (GPU, fonts, audio, screen), and the agent loop's own rhythm, which no fingerprint
patch touches. Fixing only the first and calling the agent undetectable is the mistake
this whole page is about.
**Which AI agent framework is most stealth-friendly?** The question is usually the wrong
one. Pick on the agent loop, then fix the machine, then consider the engine.
**Is there any agent route to an engine-level fingerprint?** Two, and they are not
equivalent. `uvx aihawk` launches through the engine, so the
seeded profile and the humanised pointer come with it. Microsoft's own Playwright
MCP server takes a browser and an executable path, which runs the engine but
carries no `firefox_user_prefs`, so every session on a given build shares one
identity.
**See also:** [browser-use in detail](browser-use-detection.md),
[crawl4ai in detail](crawl4ai-stealth-custom-browser.md),
[Playwright MCP](integrations/playwright-mcp.md), and
[the checklist for being detected on one site](playwright-detected-as-bot.md).
## Sources
- `browser_use/browser/profile.py` and `chrome.py`, from browser-use's own repository,
[`browser-use/browser-use`](https://github.com/browser-use/browser-use); Stagehand's
`packages/core/lib/v3/launch/local.ts` and its browser configuration docs, from
[`browserbase/stagehand`](https://github.com/browserbase/stagehand); Skyvern's CDP
client, from [`Skyvern-AI/skyvern`](https://github.com/Skyvern-AI/skyvern);
`crawl4ai/async_configs.py`, from
[`unclecode/crawl4ai`](https://github.com/unclecode/crawl4ai); Maxun's package
manifest, from [`getmaxun/maxun`](https://github.com/getmaxun/maxun). All read
2026-07-27 and 2026-07-28.
- Star counts from the GitHub API on the same dates.
- The three tools named as not built on Playwright: Vercel's
[`agent-browser`](https://github.com/vercel-labs/agent-browser), Obscura's own
repository at [`h4ckf0r0day/obscura`](https://github.com/h4ckf0r0day/obscura), and
BrowserOS's own repository at
[`browseros-ai/BrowserOS`](https://github.com/browseros-ai/BrowserOS), each checked
for its implementation language and its manifest's dependencies.
- [crawl4ai's own documentation for stealth
mode](https://docs.crawl4ai.com/advanced/advanced-features/), and the
[`playwright-stealth`](https://github.com/Mattwmaster58/playwright_stealth) package it
applies, including crawl4ai's own statement that the underlying evasion modules do not
support Firefox.
- Microsoft's own [`playwright-mcp`](https://github.com/microsoft/playwright-mcp), for
the browser and executable-path options it accepts over MCP.
- Fingerprint's own product announcement,
[Identifying authorized AI agents vs bots on the web](https://fingerprint.com/blog/product-update-ai-agent-detection/),
retrieved 2026-08-28, for the cryptographic-signature verification product it shipped
in early 2026.
- The academic paper, ["On the Internet, Nobody Knows You're an LLM Bot: Unmasking Web
Agents with Multi-Layer Fingerprinting"](https://arxiv.org/abs/2606.30119), retrieved
2026-08-28, for the network, HTTP and browser-level fingerprinting work that
distinguishes six LLM-based web agents from humans and from each other, and for its
finding that stealth features often increased their detectability instead of reducing
it.
- The machine-level surfaces are each documented on their own page, linked above.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. This page exists because eight separate articles all
concluding "does not fit" would have been worse for you than one that says why.*
+253
View File
@@ -0,0 +1,253 @@
---
title: "How Akamai Bot Manager actually works"
description: "Akamai's own documentation plus a real GitHub issue, read together: what the sensor collects, how the _abck cookie and Bot Score work, and why a matching TLS/JA3/JA4 fingerprint was not enough to pass it."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 27
---
# How Akamai Bot Manager actually works
Akamai Bot Manager is not one check, it is a scoring pipeline. A JavaScript sensor
collects on the order of a hundred browser and device signals, encodes them into a
payload, and a server-side model combines that payload with the request's network-level
fingerprint into a Bot Score from 0 (human) to 100 (bot). Passing one layer of that
pipeline, even the hardest layer, does not mean you pass the rest.
A real, documented case makes that concrete, not theoretical. In April 2026 a
user of [Camoufox](https://github.com/daijro/camoufox), a separate open-source project
that also patches Firefox at the C++ level for automation, filed
[an issue](https://github.com/daijro/camoufox/issues/555) reporting that an
Akamai-protected site blocked their Camoufox session with a flat 403 while stock,
unpatched Firefox driven through the same Playwright automation reached the page and a
solvable challenge. The reporter had already checked the one thing everyone checks
first, the TLS and HTTP/2 handshake, and it matched byte for byte. This page walks
through how Akamai's own documentation and third-party reverse-engineering describe the
mechanism, then works through that issue in detail, because it is the clearest public
evidence that a matching network fingerprint is necessary and not sufficient.
This page is built from Akamai's own product documentation, two independent
technical write-ups that reverse-engineered the sensor payload, and the GitHub issue
above, all retrieved 2026-08-30. Where Akamai's own docs are deliberately vague about
internals, which they are, the page says so instead of filling the gap with a guess.
## What Akamai actually scores
Akamai's own materials describe Bot Manager as sitting a step above basic protections,
aimed at "APIs or transactional pages that handle things like login, signup, or
checkout." The product page states plainly that it "generates a score from 0 (human) to
100 (bot), looking at all anomalies, starting with the very first request," and that the
underlying models are built from "billions of bot requests and logins daily."
Akamai's technical documentation names five detection methods, and only some of them
involve a browser at all:
| Method | What it does |
|---|---|
| Akamai-validated bots | A maintained list of known bots (roughly 1,400 as of Akamai's own count), Akamai identifies them for you |
| Custom-categorized bots | You define your own categories and rules |
| Transparent detection | Evaluates traits of the request itself, without the client knowing it is being tested |
| Active detection | An interaction that only a real browser typically produces |
| Behavioral detection (Premier tier) | Movement patterns on specific endpoints like login or checkout |
Transparent and active detection are the two that a patched browser engine is actually
answering. Behavioral detection is a separate problem entirely, closer to
[mouse-dynamics biometrics](mouse-dynamics-behavioural-biometrics.md) than to anything a
C++ patch to the rendering engine touches.
## The sensor pipeline, step by step
Akamai does not publish the internal format of what it collects; a Scrapfly write-up on
the mechanism and a GitHub reverse-engineering project both had to work it out from the
obfuscated client script. Read together, the pipeline looks like this:
1. **The sensor script loads.** One reverse-engineering write-up
([`Edioff/akamai-analysis`](https://github.com/Edioff/akamai-analysis)) describes a
roughly 512KB obfuscated JavaScript payload that decrypts an internal string table at
runtime before it does anything else, which is itself a small piece of anti-analysis
design.
2. **Signal collection.** Both sources independently land on the same rough figure: over
a hundred signals, grouped into device environment (screen size, color depth,
hardware concurrency, device memory, platform), the browser API surface (navigator
fields, plugin behavior, WebGL renderer and vendor strings, canvas rendering
behavior), behavioral telemetry (mouse paths, click cadence, key timing, scroll
rhythm), timing metrics (DOM milestones, script execution intervals), and the results
of small JavaScript and Web Crypto challenges used to confirm the script actually ran
rather than being replayed.
3. **The payload is generated and encoded.** Described elsewhere as involving PRNG-based
shuffling and substitution seeded from a cookie-derived hash in the newer protocol
version, which is a deliberate anti-tampering design, not just minification.
4. **It is posted back.** Reverse-engineering write-ups describe the payload going to a
validation endpoint under a deployment-specific path; Akamai's own documentation does
not publish this, consistent with treating the whole exchange as "tamper-sensitive."
5. **The server responds with an `_abck` cookie.** Akamai's own language for it is
"mitigation state," and it is explicit that the internal format is deployment-specific
and "should [not be expected] to remain valid" if manually edited or reused across
sessions.
6. **Every later request is judged against that cookie's state**, not just against a
fresh score. Documented failure modes include the cookie expiring, a "replay
mismatch" when the same cookie shows up from a different IP or TLS profile, integrity
failures from a modified cookie string, and "behavioral conflicts where cookie history
contradicts runtime signals."
That last point matters for automation specifically: a session's history is part of what
gets scored, not only its current request. A browser that looks perfect on the first
page load and then behaves inconsistently three requests later is scored against its own
earlier behavior, not just against a static bar.
## What the network layer alone tells Akamai
One useful breakdown of the system groups everything Akamai evaluates into roughly seven
categories: IP reputation, TLS fingerprint consistency, HTTP protocol behavior, cookie
state, JavaScript sensor execution, browser fingerprint integrity, and behavioral
continuity across requests. The network-layer pieces are read the same way [JA3/JA4 and
HTTP/2 fingerprinting are described elsewhere on this
site](ja3-ja4-tls-fingerprint.md): TLS version, cipher and extension ordering, elliptic
curve data for the TLS side, and SETTINGS frame values plus pseudo-header ordering
(`:method`, `:authority`, `:scheme`, `:path`) for the HTTP/2 side.
That is one category out of roughly seven. Matching it removes one input to the score.
It does not remove the other six.
## The case that shows "matching fingerprint" is not "passing"
Here is what the GitHub issue actually contains, read directly, not summarized
from memory.
The reporter, running Camoufox v135.0.1-beta.24 through Playwright 1.58.0 on Linux, was
being blocked with a flat 403 by one specific Akamai-protected site, while the same
automated request pattern against the same site using stock Firefox through Playwright
returned a normal page and a solvable challenge. Before filing, the reporter had already
run the check this whole article leads with: they compared JA3, JA4, and Akamai's own
HTTP/2 signature between the two browsers and found them identical, and confirmed the
HTTP headers matched except for the User-Agent version string. Their own conclusion,
stated in the issue, was that this "means detection is NOT TLS/HTTP2," and that
"something in Camoufox's C++ patches is being detected" further up the stack.
The reporter also tested several other Akamai-protected sites in the same session: most
treated both browsers identically, either passing both or blocking both, which is itself
useful information, because it means the divergence was not a blanket Camoufox
signature, it was specific to one deployment's tuning.
Working the problem, the reporter ruled out a content-blocking browser extension,
changing the reported OS, enabling the page cache, and matching window sizes by hand,
none of which changed the outcome. They did find one concrete inconsistency worth
naming: Playwright reported a viewport of 1280x720, while the page's own JavaScript read
`window.innerWidth` as 1920. A real browser does not produce that split between what the
automation layer thinks the viewport is and what a script running inside the page reads
back. Whether that specific mismatch was the thing Akamai's sensor actually scored, the
issue does not settle. It is offered as a lead, not a proof.
The reporter also named four specific compiled patches as suspects, by filename:
`no-css-animations.patch`, `canvas-spoofing.patch`, `font-list-spoofing.patch`, and
`navigator-spoofing.patch`. Naming a patch as a suspect is not the same as demonstrating
it caused the block, and nobody in the thread went on to confirm which one, or whether
any one of them individually, was responsible.
What actually closed the issue was different from what anyone expected going in. Another
user suggested trying a newer Camoufox build, version 140 or higher from an unofficial
fork rather than the mainline release the reporter had been running. The reporter tried
it, confirmed the previously-blocked site and the others now loaded normally, reopened
the issue asking for the fix to land in the mainline branch, and a third participant
noted that the mainline had since moved to a much newer Firefox base version. The issue
is closed. No maintainer in the thread ever stated which mechanism, out of the four
named patches, the viewport inconsistency, or something never named at all, was actually
responsible. What is documented is that an older patched build was blocked on a network
fingerprint that matched a passing browser, and a newer patched build on the same engine
family was not.
## What this means if you patch a browser engine
Read narrowly, this is a story about one build lagging behind on one site. Read for the
lesson it actually demonstrates, it is broader: engine-level patching, compiling Firefox
or Chromium from source and setting the fingerprint in C++ rather than overriding it from
JavaScript, narrows the gap between an automated session and a real browser. It does not
automatically close it. The TLS and HTTP/2 layer read identical in this case, which is
exactly the layer that
[cannot be patched from a script and is usually the hardest thing to fake](ja3-ja4-tls-fingerprint.md),
and Akamai still told the two sessions apart. Whatever did the telling lived somewhere
else in that roughly-seven-category pipeline: the JavaScript-collected browser
fingerprint, the behavioral signal, or a reputation signal tied to the session's history
that had nothing to do with the browser at all.
That lesson generalizes to any project taking this approach, and it does not stop at the
project this issue was filed against. This project also compiles Firefox from source and
sets its fingerprint at the C++ level rather than in JavaScript, for
[the same reasons Camoufox does](vs-camoufox.md): an injected override is a function
whose source can be read, and a value decided below the JavaScript layer is not. That
shared decision is a real advantage over page-level spoofing, and it is not a guarantee
against a specific commercial detector's tuning on a specific deployment. This project
has not been tested against the site named in that issue, and even if it had, one clean
result would prove exactly as little as this build's years of matching TLS fingerprints
protected it from this block. The honest position is the one this whole page has been
building toward: a matching fingerprint at any single layer is necessary and not
sufficient, for any tool that takes this approach, including this one.
## Short answers to the questions that lead here
**What is the `_abck` cookie?** Akamai's own term for it is "mitigation state." It
represents the outcome of the sensor exchange and is checked on every later request
against that same session's history, not just evaluated once.
**Does a matching TLS/JA3/JA4 fingerprint mean I pass Akamai?** No. It means one input to
the score, out of roughly seven categories Akamai evaluates, agrees with a real browser.
The documented Camoufox case had a byte-identical network fingerprint and was still
blocked.
**What actually happened in the Camoufox GitHub issue?** An older patched build was
blocked by one Akamai-protected site while stock Firefox passed, despite matching
TLS/JA3/JA4/HTTP2 fingerprints. Switching to a newer patched build resolved it in
practice. No mechanism was confirmed in the thread.
**Does this mean invisible_playwright has the same problem?** There is no evidence either
way. The issue was filed against a different project, on a site this project has not
been tested against. What generalizes is the principle, not the specific outcome.
**What is Akamai's Bot Score?** A 0 to 100 number Akamai's own product page describes as
built from "all anomalies, starting with the very first request," derived from the
sensor payload plus network and reputation signals, not from any single check.
**Can any browser automation tool guarantee it beats Akamai Bot Manager?** No, and a tool
that claims it should be treated as making a promise it cannot verify either. This
project does not sell that claim about this or any other commercial anti-bot system.
**Where does most of Akamai's actual signal come from, if not the network layer?** From
the parts that are hardest to verify from outside: the JavaScript-collected browser and
device fingerprint, behavioral telemetry across the session, and reputation tied to the
IP and cookie history, none of which a single clean test can rule in or out.
**See also:** [Playwright stealth vs Camoufox: two patched Firefoxes](vs-camoufox.md),
for how this project and Camoufox compare on everything else; [JA3 and JA4: why a TLS
fingerprint cannot be patched](ja3-ja4-tls-fingerprint.md) and [HTTP/2 fingerprint: the
layer above the TLS handshake](http2-fingerprint-detection.md), for the two layers that
matched in the case above; and [How do websites detect bots?](how-do-websites-detect-bots.md),
for where a JavaScript-collected fingerprint sits among the other layers.
## Sources
- GitHub issue [`daijro/camoufox#555`](https://github.com/daijro/camoufox/issues/555),
"Akamai-protected sites block Camoufox but not stock Firefox via Playwright," retrieved
2026-08-30, for the test results, the matched network fingerprints, the suspected
patches, the viewport inconsistency, and the resolution.
- Akamai's own documentation, [Detection
methods](https://techdocs.akamai.com/cloud-security/docs/detection-methods) and [About
bots](https://techdocs.akamai.com/cloud-security/docs/about-bots) on
techdocs.akamai.com, retrieved 2026-08-30, for the five documented detection methods.
- Akamai's [Bot Manager product page](https://www.akamai.com/products/bot-manager),
retrieved 2026-08-30, for the 0-100 Bot Score description.
- [Akamai Bot Manager: Understanding `_abck` Cookies and Sensor
Data](https://scrapfly.io/blog/posts/akamai-bot-manager-understanding-abck-cookies-and-sensor-data),
Scrapfly, retrieved 2026-08-30, for the sensor signal categories, the `_abck` cookie's
documented failure modes, and the seven-category scoring breakdown.
- [`Edioff/akamai-analysis`](https://github.com/Edioff/akamai-analysis), GitHub, retrieved
2026-08-30, a reverse-engineering write-up of Bot Manager's client-side sensor script,
for the signal count, the pipeline steps, and the obfuscation details.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The Camoufox issue above is someone else's bug
tracker and someone else's engine build; it is quoted here because it is the clearest
public evidence that this whole approach narrows a gap rather than closing one, and that
applies to this project exactly as much as it applies to theirs.*
+83
View File
@@ -0,0 +1,83 @@
---
title: "Anubis: The Proof-of-Work Firewall, Explained"
description: "Anubis makes a browser burn CPU on a SHA-256 puzzle before it can reach a git forge, and it is genuinely open source, unlike most of this corpus. Read from its own repository: the puzzle, the JWT cookie, and a real published critique of its limits."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 34
---
# Anubis: The Proof-of-Work Firewall, Explained
Every other vendor on this list is a commercial product whose internals have to be pieced together from reverse engineering, because the company that built it has no reason to publish them. Anubis is different: it is MIT-licensed, its full source is on GitHub, and its author writes publicly about why it exists and what it does not solve. This page is built almost entirely from primary material, its own repository, its own documentation, and a named security researcher's own published analysis, not practitioner reconstruction. Say that plainly, because it is the exception in this corpus, not the rule.
Anubis was created by Xe Iaso, a pseudonymous developer, in January 2025, after Amazon's web crawler overloaded Iaso's own Git server while ignoring `robots.txt` entirely. It is now maintained by Techaro. The name is the joke and the mechanic at once: Anubis, the Egyptian god who weighs the hearts of the dead, and the software "weighs the soul" of an incoming HTTP request before deciding whether it deserves to reach the backend at all.
## What it actually does: a computational toll booth
Anubis sits in front of a web server as a reverse proxy. Before a request from anything that looks like a browser (identified, by default, by "Mozilla" in the User-Agent string) reaches the protected application, Anubis requires the client to solve a small cryptographic puzzle: find a nonce that, appended to a server-issued challenge string and run through SHA-256, produces a hash with a required number of leading zero hex digits.
The cost is tunable and grows fast. A default difficulty of five leading zeros takes on the order of a second on a real browser; six can take several minutes. Each added difficulty level multiplies the expected number of hash attempts by sixteen, since each hex digit is one of sixteen values, so the cost curve is deliberately steep rather than linear. A real browser solves this using Web Workers so the puzzle does not freeze the page, leaning on the native Web Crypto API where available and falling back to a pure-JavaScript SHA-256 implementation otherwise.
Once solved, Anubis issues an Ed25519-signed JWT, stored as a cookie, carrying the challenge string, the winning nonce, the passing hash, an issue time, an expiry, and a backdated "not before" claim for clock-skew tolerance. That token is valid for roughly a week, so a real visitor solves the puzzle about once per week of browsing rather than once per page load. For clients without JavaScript at all, a separate `metarefresh` challenge type, added around version 1.20, achieves a comparable delay using an HTTP meta-refresh redirect instead of a computed hash, specifically so that disabling JavaScript is not itself a way around the gate.
## The policy engine: not every request gets the same treatment
Later versions moved Anubis toward something closer to a lightweight, rule-driven firewall than a blanket "challenge everyone" gate. Its policy system evaluates each request against configurable rules, User-Agent regex, path matching, header inspection, CIDR ranges, GeoIP and ASN filtering, or custom CEL expressions for more complex logic, and can assign one of four outcomes: **ALLOW** it straight through, **DENY** it outright, **CHALLENGE** it with the proof-of-work puzzle, or **WEIGH** it, adding to a cumulative score that later rules and thresholds act on. The project's own configuration comments describe this in the same soul-weighing language the tool is named for: a client whose signals look clean has "a soul lighter than a feather" and passes without friction.
## Adoption: this is not a hypothetical
Anubis is deployed in front of real infrastructure at meaningful scale, not just a research demo. Documented adopters include GNOME's GitLab instance, the Linux kernel's mailing list and Git infrastructure, FFmpeg, Wine, UNESCO, FreeCAD, ScummVM, Duke University's digital archives, OpenWRT, and the Deutsche Nationalbibliothek. Its author's own stated tradeoff is explicit rather than hidden: deploying it "will result in your website being blocked from smaller scrapers and may inhibit 'good bots' like the Internet Archive," and the project's guidance is that most sites should try Cloudflare first and reach for Anubis only when that is not an option.
## A real, named critique worth reading in full
Security researcher Tavis Ormandy published an analysis arguing that Anubis's proof-of-work cost is not a meaningful deterrent against a well-resourced scraper. His own account: a native solver, a couple dozen lines of C rather than the JavaScript a browser is forced to run, cleared the challenge for roughly 11,000 separate Anubis-protected sites in about six minutes on a free-tier Google Cloud VM, and he estimated the aggregate compute cost of doing this continuously at well under a cent a month, trivial against the budget of any company running crawlers at scale.
That critique does not contradict what Anubis's own author and documentation say the tool is for. Read closely, the mechanism's actual value is not raising anyone's compute bill; it is that it "refuse[s] to render an expensive page for any client that will not run a modern browser's worth of JavaScript first," which is a real and different bar than "impose a compute tax a motivated attacker cannot pay." Anubis stops the high-volume, low-effort crawler that spoofs a browser User-Agent but runs no JavaScript at all, cheaply and by design. It does not stop a scraper that has already built a dedicated solver, and by August 2025 Codeberg, one of the forges running it, publicly acknowledged that AI scrapers had learned to solve Anubis's challenges. The tradeoff is asymmetric in a second, less flattering way too: the computational cost lands on every real visitor's device, including low-end and battery-constrained ones, while a determined attacker's marginal cost per site approaches zero once a solver exists.
## What this means for a real, engine-level browser
This is the one detector in this whole corpus where the honest answer is: engine realness is close to irrelevant to whether the gate opens. Anubis is not testing whether a browser is lying about its fingerprint, checking canvas output, or looking for automation-framework tells. It is testing one thing: can this client execute a modern JavaScript engine fast enough to solve a SHA-256 search in a reasonable time. Any real browser, patched or unpatched, stealth or not, answers that the same way, because the puzzle does not touch fingerprint surfaces at all. A plain HTTP client with no JavaScript engine fails it regardless of how convincingly its headers are spoofed, which is the entire point: it is a liveness test for "do you run JavaScript like a browser," not a fidelity test for "are you the specific browser you claim to be."
`invisible_playwright` does not do anything specific to Anubis, and there is nothing Anubis-specific to do: a genuinely real Firefox, C++-patched or stock, solves its puzzle the same way any other real Firefox does, because the puzzle is engine-agnostic by construction. What this page is really useful for is the opposite lesson: not every gate in this space is a fingerprint problem, and treating Anubis as one would be a category error.
## Short answers to the questions that lead here
**Is Anubis actually open source?** Yes, genuinely, MIT-licensed, full source on GitHub, unlike almost everything else covered in this corpus. That is why this page can cite its own repository and documentation as a primary source rather than reconstructing it from the outside.
**What does the proof-of-work puzzle actually require?** Finding a nonce such that SHA-256 of the challenge string plus that nonce produces a hash with a configured number of leading zero hex digits. Default difficulty (five zeros) takes about a second on a real browser; each added digit multiplies the expected work by sixteen.
**How long does the cookie last once I solve it?** About a week, via an Ed25519-signed JWT, so a real visitor is not re-solving the puzzle on every page load.
**Does Anubis check my browser fingerprint?** No, not in the sense this corpus otherwise means. It checks whether you can execute JavaScript at browser speed, not whether your canvas hash, WebGL renderer, or navigator properties look genuine.
**Is proof-of-work actually a strong defense?** Security researcher Tavis Ormandy's published analysis argues no, against a motivated attacker: he solved challenges for roughly 11,000 Anubis-protected sites in about six minutes using a native solver on a free cloud VM. It is effective against the high-volume, no-JavaScript crawler class it was built for, and by the Anubis maintainers' own framing that JavaScript-execution requirement, not the compute cost itself, is the actual mechanism.
**Does deploying Anubis affect legitimate crawlers?** Yes, by its own maintainer's admission. It can block smaller scrapers and "good bots" like the Internet Archive, which is a stated, acknowledged tradeoff, not a hidden side effect.
**Does a real, engine-level Firefox pass Anubis differently than a stock one?** No, and that is the point of this page. Anubis is not testing fingerprint fidelity at all, so there is nothing for engine-level realness to improve here. Any real JavaScript engine running fast enough passes the same way.
**See also:** [How Kasada's bot detection actually works](kasada-explained.md) for a commercial vendor using proof-of-work as part of a much larger, closed-source stack; [How Cloudflare's AI Labyrinth works](cloudflare-ai-labyrinth-explained.md) for a completely different anti-crawler philosophy, wasting a bot's time with content instead of computation; and [how do websites detect bots?](how-do-websites-detect-bots.md) for where a liveness test like this sits among fingerprint-based layers.
## Sources
- [`TecharoHQ/anubis`](https://github.com/TecharoHQ/anubis) on GitHub, retrieved 2026-08-30, the project's own
source and README, for the MIT license, the challenge-type directory structure, and the stated tradeoff
about blocking smaller scrapers.
- Anubis documentation, [Introduction](https://techarohq-anubis.mintlify.app/introduction), retrieved 2026-08-30,
for the policy-engine actions (ALLOW/CHALLENGE/DENY/WEIGH), the challenge types, and the metarefresh
no-JavaScript fallback.
- crawlex.net, ["Browser-based proof-of-work: how Anubis gates crawlers with hash puzzles"](https://blog.crawlex.net/blog/anubis-proof-of-work-crawler-gating/),
retrieved 2026-08-30, for the exact difficulty/cost-curve figures, the JWT cookie contents and one-week
validity, and the "refuse to render an expensive page" framing of the mechanism's real function.
- Wikipedia, [Anubis (software)](https://en.wikipedia.org/wiki/Anubis_(software)), retrieved 2026-08-30, for
the creation history (Xe Iaso, January 2025, the Amazon-crawler origin story), the adopter list, and the
Tavis Ormandy critique and Codeberg's August 2025 acknowledgment, cross-checked against the crawlex.net
account of the same critique.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
patched at the C++ level. Anubis is the one detector here this project can actually read the source of, and
the honest conclusion is that engine-level realness has almost nothing to do with passing it: the puzzle
tests JavaScript execution speed, not fingerprint fidelity, and any real browser clears it the same way.*
+83
View File
@@ -0,0 +1,83 @@
---
title: "Arkose Labs (FunCaptcha), Explained"
description: "FunCaptcha's 3D puzzles are the visible part of a risk engine that decides difficulty before you ever see a puzzle. What Arkose's own materials say, and what independent reverse engineering has worked out about the telemetry behind it."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 32
---
# Arkose Labs (FunCaptcha), Explained
FunCaptcha looks different from the CAPTCHAs it competes with. Instead of distorted text or a grid of storefronts, Arkose Labs presents a small interactive puzzle: rotate a 3D object to the right orientation, match a shape, answer a short audio or logic prompt. Arkose maintains a large, growing library of these, over 1,250 puzzle variants by one practitioner count.
That puzzle is the part users see. It is also, deliberately, not the main event. Before a puzzle ever renders, Arkose's telemetry has already decided how hard that puzzle should be, and how many of them a given session will have to solve.
This is one of the vendors in this corpus closer to an actual CAPTCHA than to a silent background check, worth being direct about upfront: nothing on this page is written as, or should be read as, a description of how to solve Arkose's puzzles for someone. It is about the risk mechanism that decides whether you see one, and how hard.
## What Arkose's own materials say, and where they stop
Arkose's own public site describes its detection in terms of scale and adaptivity, not mechanism: "225+ risk signals," "dynamic challenges that evolve in real time to counter emerging attack vectors," and device identification that combines "deterministic methods with machine learning similarity detection." Its own numbers past that point are business outcomes, not technical detail, customer satisfaction figures, dollar savings, account-growth multipliers, not the field names or scoring weights behind the 225 signals.
That is a real limit on what this page can say with a straight face. Arkose does not publish, in the materials checked for this page, the specific list of what those 225+ signals are or how the risk engine weighs them. What follows past this point comes from independent, practitioner-level reverse engineering, not Arkose's own documentation, and is marked as such.
## What practitioner reverse engineering has converged on
Multiple independent writeups, none of them Arkose's own source, describe a broadly consistent picture of what the client-side script collects before a puzzle appears: device and browser fingerprint (screen resolution, installed fonts, navigator properties), canvas, WebGL and AudioContext rendering output, the same category of signal [CreepJS](creepjs-explained.md) and [BotD](botd-explained.md) read, and continuous mouse-movement telemetry once the puzzle itself is on screen.
The mouse-movement layer is where the writeups get specific enough to be worth quoting carefully, with the caveat that this is reconstructed from the outside, not confirmed by Arkose: one practitioner account describes the script computing cursor acceleration ahead of a click, flagging a straight-line `mouse.move()` path (the kind a naive automation script produces) as an anomaly, and treating a press-to-release interval under roughly 50 milliseconds as evidence of programmatic input, on the reasoning that human physiology puts a real click closer to 70 to 100 milliseconds. None of these specific thresholds appear in Arkose's own public materials as retrieved for this page; they are practitioner reconstructions and should be weighed accordingly, the same caveat this corpus applies to reconstructed internals for [Kasada](kasada-explained.md) and [DataDome](datadome-explained.md).
A separate, independent piece of evidence that this fingerprint surface is real and specific enough to document: a public GitHub repository, `AzureFlow/arkose-fp-docs`, exists specifically to catalog ArkoseLabs' FunCaptcha fingerprinting payload. Its existence corroborates that the payload is large and structured enough to be worth documenting field by field, the same kind of evidence [a public interstitial-payload tool corroborates for DataDome](datadome-explained.md#the-cookie-and-what-happens-when-it-is-missing); this page did not extract its full field list, so it is cited for what it demonstrates (a real, mapped fingerprint surface exists) rather than for its specific contents.
## Risk tiers, and how a puzzle escalates
The reverse-engineering writeups agree on the shape of the escalation even where they disagree on exact thresholds: telemetry collected before and during interaction feeds a risk classification, and sessions read as low-risk may see a simpler puzzle or none at all, while sessions read as high-risk face more puzzle steps, a harder variant, or an outright block. A session that appears to be a script calling Arkose's endpoints directly, without a full browser context behind it, reads as an anomaly on arrival: unusual timing, missing events a real interaction would produce, which the writeups describe triggering escalation before a single puzzle attempt has even happened.
Time pressure is part of the same mechanism by the same accounts: a stalled challenge, one sitting unsolved for roughly fifteen seconds, gets swapped out or escalated rather than waiting indefinitely, which by itself works against slow, deliberate automation as much as it works against distraction.
## What an engine answers honestly, and what the puzzle itself is not
Two different layers are worth separating cleanly here, because collapsing them is exactly the framing this page is built to avoid.
The **fingerprint layer**, canvas, WebGL, AudioContext, navigator properties, is the same category of check covered throughout this corpus: a genuinely real browser engine, patched below the JavaScript layer rather than overridden from a content script, produces these values honestly because it is not simulating them, it is generating them the normal way. That argument holds here exactly as it does for [CreepJS](creepjs-explained.md) and [PerimeterX](perimeterx-explained.md), and it says nothing puzzle-specific: it only affects whether the fingerprint half of Arkose's risk read looks honest or contradictory.
The **puzzle itself is a different kind of gate entirely**, the same structural point [made about Cloudflare Turnstile's checkbox tier](cloudflare-turnstile-explained.md): once risk scoring has decided a session needs a challenge, solving a 3D rotation puzzle is an interactive task, not a value a browser engine reports about itself. No amount of engine-level fidelity upstream makes that requirement disappear, because the requirement was never a fingerprint question in the first place. And the mouse-dynamics telemetry collected during the solve is a property of whatever is driving the pointer, human or scripted, [which has its own separate treatment in this corpus](mouse-dynamics-behavioural-biometrics.md), not a property of the rendering engine underneath.
`invisible_playwright` does not include, and will not add, a puzzle-solving or CAPTCHA-solving capability for Arkose or any comparable vendor. That is a deliberate boundary, not a gap this project is working to close: solving FunCaptcha's puzzles on a user's behalf is a different product category from engine-level stealth, and this corpus's naming policy for anti-bot vendors is explicit that a circumvention claim paired with a protection vendor's name is the one thing it does not make. What honest engine behavior changes here is narrower and more mundane: it keeps the fingerprint half of the risk read from contradicting itself, nothing more.
## Short answers to the questions that lead here
**Does Arkose Labs publish its risk scoring model?** No, not beyond category-level language ("225+ risk signals," device identification combining deterministic and ML methods). The specific field list and scoring weights are not in Arkose's own public materials as checked for this page.
**What decides how hard a FunCaptcha puzzle is?** Per Arkose's own framing and independent reverse engineering, a risk classification computed from device fingerprint, behavioral telemetry and reputation signals before the puzzle is shown, with higher-risk sessions facing more or harder puzzle steps.
**Does mouse movement get scored during the puzzle itself?** Independent writeups describe continuous cursor telemetry during the solve, including acceleration and click-timing checks, though the specific thresholds reported are reconstructed by practitioners, not confirmed by Arkose's own documentation.
**Is there a real public reverse-engineering project for Arkose's fingerprint?** Yes; `AzureFlow/arkose-fp-docs` on GitHub documents ArkoseLabs' FunCaptcha fingerprinting payload, though this page did not extract its full field-level contents.
**Does a real browser engine defeat FunCaptcha?** It answers the fingerprint layer honestly, the same argument that applies to any vendor's canvas/WebGL/navigator checks. It has no bearing on the puzzle itself, which is an interactive challenge, not a fingerprint question.
**Does invisible_playwright solve FunCaptcha puzzles?** No. This project does not include or sell a puzzle-solving or CAPTCHA-solving service for Arkose or any vendor, and this page is not a guide to building one.
**Why does Arkose escalate a stalled puzzle after about fifteen seconds?** By practitioner accounts, an unsolved challenge sitting past that window gets swapped or escalated rather than left open, which works against slow or hesitant automation the same way it works against a distracted human.
**See also:** [How Cloudflare Turnstile actually works](cloudflare-turnstile-explained.md) for the same fingerprint-versus-human-gate distinction at a vendor whose interactive tier is a click rather than a puzzle; [What are mouse-dynamics behavioural biometrics?](mouse-dynamics-behavioural-biometrics.md) for the pointer-telemetry layer in depth; and [How CreepJS decides you are lying](creepjs-explained.md) for the fingerprint-consistency argument this page leans on.
## Sources
- Arkose Labs, [How Arkose Labs Works](https://www.arkoselabs.com/how-arkose-labs-works/), retrieved 2026-08-30,
for the "225+ risk signals," dynamic-challenge and device-identification language quoted above.
- [`AzureFlow/arkose-fp-docs`](https://github.com/AzureFlow/arkose-fp-docs) on GitHub, retrieved 2026-08-30,
a real public reverse-engineering project documenting ArkoseLabs' FunCaptcha fingerprint payload, cited for
its existence as evidence of a mapped fingerprint surface, not for its full field-level contents.
- Practitioner reverse-engineering writeups, retrieved 2026-08-30: ["FunCaptcha (Arkose Labs): Principles of Operation, Features, and Methods for Automated Bypass"](https://medium.com/@kentavr00000009/funcaptcha-arkose-labs-principles-of-operation-features-and-methods-for-automated-bypass-780ef786d7c5)
and ["Scraping in the Crosshairs of Arkose Labs"](https://medium.com/@koshka00009/scraping-in-the-crosshairs-of-arkose-labs-how-to-bypass-3d-puzzles-browser-fingerprints-and-c5c710091152),
for the telemetry categories, the mouse-timing thresholds, and the risk-tier escalation behavior described above;
independent, non-vendor sources whose specific numeric thresholds are not corroborated by Arkose's own documentation.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
patched at the C++ level. Arkose's own materials stop at category-level claims about its risk engine,
and this page stops there too for anything not independently corroborated. It does not describe, and
this project does not build, a way to solve FunCaptcha's puzzles for you.*
@@ -0,0 +1,211 @@
---
title: "What is ASN and IP reputation in bot detection?"
description: "What ASN and IP reputation are: how they score requests before JavaScript runs, how reputation builds and decays, and why a clean browser on a burned IP loses."
parent: "Network, Proxy and WebRTC"
grand_parent: "Guides"
nav_order: 23
---
# What is ASN and IP reputation in bot detection?
An ASN identifies which network operator an address belongs to, and IP reputation is the
abuse history attached to that address; together they let a detector score a connection
before a single line of JavaScript runs. This is the layer a browser cannot touch, and it
is why a session with a flawless fingerprint can still be turned away at the door.
This page explains what an ASN is, how IP reputation gets built and how it decays, why a
perfect browser on a flagged block loses anyway, and where the browser's job ends and the
proxy's job begins.
## What an ASN actually is
An ASN, an [Autonomous System Number](https://datatracker.ietf.org/doc/html/rfc1930),
identifies the network operator that announces a block of IP addresses to the rest of the
internet. A residential internet provider has one or more ASNs. A cloud host has its own.
When a connection reaches a server, the server can look up the address and learn, in a
single query, which operator it belongs to and what kind of operator that is.
That last part is the point. ASNs carry a category. A range that belongs to a consumer
internet provider looks like a person at home. A range that belongs to a hosting company
or a cloud region looks like a server, because that is what almost everything in it is.
The lookup is cheap, it happens at the very first packet, and it does not care in the
slightest what browser you plan to run. A datacenter ASN is a strong prior on its own:
real customers rarely browse a shopping site from a cloud region, so a request from one
starts the session already suspected. This is covered in more depth in
[can websites detect a datacenter or proxy IP](can-websites-detect-a-datacenter-proxy-ip.md),
and the short version is that they can, directly, at the network layer.
## How IP reputation is built and how it decays
The ASN category is the coarse signal. Reputation is the fine one, and it is per-address
and per-block rather than per-operator.
A reputation service records what addresses have done. If a particular IP, or the /24
block around it, has recently been the source of credential-stuffing traffic, scraping
runs, spam, or a burst of failed logins, that history attaches to the address. It is
shared: the block was burned by whoever used it before you, and you inherit the score. A
single address can also burn itself inside one session, purely by volume. If one IP opens
several hundred sessions against the same endpoint in an hour, that velocity is itself the
signal, independent of how human each individual session looks.
Reputation decays, but slowly and unevenly. An address that sat quiet for a long stretch
recovers some standing. An address that is being actively abused right now does not, and
the decay resets every time the block is used again. This is why a cheap shared proxy
never really recovers: the moment its score drifts back toward neutral, the next user on
the same block drives it back down. You are not renting a clean address, you are renting a
position in a queue of people degrading it.
Three inputs, then, all read before the browser matters: the ASN's category, the block's
abuse history, and the live session count from that address.
## Why a perfect fingerprint on a burned block still loses
A perfect fingerprint on a burned block still loses because a detector scores the network
layer and the fingerprint layer independently, and a flawless browser can only zero out the
second one - it has no way to reach the first.
invisible_playwright is designed to look like a real browser driven by a real person. The
fingerprint is coherent, the TLS handshake belongs to a genuine Firefox, and the driver
layer does not announce automation. That is why it passes most detection checks: the parts
a browser controls, it controls well. What it cannot do is change the address the
connection arrives on. A coherent browser on a burned IP is still on a burned IP.
The two layers are scored independently and both have to be right. Picture a detector as
adding up evidence. The network layer contributes its verdict, a datacenter ASN or a block
with recent abuse, before any script runs. The fingerprint layer contributes its verdict
after. A perfect browser sets the second contribution to roughly zero, which is exactly
what you want, but it cannot make the first contribution negative. If the network layer
alone crosses the threshold, the session is challenged or blocked no matter how clean
everything downstream reads. This is the mechanism behind
[being blocked with a clean fingerprint](why-blocked-with-a-clean-fingerprint.md): nothing
is wrong with the browser, and the browser was never the thing that failed.
You can prove which layer you are hitting in about a minute. Open the same URL by hand,
from the same machine and the same exit, in a stock browser. If the manual visit is also
challenged, the browser is not your problem and no fingerprint change will help. If the
manual visit passes and the automated one does not, the difference is in the browser or
the behaviour, and that is a different investigation entirely.
## Where the browser ends and the proxy begins
The division of labour is clean, and being clear about it saves a lot of wasted effort.
The browser's job is everything the server reads after the connection is established: the
fingerprint fields, the TLS handshake, the absence of automation tells, the driver layer.
invisible_playwright handles those from one seed, reproducibly. Your job, the part the
browser cannot do for you, is three things it has no access to.
- **A clean exit.** An address on a consumer ASN, on a block without recent abuse, not
already shared by a crowd. Around 90% of proxy addresses are public and therefore
already known and scored before you send a byte through them. The clean fraction is the
part worth paying for.
- **Human pacing.** Session count per address is a reputation input, so hundreds of
sessions from one IP burns it regardless of browser quality. Spread the work across
addresses and across time.
- **Behaviour and quotas.** Per-account limits, rate limits, and the timing of your
actions are yours to supply. The browser looks human; whether it acts human is up to
the code driving it.
One more thing that is genuinely the browser's job and is easy to mistake for a network
problem: the browser and the exit have to tell the same story. An exit in one country
behind a browser claiming another is a contradiction the detector reads directly, and it
is cheap to get right. invisible_playwright derives the timezone from the egress IP by
default, which is why
[a timezone that does not match the proxy](timezone-proxy-mismatch.md) has its own page.
## A runnable example
The browser side is two lines. You supply the proxy; the wrapper wires it, routes DNS
through it, and derives the timezone from its exit so the browser and the network agree.
```python
from invisible_playwright import InvisiblePlaywright
proxy = {
"server": "socks5://gate.example.com:1080",
"username": "user",
"password": "pass",
}
# seed=42 makes the identity reproducible; the proxy is the exit you supply
with InvisiblePlaywright(seed=42, proxy=proxy) as browser:
page = browser.new_page()
# confirm the exit the browser is actually leaving from,
# rather than assuming it
page.goto("https://example.com/ip")
print(page.inner_text("body"))
```
The `browser` object is a real Playwright
[`Browser`](https://playwright.dev/python/docs/api/class-browser), so every standard
method works exactly as documented upstream. Note what the example does and does not
claim: it pins the fingerprint so a failure is reproducible, and it reads back the exit so
you know which address your reputation is riding on. It does not make a bad address good.
If the printed IP sits on a datacenter ASN or a burned block, the cleanest browser in the
world is still leaving from there.
## Conclusion
ASN and IP reputation are the part of bot detection that runs before your browser gets a
turn. The ASN says what kind of network you are on, the reputation says what that address
and its neighbours have been doing, and the session count says how hard you are leaning on
it right now. All three are read at connection time, none of them are in a browser's
gift to change, and a perfect fingerprint sets its own layer to zero without touching
theirs.
So the honest framing is the useful one. invisible_playwright makes the browser layer look
like a real person's real browser, which is most of the battle and the part most tools get
wrong. The network layer is yours: a clean exit, human pacing, and quotas you respect. Get
both right and the session passes. Get the browser perfect on a burned block and it does
not, and now you know exactly why.
## Short answers to the questions that lead here
**What is an ASN in bot detection?** The number identifying the network operator that owns
the address you connect from. Detectors read it at the first packet to learn whether you
look like a home connection or a datacenter, before any JavaScript runs.
**Can a good fingerprint fix a bad IP?** No. The two are scored independently. A perfect
browser zeroes out its own layer but cannot make a burned or datacenter address look
clean, so the session can still be blocked on the network verdict alone.
**Why does my clean browser still get blocked?** Almost always the exit. Prove it by
opening the same URL by hand from the same machine and exit in a stock browser; if that is
challenged too, the browser was never the problem.
**How does an IP get a bad reputation?** From abuse history on the address or its block,
inherited from whoever used it before you, plus live session volume. Shared cheap proxies
never recover because the next user re-burns the block as it decays.
**Does invisible_playwright give me a clean IP?** No, and it does not claim to. It handles
the browser fingerprint, TLS and driver layers. You supply the proxy, the pacing and the
quotas; the browser cannot change the address it arrives on.
**How many sessions can one IP make?** Fewer than you would like, because session count is
itself a reputation input. Hundreds of sessions from one address burns it regardless of
how human each session looks. Spread across addresses and across time.
## Sources
- [RFC 1930](https://datatracker.ietf.org/doc/html/rfc1930), the IETF guidelines that
define an Autonomous System as a routing policy unit and specify the ASN that identifies
it.
- [Playwright's `Browser` class reference](https://playwright.dev/python/docs/api/class-browser),
for what a launched `Browser` object exposes once the wrapper hands it back.
- This project's release and validation gates, which test the browser layer through a real
proxy and confirm the exit address inside the browser rather than assuming it.
- The network-layer behaviour described here is read from public reputation and ASN-lookup
mechanics, cross-checked against the browser layer this project controls.
**See also:** [can websites detect a datacenter or proxy IP](can-websites-detect-a-datacenter-proxy-ip.md)
for the network layer in detail, [browser trust scores explained](browser-trust-score-explained.md)
for how the fingerprint layer is scored separately, and
[why you can be blocked with a clean fingerprint](why-blocked-with-a-clean-fingerprint.md)
when every browser check comes back green.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The browser layer is the
part we can make perfect; the IP is the part only you can keep clean.*
+228
View File
@@ -0,0 +1,228 @@
---
title: "AudioContext fingerprinting, and why adding noise backfired"
description: "AudioContext fingerprinting is usually beaten with noise. We shipped that defence, measured it, and it made sessions easier to detect. The seven values and why."
parent: "Canvas, WebGL, Fonts and Audio"
grand_parent: "Guides"
nav_order: 8
---
# AudioContext fingerprinting, and why adding noise backfired
Audio fingerprinting has a reputation for being hard to defeat. It deserves it, but
not for the reason usually given.
The usual reason is that the audio pipeline is low-level and mathematically involved.
The real reason is simpler and more annoying: **the obvious defence makes you easier
to detect, not harder.** We shipped that defence, measured it, and turned it off. This
page is what the measurements said.
## What is actually being measured
Audio fingerprinting collects seven values from the [Web Audio
API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API), a rendered
sample buffer plus six device and analyser readings, and checks that they agree with
each other. Almost every guide stops at "it hashes how your device processes sound",
which is true and useless. Here is the concrete shape.
A fingerprinting script builds a short offline audio graph, usually an oscillator into
a dynamics compressor, renders it without playing anything, and reads the resulting
samples back:
```js
const ctx = new OfflineAudioContext(1, 44100, 44100);
const osc = ctx.createOscillator();
const comp = ctx.createDynamicsCompressor();
osc.connect(comp); comp.connect(ctx.destination);
osc.start(0); ctx.startRendering();
// then: sum the rendered samples, hash the sum
```
But the rendered buffer is only one of the values collected. The full set is wider
than people expect, and this matters because they have to agree with each other:
| Value | What it is |
|---|---|
| `AudioContext.sampleRate` | 44100 or 48000, from the audio device |
| `AudioContext.outputLatency` | the driver's reported latency |
| `AudioContext.destination.maxChannelCount` | stereo, 5.1, whatever the device has |
| the rendered sample sum | the oscillator-compressor output |
| `AnalyserNode` frequency data sum | the same graph seen through an FFT |
| `AnalyserNode` time domain data sum | the same graph in amplitude |
| `DynamicsCompressorNode.reduction` | one float, the applied gain reduction |
Seven values, one machine. A profile claiming a 5.1 sound card with a laptop's latency
and a rendered buffer that belongs to neither is caught by comparison, and no
individual value in it is unusual.
## The mistake: noise that gets asked about twice
The intuitive defence is the canvas one: add a small amount of noise to the rendered
samples so the hash differs per session. We implemented exactly that, seeded so the
same identity always produced the same audio.
Two things went wrong, and the second one is the interesting one.
## Silence is a trap
[CreepJS](https://abrahamjuliot.github.io/creepjs/) has a check called
`hasFakeAudio`. It does not compare your hash to a database. It builds a buffer that
should be **silent**, renders it, and looks at whether anything is in it.
```js
new OfflineAudioContext(1, 100, 44100) // 100 samples, oscillator frequency 0
```
Nothing should come out of that. On real hardware nothing does. A tool adding noise to
every rendered buffer puts noise into silence, which is physically impossible, and the
check records a lie.
It also inspects the first 100 samples of a normal buffer and sums the distinct values
it finds there, for the same reason: the beginning of a render is predictable, so
variation there is manufactured.
The fix is not to stop adding noise, it is to add it only where noise can legitimately
exist: skip buffers short enough to be a probe, skip the opening samples, and skip
channels that carry no input at all. Noise on a silent channel is not subtle. It is a
claim that your sound card produces sound when it is off.
**The general shape, which is worth more than the specific check:** a detector does not
have to recognise your noise. It only has to ask a question whose correct answer is
*nothing*, and see whether it gets something.
## The defence was the signal
The second problem was not expected: with the noise correctly guarded and passing the
silence checks, a commercial fingerprinting service still scored the browser as
tampered. We isolated the audio noise with a kill switch and ran it both ways on the
same machine and the same identity:
| Audio noise | tampering score |
|---|---|
| on | 0.4349 |
| off | 0.0564 |
Nearly an order of magnitude, from one feature. The audio noise was not one
contributor among many, it was the dominant one.
So we ship with it **off**. The un-noised audio output is still host-independent,
because the values around it are set from the seed and the render is deterministic, and
it matches what a real Firefox on that configuration produces. Turning the noise off
did not make sessions linkable: it made them identical to the honest answer, which is
what everything else on that machine is claiming anyway.
That inversion is the lesson worth carrying:
> A randomised value is not automatically safer than a fixed one. If everyone with a
> given browser and OS produces the same audio hash, producing that same hash makes you
> one of them. Producing a unique one makes you the only person on the internet whose
> sound card is a snowflake.
Randomising helps where the honest value identifies your specific machine. It hurts
where the honest value identifies your *class* of machine, because there the crowd is
the disguise.
## Getting the details right, if you do add noise
Two things we got wrong on the first attempt and had to measure our way out of.
**Scale is per-surface.** Frequency data is in decibels, roughly -100 to 0. Time domain
data is amplitude, -1 to 1. The same epsilon on both is either invisible on one and
enormous on the other. We ended up around `1e-4` for frequency, `1e-7` for time domain,
and `1e-5` for the compressor's single reduction float.
**The noise has to be a function of the seed and the position, not of a random number
generator.** If it is random per call, reading the same value twice returns two
different answers, and a script that reads it twice is a script anyone can write. Ours
hashes the seed together with the channel index and the sample position, so the same
identity renders the same buffer forever, and two reads agree.
That second point is the one that catches most tools. It is easy to check and it is
checked.
## What to look at on your own setup
```js
const ctx = new AudioContext();
console.log(ctx.sampleRate, ctx.outputLatency, ctx.destination.maxChannelCount);
ctx.close();
```
- **`sampleRate` is 44100 or 48000.** Anything else is rare enough to be interesting.
- **The three device values describe one plausible device.** A 5.1 channel count with a
laptop latency is two devices in one answer. Those three numbers need no rendering at
all, which makes them [a fingerprinting surface of their
own](audiocontext-samplerate-latency-fingerprint.md).
- **[`outputLatency`](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/outputLatency)
is not zero and not identical across machines.** A container with no sound device is
a real tell here, in the same way that [a machine with no GPU is one for
WebGL](webgl-renderer-strings.md).
- **Read the rendered sum twice in one session.** It must match. If it does not, your
noise is per-call, and that is the single cheapest tampering check there is.
- **Render a silent buffer and confirm it is silent.**
## Conclusion
The inversion is the whole lesson. Audio fingerprinting hashes seven values that have
to agree with each other, and the noise people add to break that hash is also the
easiest way to fail the checks built to catch noise. A detector does not need your
value to be unusual, it only needs one place where a silent buffer stops being silent,
a predictable opening stops being predictable, or two reads of the same identity
disagree.
Guard those three spots before adding anything, or skip the noise entirely. Silence
stays silent. The opening samples stay untouched. The same seed reads the same buffer
twice. On this measurement, the honest, un-noised answer already matched what every
other real installation of that browser produces, and matching the crowd turned out to
be the safer position.
## Short answers to the questions that lead here
**Can I just disable AudioContext?** You can, and then you have a browser without the
Web Audio API, which every real browser has. That is a stronger signal than any hash.
**Do the privacy extensions that randomise audio work?** They stop the hash being
stable, which is what they promise. They also generally randomise per call and put
noise in silence, both of which are detectable in one line. Against tracking, they
help. Against a system asking whether you are tampering, they are the thing it finds.
**Is audio fingerprinting stronger than canvas?** It has less entropy on its own. It is
harder to fake convincingly, because it is seven values that have to agree plus a
render that has to look like it came from the device the other six describe.
**Why does my audio fingerprint differ between headless and headed?** Usually the audio
device. A headless container often has none, so the values fall back to defaults that
say so.
## Sources
- MDN Web Docs on the [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API),
retrieved 2026-08-28, for the oscillator-into-compressor offline rendering pipeline
described above.
- MDN Web Docs on the specific interfaces the seven values come from:
[OfflineAudioContext](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext),
[BaseAudioContext.sampleRate](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/sampleRate),
[AudioContext.outputLatency](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/outputLatency),
[AudioDestinationNode.maxChannelCount](https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode/maxChannelCount),
[AnalyserNode.getFloatFrequencyData()](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatFrequencyData)
and [getFloatTimeDomainData()](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatTimeDomainData),
and [DynamicsCompressorNode.reduction](https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode/reduction),
retrieved 2026-08-28.
- [CreepJS](https://github.com/abrahamjuliot/creepjs), read 2026-08-28, for the
`hasFakeAudio` check and its silence-and-opening-samples tests described above.
- This project's own A/B measurement of the tampering score with the audio noise isolated
as the only variable, on one machine and one identity.
**See also:** [why a FingerprintJS visitor ID changes](fingerprintjs-visitor-id.md),
since the audio hash is one of the components that ID is made of,
[why headless browsers render different fonts](headless-fonts-differ.md)
and [your renderer string says NVIDIA, your pixels say software](renderer-string-vs-render.md),
which are the same "the honest answer describes your machine" problem on other
surfaces, and [how CreepJS decides you are lying](creepjs-explained.md).
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The two scores above are our own A/B, on one
machine and one identity, with the audio noise as the only variable. The feature they
killed was one we wrote.*
@@ -0,0 +1,226 @@
---
title: "AudioContext sampleRate and latency as a fingerprint"
description: "AudioContext.sampleRate, outputLatency and maxChannelCount are read from the audio driver, so a headless server leaks. How a seeded browser keeps them coherent."
parent: "Canvas, WebGL, Fonts and Audio"
grand_parent: "Guides"
nav_order: 13
---
# AudioContext sampleRate and latency as a fingerprint
An `AudioContext` fingerprints a machine before it renders a single sample: `sampleRate`,
`outputLatency` and `destination.maxChannelCount` are read straight from the operating
system's audio driver, so a headless server with no sound hardware answers them with
tell-tale defaults. The defence is not to spoof each number, but to return all three as
one coherent device profile that a real machine could actually have.
Most writing about audio fingerprinting is about the rendered buffer: you run an
`OfflineAudioContext`, hash the samples it produces, and treat that hash as the signal.
That is a real surface and it has [its own page here](audiocontext-fingerprinting.md).
This page is about the other half, the part that needs no rendering at all. Before a
single sample is generated, an `AudioContext` already exposes three plain numbers that
come straight from the operating system's audio stack: `sampleRate`, `outputLatency`,
and `destination.maxChannelCount`. They are cheaper to read than any buffer hash, they
are stable within a session, and on a headless server they are one of the clearest
tells that no real sound hardware is present.
## The three numbers a real audio stack exposes
Open an `AudioContext` on a normal desktop and read four fields:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
profile = page.evaluate("""() => {
const ctx = new AudioContext();
const out = {
sampleRate: ctx.sampleRate,
outputLatency: ctx.outputLatency,
baseLatency: ctx.baseLatency,
maxChannelCount: ctx.destination.maxChannelCount,
};
ctx.close();
return out;
}""")
print(profile)
```
Each of those fields is a question to the driver, not to the browser:
- **`sampleRate`** is the rate the audio device is running at, almost always `44100` or
`48000` Hz. It is decided by the sound card and its driver, not by the page.
- **`outputLatency`** is roughly how long it takes a sample to travel from the graph to
the speaker. It reflects the buffer size the driver negotiated, and it differs between
onboard audio, a USB interface, and a surround setup.
- **`maxChannelCount`** on the destination node is how many output channels the device
can drive: `2` for ordinary stereo, `6` for a 5.1 setup, `8` for 7.1.
None of these is an automation flag. They are hardware facts, and that is exactly what
makes them useful to a detector: JavaScript cannot invent a sound card it does not have.
## Why the values have to agree with each other
The trap here is not any single value being unusual. Every one of these numbers, taken
alone, is common. The signal is in the combination.
Real devices come in a small number of shapes. Onboard laptop audio tends to run stereo
at 48000 Hz with a modest latency. A cheap USB headset might report 44100 Hz. A discrete
sound card feeding a 5.1 receiver reports six channels and a latency in a range that
matches a card built for that job. What you never see on real hardware is the
cross-product: a `maxChannelCount` of 6 paired with the sample rate and latency of a
thin laptop codec, because no such device exists.
That cross-value contradiction is precisely what a consistency-minded detector looks
for, and it is the same class of check that catches a Windows user agent over a Linux
font set, or [hardware concurrency and device memory](hardware-concurrency-device-memory.md)
that pair oddly with the machine being claimed. A fingerprint is not a list of values,
it is a set of relationships, and the relationships are where a naive spoof falls apart.
## What a headless container reports instead
Run the same three reads inside a server container with no sound hardware and you get one
of two failure shapes, both of them loud.
The first is a null audio backend: the context comes back with a default sample rate and
a latency that is suspiciously round or zero, the same on every container image, because
there is no driver underneath negotiating anything. A value that is byte-identical across
thousands of visitors is not neutral, it is a cohort.
The second is worse. Some headless setups fail to construct the context at all, or
suspend it immediately, so the page sees a `state` that never reaches `running`. As with
every other surface, [an empty or blocked result is itself a signal](how-to-test-bot-detection.md),
not a clean pass. A detector that records suppression by name counts the absence against
you exactly as it would count a wrong value.
This is the same reason [an empty speech-voice list](speech-synthesis-voices.md) gives a
server away: both audio output and installed voices are reads into the operating system,
and a datacenter answers them with defaults that say "datacenter".
## How this browser keeps the profile coherent
The fix is not to pick three plausible numbers independently, because independent draws
are what produce the impossible device. The engine returns all three together as one
coherent profile, chosen for the session from a small set of real device archetypes, so
the values always describe a machine that could actually exist:
| Device archetype | `sampleRate` | `outputLatency` | `maxChannelCount` |
|---|---|---|---|
| Plain stereo desktop | 44100 Hz | around 40 ms | 2 |
| USB audio interface | 48000 Hz | lower, near 30 ms | 2 |
| 5.1-capable sound card | 48000 Hz | near 40 ms | 6 |
Each row is a machine that exists; the impossible combinations between rows are the ones a
detector is looking for.
Because the whole profile is keyed off the session seed, a six-channel destination never
lands next to a laptop's latency, and the same seed reproduces the same audio device on
every run. The three fields move as a unit, which is the property the detector is testing
for. This is the general principle these patches follow: the goal is to look like a real
machine, not merely to avoid an obvious default, and a suppressed or arbitrary value
fails that goal as surely as a wrong one.
## Measuring it yourself with a fixed seed
The point of a seed is that a finding is reproducible. Read the profile under two seeds
and confirm two things at once: that each profile is internally coherent, and that the
same seed returns the same device every time.
```python
from invisible_playwright import InvisiblePlaywright
READ = """() => {
const ctx = new AudioContext();
const out = [ctx.sampleRate, ctx.destination.maxChannelCount,
Math.round((ctx.outputLatency || 0) * 1000)];
ctx.close();
return out;
}"""
for seed in (42, 1337):
with InvisiblePlaywright(seed=seed) as browser:
page = browser.new_page()
page.goto("https://example.com")
rate, channels, latency_ms = page.evaluate(READ)
print(f"seed={seed}: {rate} Hz, {channels} ch, ~{latency_ms} ms")
```
Two checks turn this into evidence rather than a single reading:
1. **Run each seed twice.** The tuple must be identical across runs of the same seed. If
it drifts, something is randomising per call, which is
[the cheapest tampering check a detector has](audiocontext-fingerprinting.md).
2. **Sanity-check the pairing by hand.** Six channels should never appear beside a
latency that belongs to onboard stereo. If it does, you have found the exact
contradiction this section exists to prevent.
Compare the output to a stock Firefox on the same machine and you will see the shape of
the guarantee: the stock browser reports your real card, the seeded browser reports a
coherent invented one, and neither reports the round, hardware-free defaults a bare
container does. If you need a specific device rather than a seed-derived one,
[pinning a field](pinning.md) leaves the rest of the identity untouched.
## Conclusion
`sampleRate`, `outputLatency` and `maxChannelCount` are read straight from the OS audio
driver, which means a headless server has nothing truthful to say through them and a
careless spoof says something impossible. The buffer hash gets all the attention, but
these three static numbers are read first and cost nothing to check. Treating them as one
coherent device profile, reproducible from a seed, is what keeps a six-channel count from
ever sitting next to a laptop's latency, and that pairing is the thing a consistency check
is actually built to find.
## Short answers to the questions that lead here
**What is AudioContext.sampleRate and can I change it from JavaScript?** It is the rate
the audio device runs at, `44100` or `48000` Hz, read from the driver. Page JavaScript
cannot change it truthfully; only the engine underneath can decide what the read returns.
**Why does my headless server report the same audio values on every run?** Because there
is no sound hardware, so the context falls back to a fixed default. Identical values
across every container are a cohort, not a clean fingerprint.
**Is outputLatency a reliable fingerprinting signal?** On its own, weakly. In combination
with sample rate and channel count it is strong, because only certain triples correspond
to devices that actually exist.
**What does maxChannelCount reveal?** How many output channels the device can drive: 2 for
stereo, 6 for 5.1, 8 for 7.1. A value that contradicts the latency and rate is the tell.
**How do I make these values consistent with each other?** Do not draw them
independently. Pick a real device archetype and take all three from it, which is what a
seed-derived profile does automatically.
**Will an empty or suspended AudioContext pass a detector?** No. A blocked or suppressed
read is recorded as its own signal, so an absent value fails the same way a wrong one
does.
## Sources
- W3C Web Audio API specification, which defines `sampleRate`, `baseLatency` and
`outputLatency` on `AudioContext` and `maxChannelCount` on the destination node:
[www.w3.org/TR/webaudio/](https://www.w3.org/TR/webaudio/).
- MDN Web Docs on the same properties, read from the engine rather than from any single
detector's rendering of them:
[AudioContext.sampleRate](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/sampleRate),
[AudioContext.outputLatency](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/outputLatency),
and [AudioDestinationNode.maxChannelCount](https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode/maxChannelCount).
- This project's own audio patches and their release notes, which choose the three static
audio properties together as one coherent device profile so the values never contradict
each other.
**See also:** [AudioContext fingerprinting](audiocontext-fingerprinting.md) for the
rendered-buffer side of the same surface, [why getVoices() comes back empty](speech-synthesis-voices.md)
for the other operating-system read that gives a server away, and
[the checklist for being detected on one site](playwright-detected-as-bot.md) for where
the audio device sits in the order you should debug.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The audio device is one of
the machine tells no page-level plugin can reach, which is why it is solved in the engine.*
@@ -0,0 +1,287 @@
---
title: "Automating an Email OTP / Verification-Link Login with Playwright"
description: "Poll your own inbox over IMAP mid-login, parse the one-time code or magic link, and feed it back into the same browser session that requested it - for testing your own application's login flow."
parent: "Scraping with Playwright"
grand_parent: "Guides"
nav_order: 146
---
# Automating an Email OTP / Verification-Link Login with Playwright
This page is about a specific, ordinary automation need: your own application, or an
account you control, sends a one-time code or a magic link by email as part of login,
and a test or a script needs to complete that flow end to end without a human
watching an inbox. That is a normal thing to automate, the same category of work as
[reusing a saved session](automating-login-vs-session-reuse.md) or
[scraping behind a login](how-to-scrape-behind-login-playwright.md) - it is not about
getting into an account that is not yours, and nothing here assumes or requires that.
The pattern is three steps done in order, inside one browser session: trigger the send,
poll the mailbox until the message arrives, extract the code or link and hand it back
to the same page that asked for it. The part people get wrong is usually not the code,
it is the timing and the identity: polling too aggressively, or redeeming the code from
a different browser session than the one that requested it.
## The shape of the flow
```python
import time
from invisible_playwright import InvisiblePlaywright
SEED = 42
with InvisiblePlaywright(seed=SEED) as browser:
page = browser.new_page()
page.goto("https://example.com/login")
page.fill("#email", "you@example.com")
sent_at = time.time() # mark the moment before triggering the send
page.click("#send-code")
code = fetch_code_from_inbox(sent_at) # poll the mailbox; see below
page.fill("#otp", code)
page.click("#verify")
page.wait_for_url("https://example.com/account")
```
Everything downstream depends on `sent_at`: without a timestamp marking "before the
request," you have no way to tell a fresh code from a stale one already sitting in the
inbox from a previous run.
## Step 1: trigger the send, then start the clock
Nothing unusual here - it is an ordinary form fill and click, the same as any other
login automation. The only detail worth keeping is recording the time immediately
before the click, not after, since network latency on the click itself can matter
when you are about to poll a mailbox on a short timeout.
## Step 2: poll the inbox with imaplib
Python's standard library `imaplib` module is enough for this; nothing extra to
install. Its own documentation describes it plainly:
> "This module defines three classes, `IMAP4`, `IMAP4_SSL` and `IMAP4_stream`, which
> encapsulate a connection to an IMAP4 server and implement a large subset of the
> IMAP4rev1 client protocol as defined in RFC 3501."
Use `IMAP4_SSL` for the connection, and pass an explicit SSL context instead of the
default one - the standard library is direct about why:
> "With the default ssl_context, the connection is encrypted but the server certificate
> and hostname are not verified. To verify them, pass a context created by
> ssl.create_default_context()."
```python
import imaplib
import email
import re
import ssl
import time
def extract_text(msg):
# the plain-text part of a possibly multipart message
if msg.is_multipart():
for part in msg.walk():
if part.get_content_type() == "text/plain":
return part.get_payload(decode=True).decode(errors="replace")
return ""
return msg.get_payload(decode=True).decode(errors="replace")
def fetch_code_from_inbox(sent_at, timeout_s=60, poll_every_s=2):
ctx = ssl.create_default_context()
deadline = time.time() + timeout_s
while time.time() < deadline:
conn = imaplib.IMAP4_SSL("imap.example.com", ssl_context=ctx)
conn.login("you@example.com", "app-specific-password")
conn.select("INBOX")
# UNSEEN keeps this from re-matching an old code from a previous run
typ, data = conn.search(None, "UNSEEN", "SUBJECT", '"Your verification code"')
ids = data[0].split()
for msg_id in reversed(ids): # newest first
typ, msg_data = conn.fetch(msg_id, "(RFC822)")
msg = email.message_from_bytes(msg_data[0][1])
received = email.utils.parsedate_to_datetime(msg["Date"]).timestamp()
if received < sent_at - 5: # a few seconds of clock slack
continue
body = extract_text(msg)
match = re.search(r"\b(\d{6})\b", body)
if match:
conn.logout()
return match.group(1)
conn.logout()
time.sleep(poll_every_s)
raise TimeoutError("no verification code arrived in time")
```
A few details that matter more than they look like they should:
- **Search `UNSEEN`, and filter by time, not just presence.** A test inbox
accumulates old codes; matching "the newest message with the right subject" without
a time check will occasionally hand you yesterday's code, which then fails
verification for a confusing reason.
- **This is polling, not push.** IMAP has no notification mechanism in the basic flow
above; you are asking the server "anything new?" on an interval.
[`IMAP4.idle()`](https://datatracker.ietf.org/doc/html/rfc2177) exists for a
push-like wait on servers that support the `IDLE` extension, but a short poll loop
is simpler to reason about and is fine for this use case.
- **Most mail providers now require an app-specific password or an OAuth token for
IMAP access, not the account's normal login password.** That is a one-time setup
step outside Playwright entirely, and which one your provider needs is worth
checking before wiring this up, since it is unrelated to anything in this page.
- **A test-email API is a reasonable alternative to a real mailbox**, particularly in
CI where you do not want a persistent inbox at all. Several providers expose a
disposable inbox over a plain REST API instead of IMAP - poll an HTTP endpoint for
new messages the same way the loop above polls IMAP, then apply the same
time-filtering and parsing logic to whatever it returns.
## Step 3: parse the code or the link
Extracting a numeric code is a regex against the plain-text body, as above. A magic
link needs one extra step: pull the href out of the HTML part rather than the
plain-text alternative, since some providers only put a clickable link in the HTML
version of the message.
```python
from bs4 import BeautifulSoup
def extract_magic_link(msg):
for part in msg.walk():
if part.get_content_type() == "text/html":
soup = BeautifulSoup(part.get_payload(decode=True), "html.parser")
link = soup.find("a", string=re.compile("verify|confirm|sign in", re.I))
if link:
return link["href"]
return None
```
One thing worth checking before trusting the extracted URL: some sending platforms
wrap the real link behind their own click-tracking redirect, so the `href` you pull
out of the HTML is not the destination URL itself, it is a tracking link that
redirects to it. That is fine to navigate directly - Playwright follows redirects the
same as any browser - but do not assume the string you extracted is the final URL if
you are trying to match it against something else, like an expected domain.
## Step 4: feed it back into the same session, not a new one
This is the part that actually matters for the automation to keep working reliably,
and it is easy to get wrong by treating steps 1 through 3 as a separate script from
step 4.
The browser that requested the code and the browser that redeems it have to be the
same session: same context, same seed-derived fingerprint, same proxy exit, ideally
the same page object still sitting on the login form. A login flow that requests a
code from one machine's fingerprint and then submits it from a different one is
exactly the cross-session mismatch a fingerprint-aware login already watches for, the
same argument made in full on
[why automating login is riskier than reusing a session](automating-login-vs-session-reuse.md):
replaying credentials from a different fingerprint asks the site to believe the same
identity's GPU, canvas hash and TLS handshake all changed mid-flow, independent of
whether the code itself is genuine.
In practice this means: do not send the code request, close the browser, run a
separate mail-fetching script, then open a *new* Playwright session to submit the
code. Keep the browser open across the whole thing, poll the inbox in the same
process, and submit the result into the same `page` object, as the first code block on
this page does. If a magic link is what arrived instead of a code, navigate the same
page to it rather than opening it in a fresh context:
```python
page.goto(magic_link) # same page, same identity that requested it
page.wait_for_url("https://example.com/account")
```
## Timing: the budget you are actually working against
Two failure directions, and you need a plan for both. Poll too fast and you risk
hitting your mail provider's own rate limit on IMAP logins, which is a real and
separate throttling layer from anything Playwright touches. Poll too slow, or set too
generous a total timeout, and you risk the code or link expiring before you use it -
some verification links expire in under two minutes, tighter than the 5 to 15 minutes
common for numeric codes. Set an explicit total timeout, back off between polls rather
than hammering the server every few hundred milliseconds, and treat a timeout as an
expected outcome your code handles, not an exception you were not expecting - the same
budget-first thinking as
[retrying failed requests with a total time-and-attempt cap](how-to-retry-failed-requests-playwright.md).
## Conclusion
An email OTP or magic-link login automates in three ordinary steps: trigger the send
with a timestamp, poll the inbox with `imaplib` (or a disposable-inbox API) filtered
by that timestamp, and feed the result back into the same browser session that
requested it. The mechanics are standard library code; the part worth being careful
about is keeping the request and the redemption in one identity, and budgeting the
poll loop against both a rate limit on one side and an expiring code on the other.
None of this reads or touches an inbox you do not have legitimate access to - it
automates a flow you are testing, the same way a saved session automates skipping a
login form you already have credentials for.
## Short answers to the questions that lead here
**How do I automate a login that emails a one-time code?** Trigger the send, poll your
inbox with `imaplib` filtered to messages received after the request, extract the code
with a regex, and fill it into the same page that requested it.
**Do I need a real mailbox, or can I use a test-email service?** Either works. A real
IMAP mailbox with an app-specific password is the direct route; many providers also
offer a disposable inbox reachable over a plain REST API, useful in CI where you do
not want a persistent account.
**Why did the login get flagged even though the code was correct?** Most likely the
code was requested and redeemed from two different browser sessions with two
different fingerprints. Keep the whole flow, request through redemption, inside one
Playwright session with one seed.
**How long should I poll before giving up?** Set an explicit total timeout rather than
polling forever, and back off between attempts. Codes and links both expire, some
links in under two minutes, so budget for that rather than assuming you have plenty of
time.
**My IMAP login fails even with the right password. Why?** Most mail providers now
require an app-specific password or an OAuth token for IMAP access rather than the
normal account password. That is a setup step outside Playwright.
**How do I handle a magic link instead of a numeric code?** Extract the href from the
HTML part of the message (plain text often omits it), then `page.goto()` that URL in
the same session that requested it.
**Is this the same thing as bypassing a site's verification?** No. This automates a
flow you have legitimate access to, the same category as reusing a saved login session
- it does not solve a challenge meant to keep automation out, and it requires an
inbox and credentials that are actually yours.
## Sources
- The Python standard library's [`imaplib` documentation](https://docs.python.org/3/library/imaplib.html),
retrieved 2026-08-30, for the module description and the `IMAP4_SSL`,
`search()` and `fetch()` signatures used above, and for the explicit note that the
default SSL context does not verify the server certificate or hostname.
- [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501.html), the IMAP4rev1
protocol `imaplib` implements, for `UNSEEN` as a defined search key.
- This project's own notes on session and fingerprint consistency, linked throughout,
for why the request and the redemption belong in one identity.
**See also:** [Automating TOTP-Based 2FA Login with Playwright](automating-totp-2fa-login-playwright.md)
for the other common second-login-step mechanism, a locally computed authenticator
code with no inbox and no polling involved at all, [Why automating login is riskier
than reusing a session](automating-login-vs-session-reuse.md)
for the fingerprint-consistency argument this page depends on,
[how to scrape data behind a login with Playwright](how-to-scrape-behind-login-playwright.md)
for the end-to-end session-reuse pattern this flow feeds into, and
[how to retry failed requests when scraping with Playwright](how-to-retry-failed-requests-playwright.md)
for the same total-budget thinking applied to a poll loop instead of a request retry.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The code arriving is the easy part; keeping the
browser that asked for it and the one that spends it as the same machine is the part
worth writing down.*
+148
View File
@@ -0,0 +1,148 @@
---
title: "Why automating login is riskier than reusing a session"
description: "Automating a login form runs the most monitored flow on most sites. Reusing a saved session skips it, if the fingerprint still matches the one that logged in."
parent: "The Automation Layer"
grand_parent: "Guides"
nav_order: 12
---
# Why automating login is riskier than reusing a session
**Automating a login form is riskier than reusing a session because the login form is
the single most heavily monitored flow on most sites, and reusing a saved session avoids
that flow entirely.** The catch is that a reused session only holds if the browser
fingerprint still matches the one that created it.
A script that fills a username, types a password and clicks submit looks like the
obvious way to get an automated session logged in. It is also, on most sites, the
single most heavily instrumented sequence of actions a visitor can perform - the exact
place account-takeover and credential-stuffing defenses concentrate, because that is
where they matter most for the site.
This page explains why that flow draws the most scrutiny, how session reuse skips it,
and the one condition - fingerprint consistency - that decides whether a reused session
keeps working.
## Automating the login form vs reusing a session: which is safer
Reusing a saved session is safer on most sites, because it never runs the login form -
the flow where abuse defenses are strongest - and instead starts already authenticated,
the way a returning visitor does. Automating the form can work, but it runs directly
into the site's most aggressive checks.
| | Automate the login form | Reuse a saved session |
|---|---|---|
| What runs | Username, password, submit: the most monitored flow | No login flow; the session starts authenticated |
| Scrutiny | Highest on the site | Same as any returning visitor |
| Main dependency | Human-like timing, focus order, pointer motion | Fingerprint matching the session's original |
| Fails when | Any automation signal is caught at the form | The fingerprint or exit country changes |
## Why the login flow specifically gets more scrutiny than the rest of the site
Most pages on a site are read by anyone. A login form is different: it is the one
place where getting it wrong has a direct cost to the operator, so it is where fraud
and abuse defenses get the most investment, updated the most often, and tuned the most
aggressively. A page that flags automation loosely everywhere else often flags it
tightly at the one form that asks for credentials.
That means every automation-detectable signal on this site - the timing between
keystrokes, whether the pointer travelled to the field or teleported, whether a field
was focused before it was filled, the rhythm between filling the form and submitting
it - gets checked hardest at exactly the moment a login script runs it.
## The alternative: don't run the flow at all
Playwright's [`storage_state`](https://playwright.dev/python/docs/api/class-browsercontext#browser-context-storage-state)
captures cookies and local storage from a context and can load them into a new one.
Log in once, by hand or through a session you trust,
[save and reuse that state](save-reuse-login-storage-state-playwright.md), and every
subsequent automated session starts already authenticated - no username field, no
password field, no submit click, and none of the scrutiny attached to that specific
sequence.
```python
# once, from a session that actually logged in
context.storage_state(path="session.json")
# every run after that
context = browser.new_context(storage_state="session.json")
```
This is not a workaround. It is the same mechanism a real returning visitor uses:
nobody who logged into a site yesterday retypes their password today, they carry a
session cookie that says who they already are. An automated session doing the same
thing is not imitating unusual behaviour, it is doing what every session that isn't a
first-time login already does.
## The condition this depends on, and it is not optional
A session was created by a specific browser, on a specific machine, presenting a
specific fingerprint at the moment of login. Replaying that session's cookies from a
different fingerprint is asking a site to believe that the same identity suddenly
changed its GPU, its font list, its canvas output and its TLS handshake between one
request and the next - which is exactly the kind of cross-session inconsistency
[a detector is built to catch](timezone-proxy-mismatch.md), regardless of whether the
cookie itself is genuinely valid.
Sites that bind a session to more than a cookie - checking the fingerprint against
what was recorded at login, not just validating the token - will flag or invalidate a
replayed session on a mismatched machine even though the credential is real. The
cookie proves who logged in. It does not, on its own, prove the request came from the
same browser that did.
The practical requirement follows directly: the fingerprint has to stay the same
across the login and every session that reuses it. [A profile tied to one seed](persistent-profiles.md)
is what makes that possible - the identity that logged in and the identity replaying
the cookie later are the same one, not two that happen to share a token.
## What to actually do
1. **Log in once**, through a session using the exact identity - seed, profile, proxy
country - you intend to keep using.
2. **Save `storage_state` immediately after**, while the session is fresh.
3. **Reuse it from a context built with the same identity**, not a fresh or different
one. The cookie and the fingerprint are a pair; only one half being right is not
enough.
4. **Treat expiry as certain, not exceptional.** Sessions end. Build the re-login path
once, using the same identity, rather than improvising it the first time a saved
session stops working.
## Short answers to the questions that lead here
**Is it safe to automate a login form at all?** It works, and it is the highest-scrutiny
sequence on most sites. If a session can be captured and reused instead, that avoids
the scrutiny rather than trying to survive it.
**Does a valid session cookie guarantee I won't be flagged?** No. A cookie proves a
credential. Some sites separately check whether the fingerprint replaying it matches
the one that created it, and a mismatch there is checked independently of whether the
token itself is genuine.
**Can I use one saved session across different machines or proxies?** Not safely if
the fingerprint or exit country changes. The session and the identity that created it
are a pair for exactly the same reason [a proxy and a timezone have to agree](timezone-proxy-mismatch.md).
**What happens when the saved session expires?** The automation needs a real
re-authentication path, through the same identity that created the original session,
not a different one improvised under pressure.
**See also:** [Save and reuse login with storage_state in Playwright](save-reuse-login-storage-state-playwright.md),
for the practical capture-and-reuse steps;
[Playwright persistent profile: what it fixes and breaks](persistent-profiles.md), for
the identity half of this pairing;
[how to scrape data behind a login with Playwright](how-to-scrape-behind-login-playwright.md),
for the end-to-end flow; and
[human-like pointer motion](human-mouse-movement.md), for what the login flow itself
checks when there is no way to avoid running it.
## Sources
- Playwright's own [`storage_state` / `storageState`](https://playwright.dev/python/docs/api/class-browsercontext#browser-context-storage-state)
API, for the session capture and reuse mechanism described above.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level, on why the safest login is usually the one that
never runs as automation at all.*
@@ -0,0 +1,273 @@
---
title: "Automating TOTP-Based 2FA Login with Playwright"
description: "Generate a time-based one-time code with pyotp from the same shared secret an authenticator app would scan as a QR code, and feed it straight into the login form. No inbox, no polling, no IMAP - for testing your own application's 2FA flow."
parent: "Scraping with Playwright"
grand_parent: "Guides"
nav_order: 147
---
# Automating TOTP-Based 2FA Login with Playwright
This page is about a specific, ordinary testing need: your own application, or an
account you control, has authenticator-app two-factor authentication turned on,
and a test or a script needs to complete the login end to end without a human
opening Google Authenticator or Authy on a phone. The mechanism is cryptographic,
not network-based: a time-based one-time password (TOTP) is computed on the spot
from a shared secret you already hold, the same secret an authenticator app would
have scanned as a QR code the day 2FA was set up. Nothing here assumes or requires
access to an account that is not yours, and the whole point of writing this down
is to keep the automation scoped to accounts you actually control.
## This is not the email-OTP page, on purpose
If you came here from [automating an email OTP or magic-link
login](automating-email-otp-verification-login-playwright.md), the two pages solve
the same category of problem, "get past a second login step," with genuinely
different mechanics, and it is worth being explicit about which one your situation
actually needs.
| | Email OTP / magic link | TOTP authenticator |
|---|---|---|
| Where the code comes from | The site generates and emails it *after* you trigger the send | You generate it yourself, locally, from a secret you already hold |
| What you need on hand | IMAP credentials, or a test-inbox API | Nothing but the shared secret and a library |
| Timing model | Poll a real mailbox against a deadline; codes can take seconds to arrive and can expire in minutes | Instant; no network call, no waiting, no inbox at all |
| Failure mode | Mailbox rate limits, expired links, stale messages from old runs | Clock drift between your machine and the server, a mismatched digit/period setting |
The email-OTP page spends most of its length on `imaplib`, timestamps, and polling
loops, because the hard part there is coordinating with a mailbox on the network.
None of that exists here. If your two-factor step involves opening a mail client,
you want that page. If it involves an authenticator app and a 6-digit code that
refreshes every 30 seconds, you want this one.
## The shape of the flow
```python
import pyotp
from invisible_playwright import InvisiblePlaywright
SEED = 42
TOTP_SECRET = "JBSWY3DPEHPK3PXP" # the same secret your authenticator app holds
with InvisiblePlaywright(seed=SEED) as browser:
page = browser.new_page()
page.goto("https://example.com/login")
page.fill("#email", "you@example.com")
page.fill("#password", "your-password")
page.click("#sign-in")
page.wait_for_selector("#totp-code") # the 2FA step actually appeared
code = pyotp.TOTP(TOTP_SECRET).now()
page.fill("#totp-code", code)
page.click("#verify")
page.wait_for_url("https://example.com/account")
```
There is no step 2 that waits on anything external. `pyotp.TOTP(TOTP_SECRET).now()`
returns a code synchronously, in microseconds, because it is a computation, not a
request.
## Where the secret comes from
The shared secret is not something you invent; it is the same value your own
application generated when you (or a test account you control) turned on
authenticator-app 2FA. During that setup flow, most applications show a QR code
and, next to it, a plain-text fallback string for anyone whose phone camera does
not work. That fallback string is a base32-encoded secret, and it is exactly what
an authenticator app decodes out of the QR code before storing it. Google's own
specification for the format authenticator apps read, the `otpauth://` URI scheme,
states it directly: the QR code encodes a URI whose `secret` parameter is "an
arbitrary key value encoded in Base32," and that URI is "what get[s] converted
into QR codes during the setup process for authenticator applications." Capture
that string once, during your own account's enrollment, store it the way you would
store any other test credential, and `pyotp.TOTP(secret)` consumes it identically
to how a phone's authenticator app would.
```python
import pyotp
# provisioning_uri() is what you would render as a QR code for a human;
# reading the same secret directly is what a script needs instead.
secret = pyotp.random_base32()
uri = pyotp.totp.TOTP(secret).provisioning_uri(name="you@example.com", issuer_name="Example App")
print(uri) # otpauth://totp/Example%20App:you%40example.com?secret=...&issuer=Example%20App
```
Do not try to re-derive the secret from a screenshot of the QR code on every test
run. Capture it once, during setup, the same way you would capture a password.
## Generating the code
[PyOTP's own documentation](https://pyotp.readthedocs.io/en/stable/) describes the
library plainly: it generates and verifies one-time passwords for two-factor and
multi-factor authentication. The call that matters is one line:
```python
import pyotp
totp = pyotp.TOTP(secret)
code = totp.now() # e.g. "492039"
```
`.now()` computes the code for the current 30-second window and returns it as a
string. There is no client-server round trip anywhere in this call; the entire
value is derived from the secret and the current time.
### The algorithm, briefly
TOTP is defined in [RFC 6238](https://datatracker.ietf.org/doc/html/rfc6238) as a
time-based variant of HOTP (RFC 4226), the counter-based one-time-password
algorithm. The RFC states the relationship directly: `TOTP = HOTP(K, T)`, where
`T` is a moving factor computed as `(Current Unix time - T0) / X`, with `X` the
time step, 30 seconds by default, and `T0` the Unix epoch. In plain terms: instead
of HOTP's incrementing counter, TOTP uses "which 30-second slice of time is it
right now" as the counter, and HMACs that against the shared secret the same way
HOTP always has. Both your script and the server computing the same thing from the
same secret and the same clock arrive at the same 6-digit code, which is the whole
mechanism 2FA setup relies on, and the whole reason no network call is involved on
either generation or verification.
### Matching digits, algorithm and period to what the site actually issued
`pyotp.TOTP()` defaults to 6 digits, SHA1, and a 30-second period, which matches
the overwhelming majority of sites' authenticator-app implementations. If your
target application's enrollment page shows different values, in an advanced setup
screen or in the raw `otpauth://` URI, pass them explicitly:
```python
import hashlib
totp = pyotp.TOTP(secret, digits=8, digest=hashlib.sha256, interval=60)
```
A code generated with the wrong digit count, algorithm or interval will not match
what the server expects, and this looks identical to "the automation is broken"
from the outside. Read the parameters out of the actual `otpauth://` URI your
application issued rather than assuming the defaults.
## Clock drift and reuse, the two real failure modes
Two practical issues account for nearly every TOTP automation failure that is not
a plain wrong secret.
**Clock drift.** TOTP's whole security model rests on both sides agreeing what
time it is. If the machine running your script and the server verifying the code
disagree by more than roughly one time step, the code you generate is for the
wrong window and gets rejected as invalid even though the secret is correct.
`pyotp.TOTP.verify()` accepts a `valid_window` argument specifically for this: it
checks the current window plus a configurable number of windows on either side,
which is the standard tolerance most real verifiers apply server-side too. If
you are generating and submitting the code yourself rather than verifying it, the
practical fix is keeping the machine running the automation on synced NTP time,
not widening a window you do not control on the server end.
**Code reuse inside the same window.** Some applications reject submitting the
same TOTP code twice, even if it is still numerically valid, as a replay defense.
If a test suite runs the login flow twice in quick succession and happens to land
in the same 30-second window both times, the second attempt can fail for a reason
that has nothing to do with the code being wrong. This is intermittent by nature,
tied to wall-clock timing rather than your code, and the fix is either spacing
runs apart or, if the site's session allows it, not re-authenticating a fresh TOTP
challenge more than once per window in automated test loops.
## Storing the secret safely
The shared secret is a long-lived credential, not a one-time value; anyone who has
it can generate valid codes for as long as 2FA stays configured with it. Treat it
the way you would treat a password: an environment variable or a secrets manager
in CI, never a literal string committed to a repository. This is the same
housekeeping any other test credential needs, and it is worth stating because a
TOTP secret is easy to underestimate: unlike a password, it never gets rotated by
a failed-login lockout, so a leaked one stays valid indefinitely.
## Conclusion
TOTP-based 2FA automates in two lines once you have the secret: `pyotp.TOTP(secret).now()`
to compute the current code, and a `page.fill()` into whatever field the login
form shows for it. The mechanism is entirely local and cryptographic, RFC
6238's HMAC-over-time-step algorithm, with no inbox, no IMAP connection, and no
polling loop anywhere in it, which is the whole difference from [the email-OTP
flow](automating-email-otp-verification-login-playwright.md) this page is most
often confused with. The parts worth being careful about are capturing the secret
once during your own account's real enrollment rather than trying to re-scan a QR
code every run, matching the digit count, algorithm and period the site actually
issued, and keeping the automation's clock in sync so the code you compute lands
in the same window the server checks against.
## Short answers to the questions that lead here
**How do I automate a login protected by an authenticator app?** Get the shared
secret from your own account's 2FA enrollment (the base32 string next to the QR
code), then call `pyotp.TOTP(secret).now()` to generate the current code and fill
it into the login form, in the same script, right after triggering the login.
**Is this the same as automating an email OTP login?** No. [Email OTP](automating-email-otp-verification-login-playwright.md)
requires triggering a send and polling a real mailbox over IMAP until the code
arrives. TOTP requires no network call at all: you already hold the secret, and
the code is computed instantly and locally from it and the current time.
**Where do I get the TOTP secret in the first place?** From your own account's 2FA
setup screen, the same base32 string an authenticator app decodes out of the QR
code. Capture it once during enrollment and store it like any other credential;
do not try to re-derive it from a screenshot on every run.
**Why does the generated code get rejected even though the secret is right?**
Almost always clock drift between the machine generating the code and the server
verifying it, or a mismatch in digits, hash algorithm or time-step length against
what the site actually issued. Check both before assuming the secret itself is
wrong.
**Can I run the login twice in a row with the same code?** Some applications
reject reusing a TOTP code inside the same 30-second window as a replay defense,
independent of whether the code is still numerically valid. Space repeated
automated logins apart if you see intermittent rejections tied to timing.
**Is this a way to get into an account that is not mine?** No. It only works
against an account whose 2FA you set up yourself and whose secret you hold. The
technique automates a flow you already have legitimate access to, the same
category as reusing a saved session or automating an email OTP for your own
inbox; it does not solve, guess or bypass anything, and it is worthless against a
secret you were never given.
## Sources
- [PyOTP's own documentation](https://pyotp.readthedocs.io/en/stable/) and its
[GitHub repository](https://github.com/pyauth/pyotp), for the `TOTP` class,
`.now()`, `.verify()` and `valid_window`, and `provisioning_uri()`, retrieved
2026-08-30.
- [RFC 6238](https://datatracker.ietf.org/doc/html/rfc6238), "TOTP: Time-Based
One-Time Password Algorithm," for the `TOTP = HOTP(K, T)` definition and the
`T = (Current Unix time - T0) / X` moving-factor formula, retrieved 2026-08-30.
- [RFC 4226](https://datatracker.ietf.org/doc/html/rfc4226), the HOTP algorithm
TOTP extends with a time-derived counter in place of an incrementing one.
- Google's [Key Uri Format](https://github.com/google/google-authenticator/wiki/Key-Uri-Format)
specification, for the `otpauth://` URI scheme, the base32 `secret` parameter,
and its role as what actually gets encoded into a 2FA setup QR code, retrieved
2026-08-30.
- Checkly's own [How to Bypass Time-Based 2FA Login Flows With
Playwright](https://www.checklyhq.com/docs/learn/playwright/bypass-totp/),
verified live this session, for a real, independent walkthrough of the same
generate-then-fill pattern (using the JavaScript `otpauth` library against a
personal GitHub account's own TOTP secret, explicitly scoped to an account the
reader already controls).
- Playwrightsolutions.com's [Playwright Login Test With Two Factor Authentication
(2FA) Enabled (TOTP)](https://playwrightsolutions.com/playwright-login-test-with-2-factor-authentication-2fa-enabled/),
verified live this session, for another independent practitioner writeup of the
same mechanism.
**See also:** [Automating an Email OTP / Verification-Link Login with
Playwright](automating-email-otp-verification-login-playwright.md) for the
network-polling variant of "get past a second login step" this page deliberately
does not overlap with, [why automating login is riskier than reusing a
session](automating-login-vs-session-reuse.md) for the fingerprint-consistency
argument that applies to any login automation, and [how to scrape data behind a
login with Playwright](how-to-scrape-behind-login-playwright.md) for the
session-reuse pattern this flow feeds into once the 2FA step is past.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. Generating a code from a secret you already
hold is arithmetic, not automation trickery; the browser's realness has nothing to
do with whether the math is correct, and the whole flow is worthless without a
secret that was legitimately yours to begin with.*
+95
View File
@@ -0,0 +1,95 @@
---
title: "AWS WAF Bot Control, Explained"
description: "AWS WAF Bot Control runs two protection levels: Common blocks self-identifying bots by static analysis, Targeted adds a token-backed challenge/CAPTCHA pipeline with machine-learning rules for coordinated activity. Read from AWS's own docs, rule by rule."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 33
---
# AWS WAF Bot Control, Explained
AWS WAF Bot Control is a managed rule group, not a separate product with its own dashboard and SDK ecosystem the way Akamai or DataDome ship one. You add it to a Web ACL (AWS's term for a firewall policy) the same way you'd add any other managed rule group, and unlike most of the vendors in this corpus, AWS documents its rules by name, in public, with what each one inspects and what action it takes by default. That is unusually specific for this category, and this page leans on it: almost everything below is quoted or closely paraphrased from AWS's own developer guide, not reconstructed from outside reverse engineering.
Read from AWS's own documentation on 2026-08-30.
## Two protection levels, and what separates them
Bot Control ships as one managed rule group, `AWSManagedRulesBotControlRuleSet`, with two inspection levels a site chooses between:
**Common** detects "a variety of self-identifying bots, such as web scraping frameworks, search engines, and automated browsers," using "traditional bot detection techniques, such as static request data analysis." Per AWS's own framing, this level labels the traffic it recognizes and blocks the bots it cannot verify, without needing anything running client-side.
**Targeted** includes everything Common does and adds detection for bots that do not self-identify, meaning nothing in the request announces what it is. Targeted protections, per AWS, "mitigate bot activity using a combination of rate limiting and CAPTCHA and background browser challenges," and require a JavaScript (or mobile) SDK integration on the protected site, because the targeted rules read information the SDK collects and attaches to a **token**, not just the raw request.
Two sub-families of targeted rules are named directly by their prefix. Rules beginning `TGT_` use "browser interrogation, fingerprinting, and behavior heuristics." Rules beginning `TGT_ML_` are AWS's machine-learning layer specifically: "automated, machine-learning analysis of website traffic statistics to detect anomalous behavior indicative of distributed, coordinated bot activity," built from traffic statistics like timestamps, browser characteristics, and previous URL visited. AWS states plainly that ML is on by default for Targeted but can be turned off, in which case those rules simply do not evaluate.
## The token: what ties a session's evidence together
Targeted detection runs on a **token**, generated by the JavaScript or mobile SDK and carried on subsequent requests, and AWS's rules read the token's state instead of re-deriving everything from scratch on every request. Two labels attached to every token matter most:
- `awswaf:managed:token:id:{{identifier}}`, a session identifier tied to the specific token in use, changing if the client acquires a new one.
- `awswaf:managed:token:fingerprint:{{fingerprint-identifier}}`, a browser fingerprint AWS computes from client signals, which "stays the same across multiple token acquisition attempts" and is explicitly "not unique to a single client," AWS's own words for a value meant to identify a device class, not a specific visitor.
A token can be `accepted` (present, with a valid, unexpired challenge or CAPTCHA solution, on the right domain), or `rejected` for one of several named reasons: `rejected:not_solved`, `rejected:expired`, `rejected:domain_mismatch`, or `rejected:invalid`. A request can also be `absent` a token entirely, which is its own label and, at volume, its own rule: `TGT_VolumetricIpTokenAbsent` specifically tracks clients sending five or more requests in five minutes without a valid token and issues a Challenge action once that threshold is crossed.
## What the individual rules actually check
A sample of named rules, quoted from AWS's own rule listing, gives a concrete sense of what "browser interrogation" and "behavior heuristics" mean in practice, not as marketing language:
| Rule | What it inspects | Default action |
|---|---|---|
| `SignalAutomatedBrowser` | Indicators the client browser might be automated | Block |
| `SignalNonBrowserUserAgent` | A user-agent string that does not read as a browser at all | Block |
| `SignalKnownBotDataCenter` | Traffic originating from IP ranges typically used by bots | Block |
| `TGT_SignalBrowserAutomationExtension` | A browser extension that assists automation, e.g. Selenium IDE, present on the client even if unused | CAPTCHA |
| `TGT_SignalBrowserInconsistency` | "Inconsistent browser interrogation data" inside the token | CAPTCHA |
| `TGT_VolumetricSession` | An abnormally high request volume from one client session in a 5-minute window, versus AWS's own traffic baselines | CAPTCHA (Block at maximum confidence) |
| `TGT_ML_CoordinatedActivityLow/Medium/High` | Machine-learning-detected patterns consistent with distributed, coordinated bot activity across many IPs | Challenge / CAPTCHA / CAPTCHA |
| `TGT_TokenReuseIpLow/Medium/High` | The same token reused across more than 2, 5, or 8 distinct IPs in 5 minutes | Count / CAPTCHA / Block |
| `TGT_TokenReuseCountryLow/Medium/High` | The same token reused across more than 1, 2, or 3 countries in 5 minutes | Count / CAPTCHA / Block |
The token-reuse family is worth pausing on: it does not ask whether any single request looks automated, it asks whether one browser's proof-of-legitimacy is being shared across more devices, networks or countries than a single real session plausibly touches in five minutes. That is a detection axis with no fingerprint answer at all, honest or otherwise, because the thing being scored is reuse across sessions, not any property of one session's browser.
AWS is also explicit about a category it treats differently from everything above: a maintained list of verified bots (search engine crawlers, monitoring services, SEO tools) that Bot Control identifies and does not block, adding a `bot:verified` label plus category and organization labels instead. A newer addition, **Web Bot Authentication**, lets a bot cryptographically sign its requests against a public key directory; a verified signature (`web_bot_auth:verified`) causes the category-block and `TGT_TokenAbsent` rules to skip that request entirely, a mechanism for bots that want to identify themselves honestly and be let through, not evade detection.
## What an engine answers honestly, and what a browser cannot touch
`SignalAutomatedBrowser`, `TGT_SignalBrowserAutomationExtension`, and `TGT_SignalBrowserInconsistency` are the rules a real, engine-level browser answers by construction: a genuinely real Firefox, patched below the JavaScript layer, not scripted from a content script, does not carry automation-framework tells, does not have a Selenium-style extension installed, and does not produce internally inconsistent browser-interrogation data, because nothing is faking any of those signals from the inside. That is the same argument this corpus makes for [BotD](botd-explained.md) and [CreepJS](creepjs-explained.md), applied to a managed rule group instead of an open-source script.
Several rule families sit entirely outside what any browser engine can affect. `SignalKnownBotDataCenter` and the cloud-service-provider signal read the network origin, not the browser. The `TGT_VolumetricSession` and `TGT_TokenReuseIp/Country/Asn` families score session and token behavior across time and across requests, a property of how the automation is orchestrated (how many machines, how many networks, how fast) rather than of the browser rendering any one page. And `TGT_ML_CoordinatedActivity`, by AWS's own description, runs on aggregate traffic statistics across a site's whole visitor population, comparing against a baseline no single session's engine fidelity can influence.
`invisible_playwright` does not claim to defeat AWS WAF Bot Control's targeted protections as a system. It answers the automation-signature and browser-consistency rules honestly, because there is no override for them to catch, and it has nothing to say about IP reputation, token-reuse patterns across a fleet of sessions, or AWS's own traffic-baseline machine learning, all of which are orchestration-level properties, not engine-level ones.
## Short answers to the questions that lead here
**What is the difference between Common and Targeted protection?** Common uses static, self-identifying signals (user-agent strings, known scraping-framework patterns) and needs no client-side code. Targeted adds fingerprinting and behavior heuristics via a JavaScript/mobile SDK, plus a token that carries proof of a passed challenge or CAPTCHA across requests.
**What is the AWS WAF token, exactly?** A piece of state the SDK generates and attaches to requests, carrying a session identifier, a browser-fingerprint identifier, and the status of any challenge or CAPTCHA solve. Rules check the token's status (`accepted`, `rejected:*`, `absent`) rather than re-scoring every request from nothing.
**Does AWS WAF Bot Control use machine learning?** Yes, in the `TGT_ML_` rule family specifically, trained on traffic statistics like timestamps, browser characteristics and prior URLs visited, aimed at distributed coordinated activity rather than any single request. It is on by default for Targeted protection and can be disabled.
**What is token reuse, and why does it matter?** The same proof-of-legitimacy token appearing across multiple IPs, countries, or ASNs within a five-minute window. It is a detection axis with no browser-level answer, because it scores how a token is being shared, not what any individual session's browser does.
**Does Bot Control block search engines and other known-good bots?** No. AWS maintains a verified-bot list that gets labeled and passed rather than blocked, and a newer cryptographic mechanism, Web Bot Authentication, lets a bot sign requests to prove its identity instead of being challenged.
**Does a real browser engine defeat AWS WAF Bot Control?** It answers the automation-signature and browser-consistency rules honestly, which removes that whole failure class. It has no bearing on IP/data-center signals, token-reuse-across-sessions rules, or the ML-based coordinated-activity detection, all of which operate above the level of any single browser.
**Does invisible_playwright bypass AWS WAF Bot Control?** No. This project does not sell or claim a bypass service for AWS WAF or any comparable vendor.
**See also:** [How do websites detect bots?](how-do-websites-detect-bots.md) for where a managed-rule-group check like this sits among the other layers; [ASN and IP reputation in bot detection](asn-and-ip-reputation-in-bot-detection.md) for the network-origin signals Bot Control's data-center rule leans on; and [How Cloudflare Turnstile actually works](cloudflare-turnstile-explained.md) for a comparably-documented token-and-challenge model from a different vendor.
## Sources
- AWS, [AWS WAF Bot Control components](https://docs.aws.amazon.com/waf/latest/developerguide/waf-bot-control-components.html),
retrieved 2026-08-30, for the Common/Targeted protection-level distinction, the `TGT_`/`TGT_ML_` rule-name conventions, and the SDK/token integration requirement.
- AWS, [AWS WAF Bot Control rule group](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html),
retrieved 2026-08-30, for the full rule listing quoted in the table above, the token status labels (`accepted`/`rejected:*`/`absent`), the verified-bot list and Web Bot Authentication mechanism, and the token-reuse rule thresholds.
- AWS, [Using managed rule groups in AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-managed-rule-groups.html),
retrieved 2026-08-30, for how a managed rule group is added to a Web ACL.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
patched at the C++ level. AWS documents its Bot Control rules more specifically, by name and by
default action, than almost any other vendor in this corpus, which is why this page quotes rule
names directly rather than reconstructing them from outside reverse engineering.*
@@ -0,0 +1,227 @@
---
title: "Back a computer-use agent with a real browser engine"
description: "Run OpenAI's computer-use agent inside patched Firefox by implementing its Computer interface over an invisible_playwright page, and the honest limits."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 16
---
# Back a computer-use agent with a real browser engine
A computer-use agent is a loop: take a screenshot, send it to a model, get back a
coordinate to click or some text to type, apply it, screenshot again. The interesting
question for anyone running one against real sites is not the model. It is what browser
the screenshots come from and where the clicks land, because that is the part a site can
inspect.
The good news is that the popular reference implementation was built to let you swap that
part out. This page shows how, using the real invisible_playwright API, and it is honest
about what the swap fixes and what it leaves entirely up to you.
## The seam that makes this easy
OpenAI's open `cua-sample-app` does not hardcode a browser. The screenshot-and-click loop
drives a small, pluggable `Computer` interface, and the repository ships one
implementation of it called `LocalPlaywrightComputer`. Every action the model returns -
`screenshot`, `click`, `type`, `scroll`, `keypress`, `goto` - is a method the loop calls
on whatever `Computer` object you hand it. The loop does not know or care what is behind
those methods.
That seam is the whole opportunity. If you implement the same interface over a browser you
control, the same loop now runs inside your engine. Nothing about the agent's reasoning
changes. What changes is the thing on the other side of `screenshot()` and `click()`.
## What backing it with a real engine actually fixes
`LocalPlaywrightComputer` drives a stock automation build. invisible_playwright is a
Firefox patched at the C++ level and driven by stock Playwright, generating a full,
internally consistent identity per session - GPU, canvas, audio, fonts, screen, roughly
400 fields - from one seed. Point the `Computer` interface at one of its pages and two
concrete things move:
- **The engine the screenshots come from.** The pixels the model sees are rendered by a
browser whose fingerprint, TLS handshake and driver layer read as a genuine Firefox,
not as an automation build announcing itself. This is why it clears most
fingerprint, TLS and driver-layer checks: it is built to look like a real browser
driven by a real person, not to suppress signals. A suppressed or blank surface is its
own tell, so the goal is a present, plausible value, not a missing one.
- **The page the clicks land on.** Coordinate clicks arrive on a page inside that engine,
and pointer motion between them follows a Bezier curve instead of teleporting from
point to point.
What it does not touch is equally important, and the next section is about that.
## Two lines to launch, one class to adapt
The launch is the same two-line change as anywhere else in these docs. `InvisiblePlaywright`
returns a real Playwright `Browser`, so every method you already use is available:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
page.mouse.click(200, 140) # the pointer arcs there on a Bezier curve
```
To feed that page to the agent, wrap it in a class that satisfies the `Computer`
interface. This is a representative subset of the methods the loop calls; each one is a
plain call on the real Playwright `page`:
```python
import base64
from invisible_playwright import InvisiblePlaywright
class InvisibleComputer:
"""Adapts an invisible_playwright page to cua-sample-app's Computer interface."""
environment = "browser"
dimensions = (1280, 800)
def __init__(self, page):
self._page = page
def screenshot(self) -> str:
png = self._page.screenshot()
return base64.b64encode(png).decode()
def click(self, x: int, y: int, button: str = "left") -> None:
self._page.mouse.click(x, y, button=button)
def type(self, text: str) -> None:
self._page.keyboard.type(text)
def keypress(self, keys: list[str]) -> None:
for key in keys:
self._page.keyboard.press(key)
def scroll(self, x: int, y: int, scroll_x: int, scroll_y: int) -> None:
self._page.mouse.move(x, y)
self._page.mouse.wheel(scroll_x, scroll_y)
def goto(self, url: str) -> None:
self._page.goto(url)
def get_current_url(self) -> str:
return self._page.url
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
computer = InvisibleComputer(page)
# hand `computer` to the cua-sample-app Agent in place of LocalPlaywrightComputer;
# the screenshot-and-click loop now runs inside the patched Firefox.
```
Everything here uses only documented Playwright methods on a real `Browser` and `Page`.
There is no wrapped subset to learn, which is the point of the two-line switch. Pass a
`seed` and the identity is reproducible, so a run that gets challenged can be replayed
exactly instead of guessed at.
## What it does not fix, and who supplies that
Swapping the engine fixes the engine and the page. It does not change two things that
decide most real outcomes, and pretending otherwise would be dishonest.
- **The click rhythm.** The loop still clicks a coordinate, waits for the model, and
clicks the next coordinate. That cadence has a shape: long pauses clustered around model
latency rather than around reading speed, and clicks that land dead-centre on targets.
The Bezier motion between points helps, but the higher-level timing is the agent's, and
a site that watches behaviour rather than fingerprints is watching that. Human pacing is
something you add on top; see [the pause shaped like model latency](ai-browser-agents-stealth.md)
and [what human pointer motion actually looks like](human-mouse-movement.md).
- **The network path.** The screenshots come from a real-looking Firefox, but the traffic
still exits wherever your host or proxy sends it. A genuine browser on a datacenter
address, or on an IP a thousand other people are using this minute, still loses. IP
reputation, per-account quotas and rate limits are not browser properties, and no engine
swap touches them. You supply the clean exit.
Set a proxy the same way as any other session, and let the browser timezone follow the
exit rather than pinning it by hand:
```python
proxy = {"server": "socks5://gate.example.com:1080", "username": "u", "password": "p"}
with InvisiblePlaywright(seed=42, proxy=proxy) as browser:
page = browser.new_page()
computer = InvisibleComputer(page)
...
```
The honest summary: this raises the browser and the page from "obvious automation" to
"indistinguishable from a real Firefox", which clears the fingerprint, TLS and driver
layer. It leaves behaviour timing and network reputation exactly where they were, on your
side of the line. See [why a clean fingerprint can still be blocked](why-blocked-with-a-clean-fingerprint.md)
for what remains after the engine stops being the problem.
## Prove the swap did what you think
Do not trust the diff, measure it. Run the agent's own `screenshot()` against a public
fingerprinting page, once with `LocalPlaywrightComputer` and once with the adapter above,
and compare the reports field by field rather than reading the verdicts. The fields that
move - GPU renderer, canvas hash, the driver flag, the platform string - are what the
swap bought you. The fields that do not move, and the timing and address it cannot touch,
are what you still owe. The method is the same one in
[how to test bot detection without a false pass](how-to-test-bot-detection.md): assert the
right signal is present, not that a wrong one is absent, and run it more than once.
## Conclusion
The pluggable `Computer` interface in OpenAI's `cua-sample-app` is the seam that lets you
run the exact same screenshot-and-click loop inside a different browser. Implementing it
over an invisible_playwright page fixes the two things a site inspects first - the engine
the screenshots come from and the page the clicks land on - and that is genuinely most of
the fingerprint battle. It is not the whole session. The coordinate-click rhythm and the
network path are still yours, and an agent that looks like a real Firefox on a bad IP with
robotic pacing is still an agent that gets caught. Swap the engine, then supply the pacing
and the exit.
## Short answers to the questions that lead here
**Can I use invisible_playwright with OpenAI's computer-use agent?** Yes. The
`cua-sample-app` drives a pluggable `Computer` interface; implement that interface over an
invisible_playwright page and the loop runs inside the patched Firefox.
**Does this make my agent undetectable?** No, and no tool honestly can. It makes the
browser engine, TLS and driver layer read as a real Firefox, which clears most
fingerprint checks. It does not fix your IP, your rate limits, or the timing of the clicks.
**What exactly does the engine swap change?** The screenshots are rendered by a real-looking
Firefox instead of an automation build, and the clicks land through Bezier pointer motion.
The higher-level click cadence and the network path are unchanged.
**Do I have to rewrite the agent's loop?** No. You implement one small adapter class with
methods like `screenshot`, `click`, `type` and `scroll`, each a plain call on the real
Playwright page. The loop stays as it is.
**Why does behaviour timing still matter?** Because a site can watch when you act, not just
what your browser reports. Pauses shaped like model latency and clicks dead-centre on
targets are a behavioural signal the engine does not touch.
**What proxy should I use?** A clean one. [Around 90% of proxies are already known and
blocked](configuration.md) before you ever use them, and a perfect browser on a known IP
still loses. Set it via the `proxy` argument and let the timezone auto-derive from the exit.
**See also:** [AI browser agents and stealth](ai-browser-agents-stealth.md) for what
applies across every agent framework, [how browser-use gets detected](browser-use-detection.md)
for the CDP-driven case, and [the checklist for being detected on one site](playwright-detected-as-bot.md)
for the order to debug in once something flags you.
## Sources
- OpenAI's open `cua-sample-app` and its `Computer` interface, including the shipped
`LocalPlaywrightComputer` implementation, read from the repository rather than assumed.
- This project's own API: `InvisiblePlaywright` returns a real Playwright `Browser`, so
the adapter above uses only documented Playwright methods - [`Page`](https://playwright.dev/python/docs/api/class-page),
[`Mouse`](https://playwright.dev/python/docs/api/class-mouse) and
[`Keyboard`](https://playwright.dev/python/docs/api/class-keyboard) - unchanged.
- This project's release gates and the field-by-field comparison method documented in the
testing pages linked above.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The engine swap is the easy
half; the pacing and the exit are the half that decides the session.*
+16
View File
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20" role="img" aria-label="Firefox: 151.0">
<title>Firefox: 151.0</title>
<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
<clipPath id="r"><rect width="99" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="56" height="20" fill="#555"/>
<rect x="56" width="43" height="20" fill="#FF7139"/>
<rect width="99" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="28.0" y="15" fill="#010101" fill-opacity=".3">Firefox</text>
<text x="28.0" y="14">Firefox</text>
<text x="77.5" y="15" fill="#010101" fill-opacity=".3">151.0</text>
<text x="77.5" y="14">151.0</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 855 B

+16
View File
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="157" height="20" role="img" aria-label="browser launches: 1.64M">
<title>browser launches: 1.64M</title>
<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
<clipPath id="r"><rect width="157" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="116" height="20" fill="#555"/>
<rect x="116" width="41" height="20" fill="#007ec6"/>
<rect width="157" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="58.0" y="15" fill="#010101" fill-opacity=".3">browser launches</text>
<text x="58.0" y="14">browser launches</text>
<text x="136.5" y="15" fill="#010101" fill-opacity=".3">1.64M</text>
<text x="136.5" y="14">1.64M</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 898 B

+16
View File
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="86" height="20" role="img" aria-label="License: MIT">
<title>License: MIT</title>
<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
<clipPath id="r"><rect width="86" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="56" height="20" fill="#555"/>
<rect x="56" width="30" height="20" fill="#dfb317"/>
<rect width="86" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="28.0" y="15" fill="#010101" fill-opacity=".3">License</text>
<text x="28.0" y="14">License</text>
<text x="71.0" y="15" fill="#010101" fill-opacity=".3">MIT</text>
<text x="71.0" y="14">MIT</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 847 B

+16
View File
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="159" height="20" role="img" aria-label="LinkedIn: Federico Elia">
<title>LinkedIn: Federico Elia</title>
<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
<clipPath id="r"><rect width="159" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="63" height="20" fill="#555"/>
<rect x="63" width="96" height="20" fill="#0A66C2"/>
<rect width="159" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">LinkedIn</text>
<text x="31.5" y="14">LinkedIn</text>
<text x="111.0" y="15" fill="#010101" fill-opacity=".3">Federico Elia</text>
<text x="111.0" y="14">Federico Elia</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 896 B

+16
View File
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="93" height="20" role="img" aria-label="python: 3.11+">
<title>python: 3.11+</title>
<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
<clipPath id="r"><rect width="93" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="50" height="20" fill="#555"/>
<rect x="50" width="43" height="20" fill="#007ec6"/>
<rect width="93" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="25.0" y="15" fill="#010101" fill-opacity=".3">python</text>
<text x="25.0" y="14">python</text>
<text x="71.5" y="15" fill="#010101" fill-opacity=".3">3.11+</text>
<text x="71.5" y="14">3.11+</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 851 B

+16
View File
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="20" role="img" aria-label="Stars: 1.88k">
<title>Stars: 1.88k</title>
<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>
<clipPath id="r"><rect width="80" height="20" rx="3" fill="#fff"/></clipPath>
<g clip-path="url(#r)">
<rect width="43" height="20" fill="#555"/>
<rect x="43" width="37" height="20" fill="#e8a317"/>
<rect width="80" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
<text x="21.5" y="15" fill="#010101" fill-opacity=".3">Stars</text>
<text x="21.5" y="14">Stars</text>
<text x="61.5" y="15" fill="#010101" fill-opacity=".3">1.88k</text>
<text x="61.5" y="14">1.88k</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 847 B

+16
View File
@@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="204" height="38" viewBox="0 0 204 38" role="img" aria-label="Join on Telegram">
<title>Join on Telegram</title>
<defs>
<linearGradient id="g" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#37AEE2"/>
<stop offset="1" stop-color="#1E96C8"/>
</linearGradient>
</defs>
<rect x="0.5" y="0.5" width="203" height="37" rx="18.5" fill="url(#g)"/>
<g transform="translate(20 9.5)" fill="#fff">
<path d="M18.6 1.1 1.2 7.9c-1.0.4-1.0.9-.2 1.2l4.4 1.4 1.7 5.2c.2.6.4.7.9.3l2.5-2.0 4.2 3.1c.8.4 1.3.2 1.5-.7l2.7-12.7c.2-1.0-.4-1.5-1.3-1.1Zm-4.0 3.1-7.3 6.6-.3 3.1-1.5-4.6 9.1-5.1Z"/>
</g>
<text x="123" y="24.5" fill="#fff" text-anchor="middle"
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
font-size="15" font-weight="600">Join on Telegram</text>
</svg>

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

+202
View File
@@ -0,0 +1,202 @@
---
title: "Battery API fingerprint: does Firefox expose it?"
description: "Does desktop Firefox expose the Battery Status API? No, it was removed in 2017, so a battery object under a Firefox user agent gives away a fake browser."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 29
---
# Battery API fingerprint: does Firefox expose it?
Short version: on the desktop, no. Firefox removed the
[Battery Status API](https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API)'s
`navigator.getBattery()` from web content in the 52 series back in 2017, on privacy
grounds, and it has never come back.
So a real desktop Firefox has no Battery Status API at all. `navigator.getBattery` is
`undefined`, and there is nothing to read.
That single fact turns the Battery API into a small but reliable consistency check. A
page that claims to be Firefox in its user agent, and then successfully obtains a
battery object, has not measured your battery. It has caught a browser that is lying
about what it is. This page explains why that happens, why the honest answer is to have
no Battery API instead of a convincing fake one, and how a genuine Firefox build gets
that for free.
## What the Battery Status API was, and why Firefox dropped it
The Battery Status API let a page call `navigator.getBattery()` and read the charge
level, whether the device was plugged in, and the seconds until full or empty. It was
meant for power-aware pages that could defer heavy work on a low battery.
The privacy problem showed up quickly. The charge level was reported with enough
precision, and it changed slowly enough, that the combination of level plus
charging state plus time-remaining behaved like a short-lived identifier: two page
loads seconds apart saw the same unusual value, and that value could be used to correlate
visitors even across contexts that were supposed to be isolated. Firefox responded by
removing the API from web content entirely in the
[52 series in 2017](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/52),
restricting it to chrome/privileged code only. Chromium kept a
reduced version. That divergence is the whole point for fingerprinting: the presence or
absence of `getBattery` is now a per-engine trait, not a per-device one.
## Why absence is the honest answer, and a fake battery is the tell
A fake battery reading is the riskier of the two outcomes, because an absence matches
every real Firefox automatically while a fake value has to survive every angle a
detector can check it from. There are two ways an automation stack can end up
"consistent" with a Firefox user agent on this surface.
The first is to actually be a Firefox build, in which case `navigator.getBattery` is
simply not there, because the engine never defined it. Nothing is spoofed. There is no
value to keep plausible over time, no charging animation to fake, no drain rate to model.
The gap in the API is real, so it survives every probe automatically.
The second is to run an engine that does expose the Battery API, usually a Chromium base,
and then bolt on a JavaScript layer that tries to look like Firefox. Now the stealth
layer has a decision to make. If it leaves `getBattery` in place, the page reads a battery
object from a claimed-Firefox browser, which no real Firefox produces, and that is a
direct contradiction.
If it deletes `getBattery` to hide the mismatch, it has to delete it
convincingly: the property has to be gone from the prototype, absent from a
`for..in` walk, missing from `Object.getOwnPropertyNames`, and it has to stay missing when
a detector fetches a clean copy of `Navigator.prototype` from a fresh iframe and compares.
A partial delete that patches the obvious access but leaves a trace elsewhere is worse than
leaving the API alone, because now there is both a Firefox user agent and evidence of
tampering. This is the pattern CreepJS is built to catch: it does not ask what you report,
it asks whether the shape of your environment is internally consistent and whether anything
looks deleted.
The general rule, which the Battery API illustrates cleanly, is that adding a fake signal
is almost always more dangerous than a real absence. An absence is one bit that matches
every other Firefox on earth. A fake is a value you now have to defend against every angle
a detector can approach it from.
## How the patched build inherits the gap natively
invisible_playwright drives a Firefox that is patched at the C++ level, not a different
engine wearing a Firefox user agent. Because the base is a real Firefox from the current
release line, it inherits the same missing Battery API that every stock desktop Firefox
has had since 2017. There is no shim reintroducing `getBattery` and no shim removing it,
because there was never anything to remove. The surface is correct for the same reason a
stock Firefox is correct: the engine simply does not implement that API for web content.
That is the recurring theme across the fingerprint surface. A field is most robust when it
is genuinely produced by a real browser rather than reconstructed on top of one. The same
logic covers the identity fields that a page reads far more often than the battery, such
as [what `navigator.vendor` and `navigator.productSub` report on Firefox](navigator-vendor-productsub-firefox.md),
which are wrong on a Chromium base pretending to be Firefox and correct on an actual
Firefox build.
## Check it yourself in two lines
Switching from stock Playwright is a two-line change, and after that every standard
Playwright method works unchanged. Here is the whole probe: launch, open a page, and ask
the browser whether it has a Battery API.
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
report = page.evaluate("""() => ({
userAgent: navigator.userAgent,
hasGetBattery: typeof navigator.getBattery,
onPrototype: 'getBattery' in Navigator.prototype,
})""")
print(report)
```
On this build you get a Firefox user agent, `hasGetBattery` equal to `"undefined"`, and
`onPrototype` equal to `False`. That is the correct, boring result: a Firefox with no
Battery API, exactly like the one a person runs. The `seed=42` argument makes the whole
identity reproducible, so if you are comparing this against a stock Firefox on the same
machine you can rerun the exact same fingerprint rather than a fresh random one each time.
The comparison is the part worth doing by hand. Open the same probe in a stock desktop
Firefox and you will see the identical three values. Open it in a plain Chromium and
`hasGetBattery` comes back `"function"`. That contrast, run against a real reference
browser rather than read as a verdict, is the method the
[testing guide](how-to-test-bot-detection.md) argues for on every surface.
## What a passing battery check does not buy you
This is where honesty matters, because it is easy to overread a green result.
Having no Battery API, correctly, tells a detector that this browser looks like a genuine
Firefox on this one narrow surface. It says nothing whatsoever about your network. The
Battery API cannot see your IP address, your exit country, or how many requests you have
made in the last minute. A browser can be a flawless Firefox on every fingerprint field
and still be turned away because the exit IP is a known datacenter range, because the
account behind the session hit a per-account quota, because the requests arrived faster
than a human hands could produce them, or because the pointer never moved before the click.
invisible_playwright is designed to look like a real browser driven by a real person, and
that is genuinely why it passes most fingerprint, TLS and driver-layer checks: the engine
is a real Firefox, so the traits it reports are the traits Firefox actually has, this API
absence among them. But it does not supply a clean IP, it does not pace your actions, and
it does not manage per-account limits. Those are yours to bring: a reputable exit, human
timing, and sane volume. The [configuration guide](configuration.md) covers the proxy and
timezone side of that, and the [detected-on-one-site checklist](playwright-detected-as-bot.md)
walks the causes in the order they are usually the real culprit, with the network exit near
the bottom of the list rather than the top.
## Conclusion
The Battery Status API is a clean example of a detection signal that is best handled by not
existing. Desktop Firefox removed it in 2017, so the honest state for anything claiming to
be Firefox is to have no `getBattery` at all. A stealth layer that adds a fake battery
object to a non-Firefox engine creates the exact contradiction it was trying to avoid, and
one that tries to delete the API instead has to delete it perfectly or leave a tampering
trace. A patched real-Firefox build sidesteps the whole dilemma by inheriting the gap
natively. It is a small surface, it costs nothing to get right, and getting it right is
worth exactly as much as it is: one consistent bit, and not one bit more about your IP or
your behaviour.
## Short answers to the questions that lead here
**Does Firefox have a Battery API?** Not on the desktop for web content. It was removed in
the 52 series in 2017 for privacy reasons, so `navigator.getBattery` is `undefined`.
**Is a battery reading under a Firefox user agent a red flag?** Yes. A real desktop Firefox
cannot return a battery object, so a page that gets one from a claimed-Firefox browser has
caught a fake.
**Does Chrome still expose it?** Chromium kept a reduced Battery API, which is why the
presence or absence of `getBattery` now works as a per-engine trait rather than a
per-device one.
**Should a stealth tool fake a battery to look complete?** No. Adding a fake signal is more
dangerous than a real absence, because the fake has to survive every angle a detector can
probe from, while an absence matches every other Firefox automatically.
**Does invisible_playwright spoof the Battery API?** No. It drives a real patched Firefox,
so the API is simply absent the same way it is absent in a stock Firefox. There is nothing
to spoof.
**If my battery check passes, am I undetectable?** No. This surface says nothing about your
IP reputation, per-account quotas, rate limits, or behaviour. A clean proxy and human pacing
are still on you.
## Sources
- Mozilla's own [Firefox 52 release notes](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/52),
which record the Battery Status API becoming available only to chrome/privileged code
in that release, 2017.
- This project's own fingerprint parity checks, which read `navigator.getBattery` against a
stock desktop Firefox and confirm both report the same absence.
**See also:** [what data websites collect about your browser](what-data-websites-collect-about-your-browser.md),
[the navigator.vendor and productSub story on Firefox](navigator-vendor-productsub-firefox.md),
and [how navigator.webdriver actually reads](navigator-webdriver-explained.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The most robust fingerprint
field is the one a real browser genuinely produces, and sometimes the one it genuinely does
not.*
@@ -0,0 +1,211 @@
---
title: "Beyond robots.txt: How Sites Actually Block AI Crawlers Now"
description: "robots.txt is a request a crawler can ignore, not a lock. What sites actually run underneath it in 2026: rate limiting, behavioral bot scoring, IP and ASN blocking, and decoy mazes, read from Cloudflare's own docs and real practitioner writeups."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 37
---
# Beyond robots.txt: How Sites Actually Block AI Crawlers Now
`robots.txt` is a text file a crawler can read and ignore. Nothing about HTTP forces
a client to fetch it, parse it, or honor a single line inside it. It has worked as
well as it has for thirty years because the crawlers that mattered, mostly search
engines with a reputation to protect, chose to honor it. A crawler with no brand to
protect and a mandate to collect training data has a different set of incentives, and
2026 is the year that gap became a line item.
This page is about what a site actually runs underneath robots.txt once it decides a
polite request is not enough. None of it is exotic. All of it is documented by the
vendors running it or reported by people who watched it happen to their own traffic.
## Why the file alone was never going to hold
Cloudflare's own numbers make the gap concrete. As of a mid-2026 measurement, only
2.98% of the top one million web properties actively blocked AI crawlers, even though
38.73% of them were seeing AI-bot traffic hit their servers. Separately, Cloudflare
found that only 37% of the top 10,000 domains have a robots.txt file at all, and most
of those never got around to adding an AI-specific disallow line. A file nobody wrote
blocks nothing, and a file that only asks nicely blocks only the crawlers that were
already going to comply.
Cloudflare says the quiet part directly in its own writing on the subject: "user
agents are trivial for bot operators to change." A `Disallow` line keyed to a
crawler's declared name works only until that crawler stops declaring its name, and
nothing about the standard requires it to keep declaring it.
## Layer 1: rate limiting
The simplest response treats crawler traffic as a load problem rather than an
identity problem: cap how many requests one IP or session can make in a window.
Scraping-infrastructure writeups describe the logic plainly, a real visitor rarely
loads dozens of pages a second, a scripted crawler often will, so a request-rate cap
catches the volume even when the requester's identity is unknown. It is cheap to run
and it is also the layer a distributed crawler defeats almost by construction: spread
the same total request volume across enough source addresses and every individual
address stays under the cap while the aggregate load on the origin does not move.
Practitioner accounts of the current AI-crawler wave describe exactly that shape,
several large model crawlers hitting a site concurrently producing a load pattern
that looks, from the server's side, functionally identical to an unintentional
denial-of-service.
## Layer 2: behavioral scoring, underneath the user agent
Cloudflare's blocking toggle is not, underneath, a user-agent filter. It runs a
machine-learned bot score against every request, built from what Cloudflare calls its
own global traffic signals, and the score is what a WAF rule actually keys on: block
or challenge everything scoring under a threshold, independent of what the request
claims to be. Cloudflare's own writeup on a specific evasive crawler makes the point
directly: the traffic it examined scored "firmly below 30" on its bot scale even after
the operator had already started rotating its declared identity, because the score is
not reading the declared identity in the first place. This is the same family of idea
behind [how a fingerprint separates a real engine from a claimed one](what-is-a-browser-fingerprint.md),
applied to a crawler instead of a browser tab.
## Layer 3: IP and ASN blocking, and why it is a losing race
A site can also block by network origin instead of by header: known crawler IP
ranges, or entire hosting-provider ASNs, dropped at the firewall. It works cleanly
against a crawler that publishes its ranges and only operates from them. It works
badly against everything else, because most AI crawlers do not publish complete
ranges, and a scraper that wants to keep collecting has residential proxy pools and
rotating cloud addresses available to it at commodity prices. [What ASN and IP
reputation actually score, and how fast an address's reputation decays once it
changes hands, is covered on its own page](asn-and-ip-reputation-in-bot-detection.md);
the short version is that blocking by address is a race the crawler operator can
choose to run, and choosing not to fight that race is why sites reach for the layers
below instead.
## Layer 4: honeypots, tarpits, and the AI-specific version of both
A honeypot is a link or field a real visitor never sees and a script that blindly
processes every element in the DOM will trigger. [How that trick actually works, the
CSS that hides it and the reason `opacity: 0` is a different case from
`display: none`, has its own page](honeypot-fields-explained.md). A tarpit is the
same idea aimed at whole pages: serve a crawler an endless sequence of generated
content instead of a block page, so the crawler keeps consuming CPU and bandwidth
instead of your actual pages.
Cloudflare ships a purpose-built version of this aimed specifically at AI training
crawlers, called AI Labyrinth. Per Cloudflare's own documentation, the mechanism adds
invisible links carrying a `nofollow` directive throughout a protected site. A crawler
that honors `nofollow`, which is most of the ones with a reputation to protect, simply
never follows them and never notices the trap exists. A crawler that ignores it walks
into "a maze of never-ending links" generated to look like real content. Cloudflare's
own description of what happens next: "their details are recorded and used by all
Cloudflare customers who choose to block AI bots," turning one site's trap into a
shared blocklist entry rather than a one-off inconvenience for a single crawler
operator.
## Layer 5: the policy layer catching up to the traffic
The newest development is not a new detection mechanism at all, it is Cloudflare
restructuring what "block AI bots" even means. Starting September 15, 2026, per
Cloudflare's own announcement, the single AI-bot toggle splits into three named
categories: **Search** ("any behavior that collects or indexes your content, so it
can answer questions about it later"), **Agent** ("automated behavior that is acting,
usually in real time, on a person's behalf, to get something done right now"), and
**Training** ("a crawler taking your content to train or fine-tune a model"). New
domains onboarding after that date get Training and Agent blocked by default on
pages that carry ads, while Search stays allowed by default. Cloudflare's own
documentation is direct about the collateral effect: a crawler that serves more than
one purpose, and Cloudflare names Googlebot, Applebot and Bingbot specifically, gets
treated by whichever rule is most restrictive, so a site that blocks Training blocks
those crawlers too unless it opts back in. Alongside the free managed-robots.txt
feature Cloudflare also ships, which prepends its own `Disallow` directives for
crawlers like `Google-Extended` and `Applebot-Extended` ahead of whatever a site
already had, the policy layer is now doing work the plain-text file never could on
its own: it is enforced at the edge, not merely requested in a file a crawler is free
to skip.
## Where a real browser engine fits, and where it does not
This corpus exists because a page that runs JavaScript can tell a genuine browser
engine from a scripted stand-in, and layer 2 above, the behavioral bot score sitting
under every request, is exactly that kind of check. A crawler that is a real browser
engine rather than a bare HTTP client answers a JavaScript-backed consistency check
the way any other real instance of that engine does, for the same reason [a real
Firefox passes most of BotD's detector list for free](botd-explained.md): there is
nothing spoofed to catch.
That is the entire boundary, and it is worth being precise about it. Layers 1, 3 and
5 above have nothing to do with what a browser engine is. A rate limit counts
requests regardless of what sent them. An IP block reads the network address a
connection arrives on, which [no fingerprint changes](can-websites-detect-a-datacenter-proxy-ip.md).
A site's choice to block the Training category under the new policy layer is a
classification decision made before your request is even inspected. None of that is
a promise this project or any browser-identity tool makes, and a claim that engine
realness clears a rate limit or an IP block would be false on its face.
## Short answers to the questions that lead here
**Does robots.txt actually stop AI crawlers from scraping a site?** No, by design.
It is an advisory convention every well-known standard describes as voluntary. A
crawler that chooses not to read it, or reads it and ignores it, faces no protocol-level
consequence for doing so.
**What actually stops a non-compliant crawler, if not robots.txt?** A layered stack:
rate limiting by request volume, a machine-learned bot score independent of declared
identity, IP/ASN blocking, honeypots and tarpits that catch a scraper's own
crawling logic, and, as of late 2026, a policy layer that treats Search, Agent and
Training traffic as three separately blockable categories.
**Can IP blocking alone keep an AI crawler out?** Only against one that only operates
from published, stable ranges. Most large-scale scraping today runs on rotating
residential or cloud addresses precisely because a fixed-range block is easy to set
up and easy to route around.
**What is Cloudflare's AI Labyrinth?** A honeypot built for crawlers specifically:
invisible, `nofollow`-tagged links that a compliant crawler skips and a non-compliant
one falls into, generating an endless sequence of decoy pages while logging the
crawler for Cloudflare's shared blocklist.
**Will blocking the "Training" category also block Google Search?** It can. Cloudflare's
own documentation states that a multi-purpose crawler like Googlebot gets treated by
whichever category rule is strictest, so blocking Training blocks Googlebot's crawl
on the pages that rule covers unless the site opts back in.
**Does invisible_playwright help get past any of this?** Only the part that is
actually a browser-identity check. A real, engine-level Firefox answers a
JavaScript-backed consistency probe honestly, which is what behavioral bot scoring
partly measures. It changes nothing about a rate limit, an IP or ASN block, a
honeypot your own crawling logic walks into, or a site's policy decision to block a
traffic category outright.
## Sources
- Cloudflare, ["Declare your AIndependence: block AI bots, scrapers and crawlers with
a single click"](https://blog.cloudflare.com/declaring-your-aindependence-block-ai-bots-scrapers-and-crawlers-with-a-single-click/),
retrieved 2026-08-30, for the 2.98%/38.73% blocking-versus-traffic figures, the
machine-learned bot-score mechanism, and the "user agents are trivial... to change"
quote.
- Cloudflare, ["Control content use for AI training with Cloudflare's managed
robots.txt and blocking for monetized content"](https://blog.cloudflare.com/control-content-use-for-ai-training/),
retrieved 2026-08-30, for the 37%-of-top-10,000-domains robots.txt figure, the
managed robots.txt mechanism, and the ad-page-only blocking feature.
- Cloudflare, ["Your site, your rules: new AI traffic options for all customers"](https://blog.cloudflare.com/content-independence-day-ai-options/),
retrieved 2026-08-30, for the Search/Agent/Training three-tier system, its
September 15, 2026 effective date, the default-blocking rules, and the
multi-purpose-crawler quote naming Googlebot, Applebot and Bingbot.
- Cloudflare, [AI Labyrinth](https://developers.cloudflare.com/bots/additional-configurations/ai-labyrinth/),
retrieved 2026-08-30, for the invisible `nofollow`-link mechanism and the shared
detection quote.
- Stytch, ["How to block AI web crawlers without breaking your site"](https://stytch.com/blog/how-to-block-ai-web-crawlers/),
retrieved 2026-08-30, for the named-crawler landscape, the rate-limiting and IP/UA
blocking mechanics and their stated limitations, and the honeypot/tarpit
description.
**See also:** [Honeypot fields and hidden links: how sites trap scrapers](honeypot-fields-explained.md),
[what ASN and IP reputation score in bot detection](asn-and-ip-reputation-in-bot-detection.md),
[can websites detect a datacenter or proxy IP?](can-websites-detect-a-datacenter-proxy-ip.md),
and [how Cloudflare Turnstile actually works](cloudflare-turnstile-explained.md) for the
challenge layer that sits beside, not instead of, everything on this page.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. It answers the
browser-identity layer honestly; it does not touch a rate limit, an IP block, a
honeypot your own code walks into, or a site's decision to block a traffic category
outright.*
+187
View File
@@ -0,0 +1,187 @@
---
title: "BFCache and pageshow.persisted under browser automation"
description: "Automation disables the back/forward cache, so pageshow.persisted is always false and every Back is a full reload. Why sites notice, and what enabling it costs."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 13
---
# BFCache and pageshow.persisted under browser automation
**Under browser automation, `pageshow.persisted` is almost always `false`, because the
drivers switch the
[back/forward cache](https://developer.mozilla.org/en-US/docs/Glossary/bfcache) off.**
Every back navigation becomes a full reload
instead of an instant restore, and a page that pays attention to the difference is
looking at a browser that behaves unlike every consumer browser of the last decade.
Press Back in a real browser and the previous page usually comes back instantly,
restored from memory with its JavaScript state intact. The page is told about it: a
`pageshow` event fires with `persisted` set to `true`. Under automation that almost never
happens.
This page covers what the cache does, what automation does to it, why the difference is
visible, what turning it back on breaks in your own tests, and how to decide.
## What the back/forward cache actually does
When you navigate away, the browser can keep the whole page in memory rather than
discarding it: the DOM, the JavaScript heap, the scroll position, the state of your
variables. Navigate back and it is restored rather than rebuilt.
The page finds out through the
[`pageshow`](https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event) event:
```js
window.addEventListener('pageshow', (e) => {
console.log('restored from bfcache:', e.persisted);
});
window.addEventListener('pagehide', (e) => {
console.log('kept in bfcache:', e.persisted);
});
```
`persisted` is `true` on a restore and `false` on an ordinary load. It is a single
boolean, available to any script, and it is normally used for legitimate purposes such as
re-running analytics on a restored view.
## What automation does to it
Automation switches the cache off deliberately, in both major engines, so it never
restores a page. Two different situations, both ending in the same place.
**Firefox under Playwright.** The driver that Playwright uses to control Firefox sets
`disallowBFCache` on every docshell it manages. That is a deliberate choice on its part:
a cached page makes automation less predictable, because state survives navigations that
a test expects to reset.
**Chromium under automation.** The cache is generally not in play either, and there is a
long-standing question on the Playwright tracker about how to enable it at all.
The result is the same in both: `event.persisted` is `false` on every navigation, always,
in a browser where a real user would frequently see `true`.
## Why a page can notice
The difference is not subtle once you look for it, and none of it needs a fingerprinting
library.
**The event itself.** A session that navigates back and forth several times and reports
`persisted: false` every single time describes a browser with the cache disabled.
Disabling it is not something ordinary users do.
**The timing.** A restore is immediate because nothing is rebuilt. A reload fetches,
parses and executes. A page that measures how long its own initialisation took on a back
navigation sees two very different numbers.
**The side effects of a reload.** Scripts run again, timers restart, counters reset,
analytics fire a fresh page view. A page holding in-memory state watches it vanish on
every back navigation, which is behaviour it can compare against what it expects.
None of this is a strong standalone signal. It belongs to the same family as
[the pointer that teleports](human-mouse-movement.md): one more way in which the session
does not behave like a person's browser, cheap to check and rarely thought about.
## How this project handles it, and what it costs you
The behaviour here is inverted relative to the stock driver: the cache is **left enabled
by default**, so a back navigation restores the page and `persisted` comes back `true`,
which is what a real Firefox does. The old behaviour is available behind a preference for
anyone who needs it.
The cost is real and you should know it before you enable this anywhere:
**[`go_back()`](https://playwright.dev/python/docs/api/class-page#page-go-back) waiting
for `load` can time out.** A bfcache restore does not fire `load`,
because nothing loaded. Code that navigates back and waits for that event will sit there
until the timeout expires.
```python
# fragile once bfcache is enabled
page.go_back() # may wait for a load that never comes
# robust either way
page.go_back(wait_until="domcontentloaded")
page.wait_for_selector("#something-on-the-previous-page")
```
Waiting for something you can see is more robust than
[waiting for a lifecycle event](how-to-wait-for-page-load-playwright.md) anyway, and it
works whether or not the page was restored.
**State survives navigation.** That is the point of the cache, and it is also the thing
that makes a test suite non-deterministic if the suite assumed a fresh page. If your
tests depend on state being reset by going back, they were depending on the automation
behaving unlike a browser.
## Deciding which behaviour you want
The two cases genuinely differ and it is worth being explicit rather than picking a
default:
- **A test suite against your own application.** Predictability is worth more than
realism, nothing is watching, and a cache that preserves state between steps causes
flakiness. Disabling it is reasonable.
- **A session that needs to look like a person's browsing.** Realism wins, and the cost
is writing navigation waits that do not depend on `load`.
The mistake is not choosing either one. It is not knowing which you have, and then being
surprised by a timeout or by a signal.
## Conclusion
The back/forward cache is a small thing that automation turns off for good engineering
reasons, and turning it off produces a browser whose back button behaves differently from
every consumer browser.
The fix is not complicated. Leave the cache on and stop waiting for `load` after a back
navigation. The second half is what actually costs effort, and it is the reason the stock
drivers made the other choice.
## Short answers to the questions that lead here
**What does `event.persisted` mean?** That the page was restored from the back/forward
cache rather than loaded again.
**Why is `persisted` always false in Playwright?** Because the driver disables the cache,
in Firefox explicitly and in Chromium effectively.
**Can a site detect that bfcache is disabled?** It can observe that back navigations
never restore, which is not how consumer browsers behave. It is a weak signal on its own
and it belongs to a family of weak behavioural signals.
**Why does `go_back()` hang after I enable bfcache?** Because a restore does not fire
`load`. Wait for `domcontentloaded` or for an element instead.
**Should I enable it?** For realistic sessions yes, for deterministic test suites
probably not.
**Does bfcache leak state between pages?** It preserves state within a page across
navigation, which is its purpose. There is an open Playwright issue about globals
appearing to leak between pages because of it, which is worth reading if you see
something odd.
**See also:** [human-like mouse movement](human-mouse-movement.md), the same category of
behavioural difference, and
[the checklist for being detected on one site](playwright-detected-as-bot.md), where
behaviour is step five, and [how websites detect bots](how-do-websites-detect-bots.md)
for where behavioural signals sit in the wider picture.
## Sources
- [MDN: the back/forward cache (bfcache)](https://developer.mozilla.org/en-US/docs/Glossary/bfcache)
and [MDN: the `pageshow` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event),
which documents `persisted`.
- Playwright's documented [`go_back()`](https://playwright.dev/python/docs/api/class-page#page-go-back)
and its `wait_until` values, including `domcontentloaded`.
- The Playwright tracker's open items on bfcache behaviour and on enabling it under
Chromium.
- This project's driver, which reads a preference before disabling the cache and leaves
it enabled by default, with the `go_back` caveat recorded alongside it.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The preference exists because the timeout described
above is real, and a test suite that hits it deserves a way back to the old behaviour.*
+261
View File
@@ -0,0 +1,261 @@
---
title: "WebDriver BiDi vs CDP: does the new protocol hide you"
description: "WebDriver BiDi standardizes the automation control wire across browsers, but the leaks that expose automation live in the page, not on the protocol you speak."
parent: "Comparisons"
nav_order: 19
---
# WebDriver BiDi vs CDP: does the new protocol hide you
There is a hope, repeated often enough that it is worth answering directly, that
WebDriver BiDi is the fix for automation detection. The reasoning goes: the old
Chrome DevTools Protocol had a famous leak, everyone is moving to a standardized
bidirectional protocol, so the standardized one must close it.
It does not, and the reason is the useful part. The leak people are trying to
escape was never on the protocol wire. It is in the page. Changing which wire the
driver speaks over leaves the page-level artifacts exactly where they were.
## The protocol is the control channel, not the fingerprint
The protocol is the wire a driver speaks over, not the fingerprint a page reads,
so changing it moves nothing a detector looks at. CDP, BiDi and Firefox's own
Juggler are all
control channels: the out-of-process link a driver uses to say "open a page", "go
to this URL", "evaluate this script", "give me the console messages". They are
plumbing between your Python process and the browser process.
A detection script running inside the page cannot see that channel at all. It
cannot see whether the command that opened the tab arrived as CDP JSON, as a BiDi
message, or as a Juggler call. What it can see is whatever the browser does to the
page as a side effect of being driven: a property that reads differently, a global
that should not exist, a built-in prototype that was touched before the first
script ran, a loop that runs measurably slower because the engine is in a
different mode.
So the question "does BiDi hide me" is really two questions that get conflated. Is
the control channel itself observable? Mostly no, for any of the three. Does
switching the control channel change the in-page artifacts? Also no, because those
artifacts are produced by a different mechanism entirely.
## What CDP's Runtime.enable leak actually was
The CDP `Runtime.enable` leak was a page-visible side effect of how Chromium
automation manages JavaScript execution contexts, not a property of the CDP wire
itself. It is narrower than the folklore around it, so it is worth stating
exactly.
On Chromium, automation libraries call the CDP command `Runtime.enable` to manage
the execution contexts they need for evaluating JavaScript. That call has an
in-page side effect: it causes the browser to emit context-creation events, and a
page can provoke and observe the timing of that machinery. Ordinary browsing never
triggers it, so its footprint reads as automation. Two separate projects,
[Patchright](vs-patchright.md) and
[rebrowser-patches](vs-rebrowser-patches.md), independently converged on the same
fix: stop calling `Runtime.enable` automatically and create the needed contexts by
hand, with identifiers the page cannot correlate back to the session.
Notice what that fix is and is not. It is not "switch protocols". It is a change to
how the driver uses the protocol so that the observable side effect stops
happening in the page. The leak lived in the page; the fix lives at the driver.
The protocol name never entered into it.
## Firefox automation here rides Juggler out of band
This project does not patch that leak because it never had it. The Firefox we ship
is driven by stock Playwright over Juggler, an out-of-band control protocol that is
not CDP and has no `Runtime.enable` command to call. There is no automatic
context-enable step whose in-page timing a script can measure, because that step is
a CDP-shaped thing and this is not CDP.
That is an architecture difference, not a cleverness difference. The
`Runtime.enable` timing signal is specific to how CDP-driven Chromium manages
execution contexts. A driver that manages contexts differently, over a different
channel, does not emit that particular event and so cannot be caught by a probe
looking for it. The class of Chromium hand-patches that exist to suppress it has no
counterpart here for the same reason a Linux binary has no Windows registry to
clean.
```python
from invisible_playwright import InvisiblePlaywright
# A stock Playwright script. The control channel underneath is Juggler,
# not CDP, so there is no Runtime.enable side effect for a page to time.
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# standard Playwright: the returned object is a real Browser
print(page.title())
```
None of that code mentions the protocol, which is the point: the wire is an
implementation detail of the driver, and the same script would work if it changed.
## What WebDriver BiDi standardizes, and what it leaves untouched
WebDriver BiDi is a genuinely good thing and worth being precise about. It is a
[W3C effort](https://www.w3.org/TR/webdriver-bidi/) to give every browser one
bidirectional automation protocol, so that a driver can subscribe to events and
issue commands the same way across engines, instead of CDP on one family and
something bespoke on another. Firefox, Chromium and others implement it.
Playwright itself has been building BiDi support. If you have ever wanted "one
protocol, every browser", this is that.
What it standardizes is the shape of the control channel: the commands, the
events, the subscription model. What it does not do, because it is not what a
control protocol is for, is change what the browser exposes to the page. BiDi has
no clause that turns off [`navigator.webdriver`](does-playwright-set-navigator-webdriver.md), no clause about whether a helper
runs in the page's realm before the page's own scripts, no clause about whether the
JavaScript engine is in a mode that runs loops slower. Those are engine and driver
behaviors. A standardized wire carries them just as faithfully as a proprietary one.
The mental model that trips people up is that CDP and BiDi are alternatives on the
same axis as "detected" and "not detected". They are not. Protocol choice and
detectability are orthogonal. You can be trivially detectable over BiDi and hard to
detect over Juggler, or the reverse, and the protocol name predicts neither.
## The leaks that survive any protocol change
If the wire is not where the tells are, where are they? Two families, both in the
page, both indifferent to which control channel drove the browser.
The first is execution-context timing. Attaching a driver to the JavaScript engine
can put realms into a debug-adjacent mode where the optimizing JIT is off and slow
paths run on every call, and that is measurable from the page as time, with no
property to read. It is
[why a fingerprinting service can report developer tools with none open](debugger-timing-detection.md).
Whether the driver spoke CDP, BiDi or Juggler to attach makes no difference to the
resulting distribution; what matters is whether the engine was left in that mode.
This project's fix was to attach without entering debug mode at all, so the JIT
stays on. That is an engine change, and it would be exactly as necessary under BiDi.
The second is injected globals and touched built-ins. If a driver runs a helper in
the page's own realm before the page loads, and that helper touches `JSON`,
`Date.prototype` or `Array.prototype`, then the page starts life with built-ins
that something else handled first, and that is observable. In a controlled
experiment that was the difference between a session being blocked and not. The fix
is to never touch the page realm until the page's own first script has run. Again:
a driver behavior, carried identically over any wire. A page reading a leftover
global does not know or care how the global got injected.
There is also a separate, wire-adjacent failure mode worth naming so it is not
confused with the above: the driver and browser can drift out of agreement about
the protocol's own field set, which
[breaks the client rather than exposing it to the page](playwright-protocol-drift.md).
That is a maintenance surface every automation stack has, standardized protocol or
not, and it is orthogonal to detection too.
## How to choose, and what to actually measure
The practical upshot is that "which protocol" is not a stealth decision. Pick the
protocol for engineering reasons: BiDi for cross-browser uniformity and a stable
standard, CDP where you need a Chromium-specific capability it exposes, Juggler if
you are on this project's Firefox because that is what it speaks. The three differ
on engineering properties, but not on the axis people ask about here:
| Protocol | Cross-browser standard | `Runtime.enable`-style context leak | Control wire visible to the page | Protocol choice changes detectability |
|---|---|---|---|---|
| CDP | No (Chromium family) | Yes, until hand-patched at the driver | No | No |
| WebDriver BiDi | Yes (W3C, multi-engine) | No such standardized clause | No | No |
| Juggler | No (Firefox, this project) | No `Runtime.enable` command exists | No | No |
Then measure the
things that actually decide detection, none of which the protocol choice sets.
The measurement that separates the real question from the imagined one is timing
and page state against a stock browser on the same machine, not a protocol audit:
```python
from invisible_playwright import InvisiblePlaywright
PROBE = """
() => {
// 1. any global that a normal browser would not have?
const suspects = Object.getOwnPropertyNames(window)
.filter(n => /puppet|driver|automation|cdc_|selenium/i.test(n));
// 2. rough JIT-sanity number; compare the RATIO to a stock browser
const t = performance.now();
for (let i = 0; i < 5e6; i++) Math.sqrt(i);
const loopMs = performance.now() - t;
// 3. did anything claim a user gesture nobody made?
const ua = navigator.userActivation || {};
return { suspects, loopMs, isActive: ua.isActive, webdriver: navigator.webdriver };
}
"""
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
print(page.evaluate(PROBE))
```
Run the same probe in a stock browser and diff the results. The absolute loop
number means nothing on its own; the ratio between the two browsers is the JIT
signal. A non-empty `suspects` list is an injected-global leak. `webdriver` should
read as it does on a clean browser. Every one of those is a page-level property,
and every one of them would report the same value whether the tab was opened over
CDP, BiDi or Juggler.
## Conclusion
WebDriver BiDi is worth adopting for what it is: one standard control protocol
across browsers, which is a real convenience and a real cleanup. It is not a
stealth upgrade, because it operates on the wrong axis. The `Runtime.enable` leak
that made CDP notorious was a page-visible side effect of how one protocol managed
contexts, fixed at the driver, not by changing wires. The leaks that remain,
execution-context timing and injected globals, live in the page and the engine, and
a standardized wire carries them as faithfully as a proprietary one. This project's
Firefox never had the CDP leak because it does not speak CDP, and it closes the
in-page leaks in the engine and driver, which is the layer where they actually are.
Choose the protocol for engineering reasons and measure detection where it lives.
## Short answers to the questions that lead here
**Does switching from CDP to WebDriver BiDi make me undetectable?** No. The
protocol is the control channel; the tells that flag automation are in the page and
the engine, and they read the same over any wire.
**Was the CDP Runtime.enable leak a protocol problem?** It was a page-visible side
effect of how CDP-driven Chromium managed execution contexts. The fix changes how
the driver uses the protocol, not which protocol it is.
**Does this project have the Runtime.enable leak?** No. Its Firefox is driven over
Juggler out of band, which has no `Runtime.enable` command, so the signal that
several Chromium projects hand-patch never exists here to begin with.
**Is WebDriver BiDi bad, then?** Not at all. It is a solid cross-browser standard
worth adopting for uniformity and stability. It just is not a detection fix,
because detectability and protocol choice are orthogonal.
**What actually gives automation away if not the protocol?** Execution-context
timing when the engine is left in a debug-adjacent mode, globals or touched
built-in prototypes injected into the page realm, and behavior. All page-level or
engine-level, none of them on the wire.
**How do I test my own setup?** Run a timing-and-globals probe in your automated
browser and in a stock browser on the same machine, and diff them. The ratio, not
the protocol name, is the signal.
## Sources
- This project's own debugger and execution-context fixes, described in
[why an attached debugger makes automation detectable](debugger-timing-detection.md),
for the in-page timing and injected-global leaks that survive a protocol change.
- The [Patchright](vs-patchright.md) and [rebrowser-patches](vs-rebrowser-patches.md)
comparisons on this site, read from each project's own repository, for what the
CDP `Runtime.enable` fix is and is not.
- The [WebDriver BiDi specification](https://www.w3.org/TR/webdriver-bidi/)'s own
scope, for what a standardized control protocol standardizes and what it leaves
to the engine.
**See also:** [why an attached debugger makes automation detectable](debugger-timing-detection.md)
for the page-level leaks in detail, [invisible_playwright vs rebrowser-patches](vs-rebrowser-patches.md)
for the CDP fix arrived at twice, and [how to test whether your browser is detected](how-to-test-bot-detection.md)
for the compare-against-stock method this page leans on.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The protocol under
the driver is an implementation detail; the leaks were never on the wire.*
@@ -0,0 +1,223 @@
---
title: "Block images to speed up scraping (and when not to)"
description: "Blocking images, fonts and media with route.abort() cuts bandwidth and wall-clock time, but a no-image waterfall is itself a tell. When to use it and when not to."
parent: "Scraping with Playwright"
grand_parent: "Guides"
nav_order: 92
---
# Block images to speed up scraping (and when not to)
Aborting image, font and media requests is one of the biggest speed wins available to a
Playwright scraper, and it is two lines of code. It is also, on the wrong page, a clean
way to get yourself noticed. A browser that fetches HTML and JavaScript and never a
single image produces a request pattern no human session shows.
So this is not a pure win, and that is the reason it gets its own page. Blocking
resources is the right call for internal test runs and for bulk data pulls where transfer
cost dominates. It is the wrong call on exactly the sessions you most want to look human.
This page covers what it saves, the two lines that do it, the tell it creates, and where
the line between the two cases falls.
## What blocking resources actually saves
On most pages the HTML and the JavaScript are a small fraction of the bytes. Images,
web fonts and any autoplaying media are the rest, and on an image-heavy listing page
they are the large majority of the transfer. If your scraper only reads text, prices or
structured data out of the DOM, every one of those bytes is downloaded and thrown away.
Aborting them changes two things you can measure:
- **Bandwidth.** On an image-heavy page the transfer routinely drops from a few megabytes
to a few hundred kilobytes. Over tens of thousands of pages that is the difference
between a proxy bill you notice and one you do not.
- **Wall-clock time.** The page reaches its "loaded" state sooner because it is no longer
waiting on the slowest large assets, and `page.goto` returns earlier. The saving is
largest on pages that block rendering on fonts or lazy-load a wall of images.
The mechanic is stock Playwright, and it works identically under invisible_playwright:
the wrapper returns a real Playwright `Browser`, so [`page.route` and `route.abort`](https://playwright.dev/python/docs/network#abort-requests)
behave exactly as documented upstream. There is no special API to learn.
## The two lines that do it
Register a route handler, abort the resource types you do not need, and continue
everything else. The launch is the usual two-line switch from stock Playwright.
```python
from invisible_playwright import InvisiblePlaywright
# resource types that are pure weight for a text/data scrape
BLOCK = {"image", "media", "font"}
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.route(
"**/*",
lambda route: route.abort()
if route.request.resource_type in BLOCK
else route.continue_(),
)
page.goto("https://example.com")
print(page.title())
```
The async form is the same shape:
```python
from invisible_playwright.async_api import InvisiblePlaywright
BLOCK = {"image", "media", "font"}
async with InvisiblePlaywright(seed=42) as browser:
page = await browser.new_page()
async def router(route):
if route.request.resource_type in BLOCK:
await route.abort()
else:
await route.continue_()
await page.route("**/*", router)
await page.goto("https://example.com")
print(await page.title())
```
Two notes that save time later. Register the route **before** `goto`, or the first
navigation's assets are already in flight before the handler exists. And keep
`stylesheet` out of the block set unless you have checked the page: some layouts compute
element positions from CSS, and dropping it can move the very nodes your selectors point
at. `image`, `media` and `font` are the safe core; add `stylesheet` only after you
confirm the DOM you read still resolves.
## The tell: a request waterfall no human produces
A real person's browser loads images, fetches the fonts the page asks for, and pulls the
tracking pixel and the hero media without being told twice - and a scraper that refuses
all three produces a request waterfall no human session shows. That is the honest
caveat, and it is the whole reason this page is not just "block everything, go faster".
The network waterfall of a genuine session has a characteristic shape: a burst of mixed
resource types, images arriving late and out of order, fonts blocking early paint. A
session that fetches the HTML document and a handful of scripts and then goes silent has
none of that shape. It is a request pattern that belongs to a scraper and to almost
nothing else.
This is not a fingerprint that the engine can spoof. invisible_playwright is built to
look like a real browser driven by a real person, and that is why it passes most
detection: the [fingerprint, the TLS handshake and the driver layer read as a genuine
Firefox](does-playwright-support-firefox-stealth.md). But *which requests you choose to
make* is your behaviour, not the browser's identity. If your code refuses every image on
a page a human would load, you have hand-built a behavioural tell that no stealth layer
touches, the same category as a pointer that teleports or a form filled in eighty
milliseconds. The [checklist for being flagged on one site](playwright-detected-as-bot.md)
puts behaviour above the proxy for exactly this reason.
So the block set is a decision about the session, not a global optimisation you turn on
once and forget.
## Where to block, and where not to
Split your work into two buckets and treat them differently.
**Block resources freely when load does not need to look human:**
- **Internal test runs and CI.** You are checking your own selectors and your own
extraction, not passing anyone's inspection. Speed is the only axis that matters.
- **Bulk data pulls where transfer cost dominates** and the endpoint is not scoring you,
for example a site you have permission to crawl, an API-backed page, a
[sitemap walk](how-to-scrape-a-sitemap-playwright.md) over thousands of URLs where the
proxy bill is the real constraint.
**Leave images loading when the session needs to look human:**
- **The first visit to a page that is clearly scoring the session**, or any flow that
starts behind a challenge. The seconds you save are not worth the waterfall shape.
- **Anything interactive that a human would look at.** If the run
[scrolls, clicks and reads](human-mouse-movement.md), it should also be pulling the
images a reader would see.
A middle path exists and is often the right one: block the heaviest single type only.
Dropping `media` and web `font` requests while still loading `image` keeps most of the
human waterfall shape and still cuts real weight, because autoplaying video and large
font files are frequently the worst offenders. Measure your own pages before deciding the
block set is worth the tell.
## What this does not fix
Blocking resources is a speed and cost lever. It is not a stealth lever, and on its own
it changes none of the things that actually decide whether a session gets through.
- **IP reputation.** A [datacenter or already-flagged
exit](can-websites-detect-a-datacenter-proxy-ip.md) is visible before the first byte of
HTML, and no route rule touches it. Supply a clean proxy yourself.
- **Per-account quotas and rate limits.** Fetching fewer bytes per page does not raise a
cap. If anything, going faster lets you hit it sooner, so pair aggressive blocking with
[deliberate pacing](how-to-rate-limit-your-scraper-playwright.md).
- **Behaviour and timing.** The waterfall shape above is one behavioural signal; pointer
motion, dwell time and request cadence are others, and they are your responsibility, not
the engine's.
invisible_playwright makes the browser read as a real Firefox. The clean proxy and the
human pacing are the parts you bring. Blocking images speeds up the run; it does not move
any of these three.
## Conclusion
`route.abort()` on `image`, `media` and `font` is a large, cheap speed and bandwidth win,
and it works identically under invisible_playwright because the wrapper hands you a real
Playwright browser. The catch is that a no-image request waterfall is a behavioural tell,
so scope it: block freely on test runs and bulk pulls where load is the constraint, and
leave images loading on the sessions you most want to read as human. When in doubt, block
the heaviest type only and measure, rather than switching everything off and hoping the
shape goes unnoticed.
## Short answers to the questions that lead here
**Does blocking images make Playwright faster?** Yes, often substantially, because images,
fonts and media are usually the bulk of a page's bytes and a text scrape throws all of
them away. Wall-clock time drops because the page stops waiting on the slowest assets.
**How do I block images in Playwright?** Register a `page.route("**/*", ...)` handler
before `goto` and call `route.abort()` when `route.request.resource_type` is `image`,
`media` or `font`, and `route.continue_()` otherwise.
**Does blocking images get me detected?** It can. A session that fetches HTML and scripts
but never an image produces a request waterfall no human session shows. That is a
behavioural tell, separate from your fingerprint, and no stealth layer hides it.
**Should I also block CSS and JavaScript?** Usually not. Many pages compute layout and
render content from CSS and JavaScript, so blocking them can move or remove the nodes your
selectors read. Start with `image`, `media` and `font` only.
**Will this make invisible_playwright undetectable?** No, and nothing does. It makes the
browser read as a real Firefox, which is most of the battle, but IP reputation, account
quotas, rate limits and timing are yours to handle with a clean proxy and human pacing.
**When should I not block images?** On the first visit to a page that is clearly scoring
the session, and on any interactive flow a human would actually look at. There, looking
human is worth more than the seconds you save.
## Sources
- Playwright's [request interception API](https://playwright.dev/python/docs/network#abort-requests)
(`page.route`, `route.abort`, `route.continue_` and
[`request.resource_type`](https://playwright.dev/python/docs/api/class-request#request-resource-type)),
read from its own documentation rather than a rendered example.
- This project's own measurements of per-page transfer on image-heavy pages, where images,
fonts and media are consistently the majority of the bytes.
- The behavioural-tell reasoning in this project's detection notes, where request shape is
treated as behaviour rather than fingerprint.
**See also:** [pulling images down on purpose when you do want them](how-to-download-images-in-bulk-playwright.md),
[the checklist for being detected on one site](playwright-detected-as-bot.md), and
[testing bot detection without a false pass](how-to-test-bot-detection.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The speed is stock
Playwright; the tell is the part the speed guides leave out.*
+175
View File
@@ -0,0 +1,175 @@
---
title: "What BotD actually detects, and what it does not"
description: "What BotD's nineteen detectors actually check, read from its own source: mostly whether a browser is telling the truth about which engine it is, not automation."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 3
---
# What BotD actually detects, and what it does not
BotD is the open-source bot detector from the FingerprintJS team. It is small, it is
readable, and reading it changes how you think about this problem, because most of
its nineteen detectors are not looking for automation at all.
They are checking whether your browser is telling the truth about **which browser it
is**.
Read from source on 2026-08-29 ([`fingerprintjs/BotD`](https://github.com/fingerprintjs/BotD), `src/detectors/` and `src/sources/`).
## The nineteen detectors
```
app_version distinctive_properties document_element_keys
error_trace eval_length function_bind
languages_inconsistency mime_types_consistence notification_permissions
plugins_array plugins_inconsistency process
product_sub rtt user_agent
webdriver webgl window_external
window_size
```
Exactly one of those, [`webdriver`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver),
is the check everybody knows. A handful look for
specific named tools. The rest are engine identity and internal consistency.
| Detector group | The question it asks | Examples named here |
|---|---|---|
| The one everyone knows | Is the automation flag set? | `webdriver` |
| Engine identity | Does the browser behave like the engine its user agent claims? | `eval_length`, `product_sub` |
| Named tool fingerprint | Does a value the engine reveals name a specific automation tool? | `error_trace`, `function_bind`, `window_external`, `app_version` |
| Internal consistency | Does a value a real browser always produces show up, intact and correctly typed? | `languages_inconsistency`, `mime_types_consistence`, `plugins_inconsistency`, `rtt`, `window_size` |
## The interesting group: what engine are you really?
Some values are decided by the JavaScript engine and cannot be changed from
JavaScript without being obvious. Two of them, BotD computes and checks against what
your user agent claims. A handful of others read that same kind of engine-only value
and test it for one named tool's leftover fingerprint, regardless of what the user
agent says.
**`eval_length`.** `eval.toString().length` is a fixed number per engine, the same
category of leak as [any other native function's own source](tostring-native-code-detection.md).
The check compares that number against the engine your user agent claims: 37 must come
from WebKit or Gecko, 39 from Internet Explorer, 33 from Chromium, and any other pairing
is a bot. A Chromium engine claiming to be Firefox still reports 33, the length the check
reserves for Chromium, and fails on a value nobody thinks to spoof.
**`product_sub`.** If the browser claims to be Chrome, Safari, Opera or WeChat, then
[`navigator.productSub`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/productSub)
must be `20030107`. Firefox reports `20100101`. One
comparison, no ambiguity ([why a real Firefox reports `20100101`](navigator-vendor-productsub-firefox.md)).
**`error_trace`.** Stack traces are formatted differently by different engines, and
the detector tests the string against a single named signature: PhantomJS.
**`function_bind`** checks whether `Function.prototype.bind` exists as a real
function at all, not what it returns; PhantomJS is the one that fails this, so a
missing bind reads as the same tool `error_trace` looks for. **`window_external`**
matches `window.external.toString()` against the name of a specific commercial
scraping platform, Sequentum. **`app_version`** tests that same kind of version
string for three more names: headless, Electron, SlimerJS.
None of these are secret. They are just values a spoofing layer does not think about,
because they are not on the list of "things bots are known for".
## The second group: does your story hold together?
This group mostly asks whether a value a real browser always produces is missing,
empty, or malformed, not whether a value looks unusual on its own.
**`languages_inconsistency`** fires when `navigator.language` and its older fallbacks
are all undefined, something a real browser never leaves empty.
**`plugins_inconsistency`** fires when a browser claiming to be desktop Chrome reports
zero plugins, when even a stock install ships the built-in PDF viewer.
**`mime_types_consistence`** checks that `navigator.mimeTypes` and each of its entries
carry the real `MimeTypeArray` and `MimeType` prototypes, not a plain object standing
in for them.
**`rtt`**, **`window_size`**: values a real machine and a real window have, and a
container often does not.
**`document_element_keys`** and **`distinctive_properties`**: attributes and globals
that specific automation tools leave behind, which is the closest BotD gets to
looking for bots directly.
## What this means if you are on the other side
Three things follow: spoofing a user agent alone tends to make a browser easier to
detect rather than harder, being a genuine instance of the engine you claim passes
this whole detector class for free, and the risk BotD does not touch moves to other
signals entirely. They are the same three that turn up everywhere in this area.
**[Spoofing a user agent alone is worse than not spoofing it](is-changing-user-agent-enough.md).** Change the string and
you have to change `productSub`, `eval.toString().length`, the stack-trace format,
`window.external`, and the plugin and MIME arrays to match, or you have created the
exact contradiction BotD is built to find. Most user-agent spoofing makes a browser
easier to detect, not harder.
**Being a real instance of what you claim passes this whole class for free.** A real
Firefox reporting Firefox has the right `productSub`, the right `eval` length, the
right stack format and the right plugin array, because they are not claims, they are
the engine. There is nothing to keep consistent because nothing was changed.
**The remaining risk moves elsewhere.** Passing every one of these nineteen says
nothing about whether [your GPU string is plausible](webgl-renderer-strings.md), your
fonts match your platform, or [your timezone agrees with your IP](timezone-proxy-mismatch.md).
Those are the ones that decide modern outcomes and BotD does not look at them.
## Checking your own
BotD is on npm and takes about four lines to run. Do it on the machine that will do
the work instead of your laptop, and read which detectors fired rather than the
verdict.
If any of the engine-identity or named-tool-fingerprint groups fire, stop and fix
that first: it means either the browser you are presenting is not the browser you
are running, or a specific automation tool's own fingerprint just showed up, and no
amount of work on the other surfaces compensates for that.
## Short answers to the questions that lead here
**What is BotD?** The open-source bot detector from the FingerprintJS team. It runs in
the page and returns a verdict rather than a fingerprint.
**Is BotD the same as FingerprintJS?** No. FingerprintJS
[identifies a visitor across sessions](fingerprintjs-visitor-id.md). BotD answers a
different question: is this automation.
**Why does most of it not look like bot detection?** Because most detectors check which
browser engine you really are, by testing behaviours that differ between engines. A
browser claiming one engine and behaving like another is the finding.
**Can I pass it by setting `navigator.webdriver` to undefined?** No. That is
[one detector out of nineteen](navigator-webdriver-explained.md).
**Does passing BotD mean I am undetected?** It means one open-source detector found
nothing. Commercial systems combine far more, including things no in-page script can
see.
## Sources
- BotD's own GitHub repository, [`fingerprintjs/BotD`](https://github.com/fingerprintjs/BotD),
`src/detectors/` and `src/sources/`, read 2026-08-29, for the nineteen detector names and
the values each one compares.
- [MDN: `Navigator.webdriver`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver),
retrieved 2026-08-29, for the one detector everybody already knows.
- [MDN: `Navigator.productSub`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/productSub),
retrieved 2026-08-29, for the fixed value Firefox reports that the `product_sub`
detector checks against.
- [PhantomJS](https://github.com/ariya/phantomjs), read 2026-08-29, the named signature
the `error_trace` detector matches against in a stack trace, and the tool a missing
`Function.prototype.bind` reads as under `function_bind`.
- This project's own detection gates, which run BotD against the product before every
release and read which detectors fired rather than only the verdict.
**See also:** [what sannysoft checks](sannysoft-explained.md), which is the older
list of the same kind, and [how CreepJS detects tampering](creepjs-explained.md),
which takes the consistency idea considerably further.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright).
We gate every release on BotD, so the detector names and the compared values above
come out of its source and not out of memory.*
+184
View File
@@ -0,0 +1,184 @@
---
title: "Browser extensions are a fingerprint surface"
description: "An installed browser extension is a fingerprint surface a page can detect three ways. How sites find extensions, and why a stealth extension backfires."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 12
---
# Browser extensions are a fingerprint surface
Yes, a website can detect an installed browser extension, and it can do so three
separate ways: by probing the resources the extension exposes, by watching what it
changes on the page, and by spotting the traces its API overrides leave behind. So an
extension is not just a feature you add. It is another
[fingerprint surface](what-is-a-browser-fingerprint.md), and the most common reason
people add one is to hide a fingerprint, which is where this gets circular.
Adding an extension to an automated browser feels like adding a feature. It is also
adding something a page can look for, and the sections below cover each of the three
detection paths, when an extension is safe to run, and how to load one into a Firefox
profile if you decide to.
## The three ways a page finds an extension
**[Web-accessible resources](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/web_accessible_resources).**
An extension that exposes files to pages does so at a URL containing its own
identifier. Fetch that URL and see whether it loads.
```js
fetch('moz-extension://<id>/<file>') // resolves only if that extension is here
```
The identifier differs per browser and, in Firefox, per profile, which limits the
scan. It does not eliminate it, because extensions that need page access often need
predictable resources.
**What it does to the page.** An ad blocker removes elements, so a page can insert a
bait element with a name matching a common filter list and check whether it survived.
A style-injecting extension changes computed values. Anything that modifies the DOM
leaves the modification behind, and the modification is the detection.
**The behaviour it adds.** An extension that patches `navigator` or the canvas has to
run before the page, and it leaves the same traces as any other page-level override:
own properties where prototypes are expected, getters that are not native,
[a `toString` that prints your source](tostring-native-code-detection.md).
## Why a stealth extension is usually the wrong shape
A stealth extension on top of a stealth engine usually makes you easier to detect, not
harder, because two components deciding the same values contradict each other. This is
worth stating plainly, because it is the most common reason someone asks how to load
one.
A stealth extension operates at the page layer. It runs inside the document, it is
made of JavaScript, and everything on
[the three levels page](playwright-stealth-levels.md) about that layer applies to it. It
also has to run before the page's own scripts, which is a race it does not always win.
And if the browser already sets those values in its engine, the extension is now a
second opinion arguing with the first. Two components deciding what `navigator` says do
not average out; they disagree, and the disagreement is easier to spot than either
answer alone. That is the same argument as
[turning off a crawler's own fingerprint generator](playwright-detected-as-bot.md).
So: extensions for functionality, yes. Extensions for stealth on top of a stealth
engine, no.
## Extensions that are fine, and how to think about the rest
Ask what the extension does to the page:
- **Nothing visible to the page.** A tab manager, something that only touches its own
UI. Effectively invisible.
- **Changes what the page sees.** Blockers, style injectors, script managers. Findable,
and worth knowing that ad blockers are extremely common on real browsers, so their
presence is not by itself unusual. Their *absence* is more unusual than people
assume.
- **Rewrites browser APIs.** The fingerprinting-protection kind. These are the ones
that create the arguing-with-the-engine problem.
The second point deserves emphasis, because it cuts against the instinct. A very large
share of real browsers run an ad blocker. A profile that carries none is not
suspicious on its own, but it is one more small way in which a fresh automated profile
differs from a used personal one, alongside
[having no cookies](recaptcha-v3-score.md).
## How to load one, if you decide to
There is no extension argument in this wrapper. What there is is a
[persistent profile](persistent-profiles.md), and an extension installed into that
profile stays there:
```python
with InvisiblePlaywright(seed=42, profile_dir="/path/to/profile") as browser:
...
```
Launch once with that path, install the `.xpi` the normal way through the browser's own
add-ons page, then reuse the directory. Without `profile_dir`, every session builds a
fresh profile from the seed, which is exactly why an extension installed in one run is
gone in the next.
Pair a stable profile with a [stable seed](reproducible-agent-browser-identity-seed.md).
A profile that accumulates cookies and
storage while the hardware it claims changes every launch is a session whose history
and machine disagree about how long it has existed.
## Checking what yours is exposing
```js
// does a known resource resolve? only a path your manifest lists under
// web_accessible_resources will ever answer; manifest.json itself is not one by default
fetch('moz-extension://<id>/<file>')
.then(r => console.log('present', r.status))
.catch(() => console.log('not found'));
// did something remove my bait element?
const bait = document.createElement('div');
bait.className = 'ad-banner ads adsbox';
bait.style.height = '10px';
document.body.appendChild(bait);
setTimeout(() => console.log('blocked:', bait.offsetHeight === 0), 100);
```
Then run the same checks with no extensions loaded and compare. Anything that differs
is what the extension is telling the page about you.
## Conclusion
An installed extension is not a neutral addition to a profile. It exposes packaged
resources at a URL carrying its own identifier, it changes whatever the page touches
when it modifies the DOM, and it leaves the same override traces as any other script
that runs before the page does. None of that makes an extension unsafe to run. It means
treating one like any other fingerprint surface: know what it changes, check it against
a clean profile, and never stack a stealth extension on an engine that already decides
the same values for you.
## Short answers to the questions that lead here
**Can websites detect browser extensions?** Yes, through web-accessible resources,
through what the extension does to the page, and through the traces any API override
leaves.
**Does using an ad blocker make me more detectable?** It makes you findable, not
unusual. Ad blockers are very common on real browsers.
**Should I use a stealth extension with a stealth browser?** No. Two layers deciding
the same values contradict each other, and the contradiction is a stronger signal than
either.
**How do I add an extension in Playwright with Firefox?** Through a persistent profile:
install it once into that profile, then reuse the directory.
**Why does my extension disappear between runs?** Because a fresh profile is generated
each launch unless you pass a persistent one.
**Are extension IDs the same everywhere?** In Firefox they are typically per-profile,
which limits blind scanning. Do not rely on that as protection; extensions that need
page access tend to expose predictable resources anyway.
## Sources
- MDN Web Docs, [`web_accessible_resources`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/web_accessible_resources),
retrieved 2026-08-28, for how a packaged resource gets a URL containing the
extension's own identifier, which is the first of the three detection paths above,
and for that identifier being generated per browser instance rather than reused
from the extension's own ID, which is what limits the scan in the first place.
- Mozilla Bugzilla, [bug 1372288, a meta bug titled "WebExtensions can be used as
user fingerprint"](https://bugzilla.mozilla.org/show_bug.cgi?id=1372288), retrieved
2026-08-28, Mozilla's own tracking report for the problem this page describes,
still open, which is the primary evidence that an installed extension is a
recognised fingerprint surface rather than a hypothetical one.
**See also:** [Function.prototype.toString and the native code check](tostring-native-code-detection.md),
which is what a page-level extension runs into, and
[three ways to make Playwright undetected](playwright-stealth-levels.md), for why the
layer an extension lives at has a ceiling.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. This page exists because someone asked in our
discussions and got an answer about a different kind of extension entirely.*
+265
View File
@@ -0,0 +1,265 @@
---
title: "Browser trust scores explained: what the number means"
description: "CreepJS trust, FingerprintJS confidence and reCAPTCHA v3 score measure different things: what each trust score means and why one green does not imply the rest."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 8
---
# Browser trust scores explained: what the number means
CreepJS trust, FingerprintJS confidence and a reCAPTCHA v3 score all look like the
same kind of number, and they are not: one counts contradictions, one measures how
sure a match is, and one estimates behavioural risk. A high number from one says
almost nothing about what the next one will read, and treating them as interchangeable
is the single most common misreading behind "I pass one test and fail the next".
This page separates the three numbers people conflate, says what each one is actually
counting, and shows why passing one implies nothing about the others. Then it shows
how to read all three from one reproducible session so you can stop guessing which
number moved.
## Three numbers, three different questions
The three numbers answer three unrelated questions: CreepJS trust asks whether your
values contradict each other, a FingerprintJS visitor ID asks whether you are the same
visitor as last time, and a reCAPTCHA v3 score asks how risky your behaviour and history
look. Line them up and the confusion evaporates:
- **CreepJS trust** is a consistency and lie count. It is high when nothing you report
contradicts anything else you report and nothing looks tampered with. It is not a
rarity score, and being unusual does not lower it.
- **A FingerprintJS visitor ID** is a hash, and the thing next to it labelled
**confidence** is a separate number that says how sure the library is that this ID
belongs to the same visitor as before. It is about linkability, not about looking
automated.
- **A reCAPTCHA v3 score** is a risk estimate between 0.0 and 1.0, built mostly from
behaviour and reputation, not from what the DOM reports at all.
| Number | The question it answers | What it reads | What moves it |
|---|---|---|---|
| CreepJS trust | Do my reported values contradict each other? | Descriptors, prototypes, stack traces, canvas and font surfaces | A patched or blocked probe, or two fields that disagree |
| FingerprintJS visitor ID (+ confidence) | Am I the same visitor as before? | A hash of the browser's components, in a fixed order | Any one component changing changes the whole ID |
| reCAPTCHA v3 score | How risky do my behaviour and history look? | Interaction, cookies, storage and exit reputation, not the DOM | A warmed-up profile and realistic behaviour, not a cleaner fingerprint |
Different inputs, different outputs, different failure modes. The rest of this page is
one section per number, then why they do not move together.
## CreepJS trust: a lie count, not a rarity score
[CreepJS records a blocked probe as a lie](creepjs-explained.md) and walks
descriptors, prototypes and stack traces looking for values that were patched after
the fact. Its trust figure goes up when the surfaces agree with each other and down
when one of them looks edited or refuses to answer.
The part people get wrong: rarity does not enter into it. An identity that no other
machine on earth shares can score perfectly, as long as every field is internally
coherent. Conversely, the most common machine in the world scores badly the moment two
of its fields disagree, because a lie is a contradiction and a contradiction is what
this tool counts.
So the way to raise this number is not to look average. It is to be consistent: one
platform reported everywhere, a canvas that hashes the same twice in a row, a font
list that belongs to the operating system you claim. That is a property of how the
identity is generated, not a value you can paste in.
## The FingerprintJS visitor ID and its separate confidence
[A FingerprintJS visitor ID is a hash of its components](fingerprintjs-visitor-id.md),
around forty-one of them, serialised in a fixed order. There is no partial match:
change one component and the whole ID changes as if everything had. That is why the
same identity gives you the same ID and a different identity gives you a completely
different one, with nothing in between.
The `confidence` sitting beside the ID is a different number entirely. It does not tell
you whether you look automated. It tells you how reliable the library thinks this
particular match is, based on how stable the components it collected tend to be. You
can have a low-confidence ID on a perfectly clean browser and a high-confidence ID on a
browser that is obviously a bot. The two numbers are answering "who is this" and "how
sure am I", and neither is answering "is this a robot".
If your goal is to be recognised again, you want this ID stable. If your goal is to not
be recognised, you want it to change. Either way, it is orthogonal to the trust number
above.
## The reCAPTCHA v3 score: behaviour and history, not the DOM
reCAPTCHA v3 hands the site a number between 0.0 and 1.0, and
[a fresh browser tends to score low on reCAPTCHA v3](recaptcha-v3-score.md) even when
every fingerprint check it faces comes back clean. The reason is that this score is
largely about history and behaviour, and a brand new profile has neither.
An empty profile is a browser that has never been anywhere: no cookies, no consent
decisions, no storage, no prior interaction. There are far more automated sessions that
look like that than human ones, and the score reflects that base rate rather than any
DOM property you did or did not spoof. Perfecting your canvas hash does not move a
number that was never reading your canvas.
This is the honest caveat the other two numbers do not carry: a stable, consistent,
non-lying fingerprint does nothing for this one. It does not manufacture the past you
do not have. That part is warmed-up profiles, realistic behaviour and a reputable exit,
none of which a fingerprint layer can supply.
## Why passing one says nothing about the others
The three numbers are independent, so a high score on one predicts nothing about the
other two. Put them side by side and the independence is obvious:
- You can score high on CreepJS trust and low on reCAPTCHA v3, because a perfectly
consistent browser with no history is exactly what a consistent bot also looks like.
- You can have a stable, high-confidence FingerprintJS ID and still fail CreepJS,
because a stable ID only means your components did not move, not that they are
telling the truth.
- You can pass reCAPTCHA v3 on a warmed profile and fail CreepJS, because behavioural
reputation says nothing about whether a descriptor was patched.
They cross-cut. Each of the [five detector deep-dives in this set](how-to-test-bot-detection.md)
measures a different axis, and a green on one axis is not a green on the others. The
practical rule is to name which number you are looking at before you react to it,
because the fix for a low CreepJS trust (consistency) is not the fix for a low
reCAPTCHA v3 score (history), and applying one to the other wastes days.
## A blocked probe lowers the score, it does not hide from it
One instinct makes two of the three numbers worse at once: suppressing a signal.
Blocking canvas, returning an empty font list, refusing WebRTC, randomising a value per
call so nothing can pin it. reCAPTCHA v3 does not read any of those surfaces, so there
is nothing here for it to punish.
Every one of those is counted against you, not for you:
- CreepJS records a blocked probe as a lie by name, so blocking lowers trust directly.
- A value that changes on every read is a tampering tell, and a per-call-changing
canvas or audio hash reads as randomisation rather than a real device.
- A missing signal is still a signal. An empty result where a real browser has data is
itself the anomaly.
The consistency that raises a trust number is the opposite of hiding. This is why a
seed-derived identity, where every surface is drawn from one seed and stays put, scores
better than any suppression strategy: it answers every probe with a coherent value
instead of a refusal.
## Measure two of the three from one seeded session
The way to stop guessing which number moved is to make the identity reproducible, so a
change in a score is a change you made rather than a change in the draw. The wrapper is
stock Playwright with a seeded fingerprint, so the `browser` you get back is a real
Playwright [`Browser`](https://playwright.dev/python/docs/api/class-browser) and every method is the one you already know:
```python
from invisible_playwright import InvisiblePlaywright
def read_canvas(page):
return page.evaluate("""() => {
const c = document.createElement('canvas');
const ctx = c.getContext('2d');
ctx.textBaseline = 'top';
ctx.font = '14px Arial';
ctx.fillText('trust-score-probe', 2, 2);
return c.toDataURL();
}""")
sf = InvisiblePlaywright(seed=42)
with sf as browser:
page = browser.new_page()
page.goto("https://example.com")
first = read_canvas(page)
second = read_canvas(page)
assert first == second # stable within a session, so not a per-call tell
```
Reading the same value twice in one session is the cheapest consistency check there
is: if `first` and `second` disagree, something is randomising per call, which is the
exact tampering pattern that costs you CreepJS trust. Here they match, which is the
behaviour you want.
Now confirm it is stable across sessions too, which is what keeps a FingerprintJS ID
where you put it, and what a consistency check rewards:
```python
def canvas_for_seed(seed):
with InvisiblePlaywright(seed=seed) as browser:
page = browser.new_page()
page.goto("https://example.com")
return read_canvas(page)
a = canvas_for_seed(42)
b = canvas_for_seed(42) # same seed, relaunched
c = canvas_for_seed(7) # a different identity
assert a == b # same seed reproduces the same machine
assert a != c # a different seed is a different, still-consistent machine
```
Measured this way, the same seed reproduces byte-identical canvas output run after run,
and a different seed produces a different value that is itself internally consistent.
That reproducibility is what lets you attribute a score change to the one thing you
changed. If you have not passed a seed, log `sf.seed` from the instance first so a run
that scored interestingly can be replayed exactly.
The honest boundary, again: this makes the CreepJS-style consistency axis and the
FingerprintJS linkability axis controllable and repeatable. It does not warm up a
profile, and the reCAPTCHA v3 number will still start low on a session with no past no
matter how clean the fingerprint is.
## Conclusion
Three numbers, three axes. CreepJS trust counts contradictions and lies, a
FingerprintJS ID and its confidence measure whether you are the same visitor as before,
and a reCAPTCHA v3 score estimates risk from behaviour and history. Passing one is not
passing another, suppressing a signal lowers the two that read the DOM rather than
hiding from either, and the only way to tell which number your last change actually
moved is to hold the identity still with a seed and compare. Name the axis before you
react to the number, and the contradictory results stop being contradictory.
## Short answers to the questions that lead here
**Is a CreepJS trust score the same as a reCAPTCHA score?** No. CreepJS trust counts
internal contradictions and tampering; a reCAPTCHA v3 score is a 0.0 to 1.0 risk
estimate built mostly from behaviour and history. A high one does not predict the
other.
**What does the FingerprintJS confidence number mean?** How sure the library is that
this visitor ID matches the same visitor as before. It is about the reliability of the
match, not about whether the browser looks automated.
**I pass CreepJS but still get a low reCAPTCHA score, why?** Because reCAPTCHA v3 is
mostly reading history and behaviour, and a fresh profile has neither. A clean
fingerprint does not supply a past, and past is what this score is missing.
**Does a rare fingerprint lower my trust score?** No. CreepJS trust is about
consistency, not rarity. An unusual but coherent identity can score perfectly; a common
but contradictory one scores badly.
**Does blocking canvas or fonts raise my score?** It lowers it. A blocked probe is
recorded as a lie, and a value that changes per read is a tampering tell. Answering
every probe with a coherent value scores better than refusing.
**Which score should I optimise for?** The one your target actually uses. Optimise
consistency for a CreepJS-style check, a warmed profile and realistic behaviour for a
reCAPTCHA-style score, and decide whether you want the FingerprintJS ID to stay put or
change.
## Sources
- The three detectors named above, each with its own page in this set, read from their
own source rather than from a rendered verdict: [CreepJS](https://github.com/abrahamjuliot/creepjs)
on tampering, [FingerprintJS](https://github.com/fingerprintjs/fingerprintjs) on
the hashed visitor ID and its confidence, and [reCAPTCHA v3](https://developers.google.com/recaptcha/docs/v3)
on the behavioural score, retrieved 2026-08-28.
- This project's own reproducibility measurements: identical seed reproduces
byte-identical canvas output within and across sessions, which is the property a
consistency check rewards.
**See also:** [how CreepJS decides you are lying](creepjs-explained.md) for the
consistency axis, [why a fresh browser scores low on reCAPTCHA v3](recaptcha-v3-score.md)
for the history axis, and [how to test whether your browser is detected](how-to-test-bot-detection.md)
for the compare-against-a-stock-browser method that keeps these numbers honest.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The three numbers on this
page get conflated because they all look like a percentage; none of them are the same
percentage.*
+27
View File
@@ -0,0 +1,27 @@
---
title: "browser-use gets detected: what you can and cannot change"
description: "browser-use drives Chrome over CDP. What BrowserProfile lets you change and what stays out of reach. This page moved to the AIHawk wiki."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 2
---
# browser-use gets detected: what you can and cannot change
This page moved to the AIHawk wiki, where the agent-experience content now
lives:
**[browser-use getting blocked: what you can and cannot change](https://github.com/feder-cr/AIHawk/wiki/browser-use-getting-blocked)**
The unchanged short answer: browser-use exposes a real set of levers
(`executable_path`, `user_data_dir`, `proxy`, `headless`, `args`), all of
them Chromium-family, and none of them reaches the machine underneath - the
GPU, fonts, audio and screen a server answers with. A stealth-patched Firefox
is not a drop-in for its CDP driver; the route that accepts a different
engine is MCP.
The mechanism layer stays on this wiki:
[Playwright in Docker and the datacenter machine](playwright-docker-detection.md),
[WebGL renderer strings](webgl-renderer-strings.md), and
[why headless fonts differ](headless-fonts-differ.md).
+244
View File
@@ -0,0 +1,244 @@
---
title: "BrowserLeaks canvas and WebGL hash, explained"
description: "The BrowserLeaks canvas and WebGL signature is a hash of a pixel readback, not your GPU. What it measures, and why one seed gives a byte-identical hash."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 6
---
# BrowserLeaks canvas and WebGL hash, explained
The BrowserLeaks canvas and WebGL signature is a hash of the pixels a readback call
returns, not a fingerprint of your GPU. It sits at the very end of the render pipeline,
which is why editing a reported renderer string never moves it, and why the only way to
control it is to control the bytes handed back at the readback boundary. Get that boundary
right and one seed produces a byte-identical hash on Windows and Linux alike.
BrowserLeaks shows you a canvas "signature" and a WebGL "signature" and treats each as a
stable identifier for your machine (see [what each BrowserLeaks panel tests](browserleaks-explained.md)
for the wider tour). People read those short hex strings as a fingerprint
of the GPU, and then try to change the GPU to change them. That is the wrong layer. The
signature is a hash of one specific thing, and once you know which thing, the whole
surface reads differently.
This page is what the signature measures, where in the pipeline it is actually taken, what
has to be true for two machines to produce the same one, and how to read both values
yourself against a stock browser.
## What BrowserLeaks calls a signature
The canvas test draws text and shapes into an off-screen canvas, then asks the page to
read the resulting pixels back out and hashes them. The WebGL test does the same with a
rendered 3D scene. In both cases the "signature" you see is the hash of the pixel bytes,
not of any property you can enumerate.
That distinction matters because the pixel bytes are the product of a long chain: the
font rasterizer, the anti-aliasing, the GPU, the driver, the compositor. Two machines that
report the same WebGL renderer string can still hash differently, because the string and
the pixels are decided by different code. The signature is downstream of everything, which
is exactly why detectors like it and exactly why it is hard to fake by editing properties.
[The renderer string and the pixels it implies are two separate surfaces](renderer-string-vs-render.md),
and a mismatch between them is its own tell.
## The readback is the only thing JavaScript can see
JavaScript never sees the render surface directly; the only bytes a page can obtain are the
ones a readback call hands back. The GPU draws into memory the page has no handle on. The
only way script gets any pixels at all is by calling a readback method -
[`getImageData`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData),
`toDataURL`, `toBlob` on the 2D side,
[`readPixels`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels)
on the WebGL side - and those methods are
the single point where the rendered pixels cross from the engine into script.
So the signature is not a measurement of your GPU. It is a measurement of whatever those
readback calls return. If the bytes handed back at that boundary are a pure function of a
seed, the signature is a pure function of the seed, and the GPU underneath stops mattering
to the hash entirely.
That is the whole strategy in one sentence: the render can depend on the host all it likes,
because the host contribution is overwritten before any script can observe it.
## What our substitution does at that point
At each readback boundary, the pixels the page receives are replaced with values derived
from the seed and the position of the pixel, roughly `hash(seed, pixel_index)` per byte.
The scene is still drawn, so timing and shape and side effects all behave like a real
render, but the bytes that come back out are seed-determined rather than GPU-determined.
Two consequences follow directly:
- Read the canvas twice in one session and the hash is identical, because the same seed
and the same pixel positions produce the same bytes. A hash that changes between two
reads in one session is the cheapest tampering signal there is, and
[per-call noise is exactly what a consistency probe is built to catch](canvas-fingerprint-noise.md).
- Two different operating systems running the same seed return the same bytes, because
nothing host-specific survives to the readback. That is the property the next section is
about.
Because the substitution happens where the pixels are read rather than where they are
drawn, it covers the indirect readback paths too - drawing the canvas into another canvas
and reading that, capturing it as an image bitmap and reading that - since every one of
them still ends at a readback call, and the readback is what gets replaced.
## Why a byte-identical hash across OSes is the real test
A stealth build that merely perturbs the canvas looks fine on one machine and falls apart
across a fleet, because the perturbation rides on top of a host render that still differs
between Windows and Linux. The honest test is not "did the hash change", it is "do two
different hosts, same seed, produce the same hash to the byte".
Measured on this build, same seed on Windows and on Linux, read in the page the way
BrowserLeaks reads it: the canvas signature is `df2a9319` on both, and the WebGL signature
is `0df1d6f8` on both. Not close, identical.
| Signature | Windows | Linux | Match |
|---|---|---|---|
| Canvas | `df2a9319` | `df2a9319` | byte-identical |
| WebGL | `0df1d6f8` | `0df1d6f8` | byte-identical |
Across a batch of sixteen distinct seeds run
through a full fingerprinting suite, zero of sixteen failed the cross-host check on either
operating system. That is the number that says the host contribution is actually gone
rather than merely reduced, and it is the same guarantee the
[canvas and WebGL cross-platform consistency page](canvas-webgl-cross-platform-consistency.md)
describes from the engine side.
The reason this is worth insisting on: a server render and a laptop render disagreeing is
one of the most common ways an otherwise-good identity gets linked across a fleet. If the
hash is byte-identical by construction, that entire class of leak is closed rather than
papered over.
## The low-entropy render left alone, and why
There is a trap in overwriting every readback unconditionally. Some pages do not draw a
fingerprint scene at all - they draw a tiny reference block, a flat rectangle of one or two
colours, precisely to check whether a browser is tampering with canvas output. A masking
scanner expects that reference to come back byte-exact. If your substitution rewrites it,
you have announced that you rewrite canvas reads, which is worse than any GPU string.
So the substitution has a threshold. A render with more than sixteen distinct colours is a
real fingerprint scene and gets the full overwrite. A render at or below sixteen distinct
colours is treated as a low-entropy reference and is left byte-exact, so its hash stays the
global constant a masking scanner expects to see. The high-entropy scene is spoofed; the
probe render is untouched. A detector looking for tampering on its reference block finds
none, and a detector reading the fingerprint scene gets a clean, seed-stable, host-free
hash.
This is the difference between hiding a signal and blocking it. Blocking canvas entirely,
or scrambling every read, is itself a loud signal - the kind
[a suppressed surface leaves behind](how-to-test-bot-detection.md). Leaving the reference
render exact while making the fingerprint render seed-deterministic is what keeps the
surface quiet.
## Reading the two hashes yourself
You do not need the detector's page to see this. Draw a canvas, read it back the way the
signature is computed, and print the hash. Do it twice in one session to confirm stability,
then relaunch with the same seed to confirm reproducibility.
```python
from invisible_playwright import InvisiblePlaywright
READBACK = """
() => {
const c = document.createElement('canvas');
c.width = 300; c.height = 60;
const ctx = c.getContext('2d');
ctx.textBaseline = 'alphabetic';
ctx.font = '16px sans-serif';
ctx.fillStyle = '#069';
ctx.fillText('signature check', 4, 40);
ctx.strokeStyle = 'rgba(120,0,90,0.7)';
ctx.beginPath(); ctx.arc(240, 30, 20, 0, Math.PI * 2); ctx.stroke();
// the readback: the one point JavaScript sees the render
const bytes = ctx.getImageData(0, 0, c.width, c.height).data;
let h = 0x811c9dc5;
for (let i = 0; i < bytes.length; i++) {
h ^= bytes[i];
h = (h + ((h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24))) >>> 0;
}
return h.toString(16).padStart(8, '0');
}
"""
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
first = page.evaluate(READBACK)
second = page.evaluate(READBACK)
print("read 1:", first)
print("read 2:", second)
assert first == second, "canvas hash changed within a session - per-call noise"
```
Run the same script a second time with the same `seed=42` and the printed hash is the same
again. Change the seed and it changes. Run it on a Windows host and on a Linux host with
one fixed seed and the two hosts print the same string. To make the comparison against a
stock browser concrete, run the identical readback under plain Playwright on the same
machine and note that its hash tracks the host GPU instead:
```bash
python read_hash.py # invisible_playwright: seed-stable, host-free
python read_hash_stock.py # stock Playwright: hash follows this machine's GPU
```
The stock browser is the reference. The point is not that the two disagree; it is that the
seeded one gives the same answer on a second machine and the stock one does not.
## Conclusion
The BrowserLeaks canvas and WebGL signatures are hashes of a readback, and the readback is
the only place a page can observe a render at all. That single fact is what makes the
surface tractable: substitute the bytes at the readback boundary with a function of the
seed, and the signature becomes seed-determined instead of GPU-determined, byte-identical
across operating systems, and stable across reads within a session. Leave the low-entropy
reference render exact and a tampering probe finds nothing to flag. The measurable outcome
is a canvas signature of `df2a9319` and a WebGL signature of `0df1d6f8` reproduced to the
byte on two different hosts, with zero cross-host failures across sixteen seeds.
## Short answers to the questions that lead here
**What does the BrowserLeaks canvas signature actually measure?** The hash of the pixels a
readback call returns, not any property of your GPU. It is downstream of the entire render
pipeline, which is why editing a renderer string does not move it.
**Why is my canvas hash different on my server than on my laptop?** Because a plain render
depends on the host GPU, driver and rasterizer, and those differ. When the readback is
replaced with a seed-derived function, the host drops out and the hash is the same on both.
**Should the canvas hash change on every page load?** No. A hash that changes between two
reads in one session is per-call noise, which is itself detectable. It should be stable
within a session and reproducible across sessions for a fixed seed.
**Is blocking canvas a good defence?** No. An empty or scrambled canvas is a loud signal.
The quiet approach returns a plausible, stable hash and leaves a detector's low-entropy
reference render byte-exact.
**Can I get the same signature on two machines on purpose?** Yes, that is the design. Same
seed, same signature, to the byte, on Windows and Linux alike.
**Does this touch the WebGL renderer string too?** That is a separate surface with its own
handling; see the note on [WebGL renderer strings](webgl-renderer-strings.md). The
signature is the pixels, the renderer string is a reported value, and both have to agree.
## Sources
- BrowserLeaks canvas and WebGL pages, read for how the signature is computed: a hash over
the bytes returned by a readback call
([browserleaks.com/canvas](https://browserleaks.com/canvas),
[browserleaks.com/webgl](https://browserleaks.com/webgl)).
- This project's host-independence audit, which maps every path a host-dependent render
value can reach JavaScript and confirms the seeded hashes (`df2a9319`, `0df1d6f8`)
byte-identical on Windows and Linux, zero of sixteen seeds failing the cross-host check.
**See also:** [canvas and WebGL fingerprints identical across OSes](canvas-webgl-cross-platform-consistency.md),
[the cheapest tampering check there is](canvas-fingerprint-noise.md), and
[how to test whether your browser is detected](how-to-test-bot-detection.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The two hashes above are
real measurements, reproduced to the byte on two operating systems from one seed.*
+250
View File
@@ -0,0 +1,250 @@
---
title: "What BrowserLeaks actually tests, surface by surface"
description: "What BrowserLeaks tests, surface by surface: canvas hash, WebGL, WebRTC, fonts, ClientRects. Why a unique panel is not a fail, and the miss it never flags."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 7
---
# What BrowserLeaks actually tests, surface by surface
BrowserLeaks is the tool people reach for when they want to see a number rather than
read a verdict. It prints the raw value of each browser surface - the canvas hash, the
WebGL parameter block, the WebRTC candidate addresses, the installed font list, the
ClientRects geometry - each on its own page.
That design is its strength and the source of most of the panic it causes. It shows you
everything and scores none of it. So the panel that lights up red and says "unique" is
the one everybody worries about, while the thing that actually gets a session flagged -
two panels that quietly contradict each other - is displayed in plain text and never
called out, because BrowserLeaks does not compare its own pages to one another.
This page is what each surface measures, why "unique" is not the alarm it looks like,
and how to read the tool for the failure it will not point at.
## A raw-value inspector, not a scorer
BrowserLeaks reads each browser surface and prints its raw value; it does not judge whether the values are coherent. It shows the canvas hash, the WebGL block, the font list and how rare each is in its sample, but it never cross-checks one surface against another and never hands you a trust score. That is the distinction that makes it useful, and the one people miss.
[CreepJS asks whether you are lying](creepjs-explained.md): it takes a clean copy of the
built-ins, walks descriptors and prototypes, and cross-checks every surface against
every other one, then hands you a single trust score. BrowserLeaks does none of that. It
reads a value, hashes it if it is a bitmap, tells you how rare that exact value is in its
own visitor sample, and moves on to the next page.
That means two things. First, a "unique" result on any single BrowserLeaks page is a
statement about rarity in their sample, not about whether your browser is coherent. A
perfectly real, perfectly consistent machine can be unique. Second, and this is the part
that matters, BrowserLeaks will show you a Windows font list on one page and a WebGL
renderer that no Windows machine ships on another, side by side, both green, and say
nothing - because it has no page that reads both. The contradiction is on screen. The
tool just is not looking for it.
## Five pages, surface by surface
Each page answers one narrow question. Using them as if they were interchangeable is
most of why people get confused.
- **Canvas.** Draws text and shapes to a `<canvas>`, reads the pixels back, and hashes
them. The hash is a fingerprint of how your specific GPU, driver and font stack
rasterize that exact drawing. It is not a property you can set; it is
[a readback of what the machine actually painted](browserleaks-canvas-webgl-hash.md).
- **WebGL.** Two things on one page: the
[`UNMASKED_VENDOR_WEBGL` / `UNMASKED_RENDERER_WEBGL`](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info)
strings, and a long block of numeric limits (max texture size, shader precision
ranges, supported extensions). The strings are the famous part; the numeric block is
the part that has to agree with them, and a disagreement is a contradiction a scoring
detector catches even though BrowserLeaks prints both without comment.
- **WebRTC.** Asks the browser to gather ICE candidates and prints the addresses it
finds. This is where a proxied browser can leak the real local address next to the
proxy exit, or [return nothing at all, which is its own tell](webrtc-leak-proxy.md).
- **Fonts.** Measures the width of a probe string in a long list of font names and
reports which ones are installed. Under a Windows user agent this list must look like
Windows, not [the font set a bare Linux container ships](detect-installed-fonts-javascript.md).
- **ClientRects.** Reads the sub-pixel bounding boxes of positioned elements with
[`getClientRects()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getClientRects).
Like canvas, the exact fractional geometry varies with the
rendering stack, so it is a fingerprint instead of a setting.
There are more pages - TLS, HTTP headers, geolocation, DNS - but these five are the ones
people arrive worried about, and they are all raw-value readouts with no cross-check
between them.
## The panel people fear: "unique" is not "wrong"
The canvas page is the one that sends people to search engines, and usually for the
wrong reason.
It prints "unique" in red, a rarity percentage, and a signature hash, and the instinct
is to make the number stop being unique. That instinct is backwards. A real browser on a
real machine is very often unique on canvas, because the rasterization depends on a
specific GPU and driver combination that few other visitors share. Uniqueness is the
baseline for real hardware, not the anomaly.
The failure modes that actually matter on this panel are the opposite of "unique":
- **A hash that changes on every read.** If you refresh and the canvas signature is
different each time, something is adding per-call noise, and per-call randomness is
itself the tell - a real GPU is deterministic, so
[a hash that will not repeat is the cheapest tampering signal there is](canvas-fingerprint-noise.md).
- **A hash that matches thousands of other visitors exactly.** That is the signature of
a software rasterizer, the same fallback renderer every headless container falls back
to, which is a "this is a datacenter" flag wearing a "not unique" badge.
So the correct thing to want from the canvas panel is not a common value. It is a stable,
plausible, hardware-shaped value that reads identically twice and is not the shared
software-renderer hash. This product derives that value from the seed, so it is unique in
the way real hardware is unique and byte-identical on a re-read, rather than either
randomized per call or collapsed onto the software default.
## The risk it shows but never flags: two panels that disagree
Here is the thing BrowserLeaks displays and will never point at, and it is the thing a
real scoring detector fails you on.
Every surface on the site carries an implicit claim about the same machine. The user
agent says a platform. The WebGL renderer string implies a GPU vendor. The font list
implies an operating system. The canvas and ClientRects hashes imply a specific
rasterization stack. On a real browser these all describe one coherent computer. On a
patched-together disguise they describe two or three different ones, and each individual
page still looks fine on its own.
BrowserLeaks will happily show you:
- A user agent claiming Windows, and a font page missing the fonts every Windows install
ships.
- A WebGL renderer string naming a discrete GPU, and a canvas hash equal to the shared
software-renderer value - the string says NVIDIA while the pixels were drawn by a
software rasterizer.
- A WebRTC page reporting a timezone-consistent exit, and a geolocation page a continent
away.
None of those triggers a warning on BrowserLeaks, because no page reads another page.
CreepJS would collapse your trust score on any one of them. This is exactly the gap the
comparison method in [how to test whether your browser is detected](how-to-test-bot-detection.md)
exists to close: the tool gives you the raw values, and it is on you to check that they
agree, because it will not.
The practical consequence: do not read BrowserLeaks page by page and tick each one green.
Read the values across pages as a set and ask whether one machine could produce all of
them. That is the check the site skips.
## Reading BrowserLeaks with the product, twice and against a stock browser
The way to use BrowserLeaks well is to automate the cross-check it does not do: read the
same surface twice for stability, and read the surfaces together for coherence.
Switching from plain Playwright is a two-line change, and the returned object is a real
Playwright `Browser` with every standard method:
```python
from invisible_playwright import InvisiblePlaywright
# seed fixed, so every surface is reproducible and a failing run can be replayed
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
# 1. Stability: read the canvas signature twice. A real GPU is deterministic,
# so these two hashes must be identical. If they differ, something is
# adding per-call noise, which is a tell in its own right.
page.goto("https://browserleaks.com/canvas")
first = page.locator("#canvas-hash").inner_text()
page.reload()
second = page.locator("#canvas-hash").inner_text()
assert first == second, "canvas hash changed between reads - per-call noise"
# 2. Coherence: pull the WebGL renderer string and the font list, then check
# they tell the same story about one machine.
page.goto("https://browserleaks.com/webgl")
renderer = page.locator("#UNMASKED_RENDERER_WEBGL").inner_text()
print("WebGL renderer:", renderer)
page.goto("https://browserleaks.com/fonts")
print("fonts detected:", page.locator("#fonts-metrics-report").inner_text())
```
Two rules turn that from a screenshot into a test.
First, assert presence, not absence. A BrowserLeaks page that comes back empty, blocked
or still spinning is a failure, not a clean pass - the WebRTC page returning no candidates
at all reads as clean to a naive check and as suspicious to a real detector.
Second, and this is the one caveat worth being honest about: the raw canvas and WebGL
hashes are stable and reproducible per seed, but they are still *unique*, because real
hardware is unique. If your threat model needs many sessions that are individually
plausible, change the seed per session rather than reusing one - a reproducible
fingerprint is a debugging tool, not a crowd to hide in. Run the same read against a stock
browser on the same machine and diff the two reports field by field; anything that differs
other than the exit address is your candidate, whatever colour the panel is.
## Conclusion
BrowserLeaks is the right tool for reading a specific surface and the wrong tool for
deciding whether you are safe. It prints raw values page by page and scores none of them,
so the "unique" canvas panel that scares people is usually just real hardware behaving
normally, while the failure that actually matters - two panels describing two different
machines - is on screen in plain text with no warning attached.
Read it as a set, not a stack of independent verdicts. Check that each value is stable on
a re-read, check that the values across pages could all come from one computer, and diff
the whole thing against a stock browser. Do that and BrowserLeaks becomes a precise
instrument. Read it panel by panel and it will scare you about the wrong number and stay
silent about the right one.
## Short answers to the questions that lead here
**BrowserLeaks says my canvas is unique - am I detected?** Almost certainly not.
Uniqueness is the baseline for real hardware, which rasterizes in a way few other
visitors share. The tell is the opposite: a hash that changes every read, or one that
matches thousands of others exactly.
**Does BrowserLeaks give a bot score?** No. It is a raw-value inspector. It prints each
surface and how rare it is, but it never scores cross-surface consistency the way CreepJS
does, so it cannot tell you whether your surfaces agree with each other.
**Why does BrowserLeaks look clean but I still get blocked?** Because it showed you values
that individually look fine and never checked that they describe one machine. A Windows
user agent with a Linux font list passes every BrowserLeaks page and fails a real
detector.
**Which BrowserLeaks page matters most?** None alone. The value is reading them together:
the canvas, WebGL, font and WebRTC pages have to tell the same story about one computer.
**How do I know if my canvas hash is randomized?** Load the canvas page twice. A real GPU
gives the identical hash both times. If it differs, something is injecting per-call noise,
which is itself a signal.
**Should I try to make my canvas hash common?** No. Common usually means the shared
software-renderer value that every headless container falls back to, which reads as a
datacenter. You want a stable, hardware-shaped, unique value, not a popular one.
## Sources
- BrowserLeaks' own test pages named above, retrieved 2026-08-28:
[browserleaks.com/canvas](https://browserleaks.com/canvas),
[browserleaks.com/webgl](https://browserleaks.com/webgl),
[browserleaks.com/webrtc](https://browserleaks.com/webrtc),
[browserleaks.com/fonts](https://browserleaks.com/fonts),
[browserleaks.com/rects](https://browserleaks.com/rects) (ClientRects),
[browserleaks.com/tls](https://browserleaks.com/tls),
[browserleaks.com/ip](https://browserleaks.com/ip) (HTTP headers),
[browserleaks.com/geo](https://browserleaks.com/geo), and
[browserleaks.com/dns](https://browserleaks.com/dns), each read from its own page
rather than from a summary score.
- This project's release gates, including the WebRTC gate whose absence-only assertions
passed a feature that returned nothing, and the seed-derived canvas readback checked for
stability across reads.
- [CreepJS's own source](https://github.com/abrahamjuliot/creepjs), for the cross-surface
trust score this page contrasts against BrowserLeaks' page-by-page raw values; the rest
of the companion detector pages in this set, read from each tool's own behaviour.
**See also:** [how CreepJS scores the cross-surface consistency BrowserLeaks skips](creepjs-explained.md),
[what the canvas and WebGL hash actually measures](browserleaks-canvas-webgl-hash.md), and
[the comparison method that catches contradictions no single panel flags](how-to-test-bot-detection.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The seed makes every surface
reproducible, so the two-read stability check above is a test rather than a guess.*
+244
View File
@@ -0,0 +1,244 @@
---
title: "How to make Linux and macOS report real Windows fonts"
description: "To make Linux and macOS report real Windows fonts, bundle the real font files and read only from them. Filtering a list leaves the host's rendering underneath."
parent: "Canvas, WebGL, Fonts and Audio"
grand_parent: "Guides"
nav_order: 6
---
# How to make Linux and macOS report real Windows fonts
To make Linux and macOS report real Windows fonts, ship the real Windows font files
inside the browser and read only from that bundle on every platform. Filtering a host's
font list is not enough: it changes what gets reported, not what gets rendered - the
list says Windows, the pixels say something else. This page is what it took to make that
bundle hold on three unrelated font backends, and where it still leaks.
[Why headless browsers render different fonts](headless-fonts-differ.md) covers the
detection side of the same problem, if you want that first.
## Why filtering the host was never going to be enough
The first instinct is to filter: hide the host's real fonts, report a Windows-shaped
list instead. We tried a version of this and reverted it, because filtering only
changes what gets reported, not what gets rendered. The host still draws the glyphs,
still measures the widths, still rounds however its rasteriser rounds. A filtered font
*name* sitting on top of Linux font *rendering* is a different, subtler version of the
same contradiction: the list says Windows, the pixels say something else.
The fix that actually holds is upstream of the whole problem: ship the real font
files inside the browser, and read only from that bundle, on every platform. This is
the same direction Camoufox took first, and for the same reason - a real file produces
real glyphs, real metrics, and a real hash, because nothing about it is simulated.
## One manifest, so three backends can't disagree with each other
Firefox already has a mechanism for carrying fonts inside the binary,
`MOZ_BUNDLED_FONTS`, on by default on Windows and Linux and available on macOS with a
build flag. The harder problem isn't shipping the files, it's making Windows'
DirectWrite, Linux's fontconfig and macOS's CoreText - three font backends that know
nothing about each other and enumerate host fonts in three different ways - report the
*same* family list from the *same* files.
The fix is a single manifest, generated offline from the font files themselves and
checked in as data, listing every family and which file and face index backs it. All
three backends read the same manifest instead of asking their platform's normal font
enumeration, so instead of three per-OS filters that can quietly drift apart, there is
one source of truth for what a family is called and where its data lives.
Two details in that manifest turned out to matter more than the format itself:
**Naming has to follow the same precedence a real OS uses**, or the family names
themselves become the tell. Font files carry more than one candidate name - a
typographic name, a GDI-compatible name, sometimes a WWS name - and which one Windows
actually shows depends on a precedence order. Getting that order wrong produces a
family list that is real but *shaped* wrong: a font's marketing name where a real
Windows machine would show its GDI name, which is exactly the kind of small
inconsistency [consistency-based detection](playwright-detected-as-bot.md) is built to
catch.
**Multi-face font files can't be indexed positionally across platforms.** A single
`.ttc` file can carry several unrelated faces - regional CJK variants, for instance -
and the safe way to pick the right one turned out to differ by backend: an index that
is reliable on one platform is not guaranteed to point at the same face on another,
because not every platform documents face order as stable. Matching by the face's own
embedded name instead of its position avoids picking the wrong face silently.
## Making three backends refuse to fall back to the host
A manifest is only half the fix. Each backend still has its own default behaviour when
something isn't in its bundle-only list, and each of those defaults quietly reaches for
the host if you don't close it explicitly:
- One backend's safety fallback, when the bundle is unreadable, is to fail toward an
empty list instead of the host - which breaks rendering visibly instead of leaking
silently, the correct failure direction for a fingerprinting surface.
- Another's default path, taken naively, falls straight through to a live host
enumeration call the moment the bundle-only condition isn't satisfied.
- The third had no bundle-only mode at all going in; it enumerates host and bundled
fonts through the same single API call, so keeping the host out requires filtering
every result instead of skipping a call.
Closing all three took a different patch per backend, because "don't enumerate the
host" means something different to DirectWrite, to fontconfig, and to CoreText. There
is no single flag that does this once for all platforms.
## The macOS gap: two layers, and only one was visible without a Mac
CoreText's version of this fix shipped later than Windows' and Linux's, and not
because it was harder to write. It was harder to *know was wrong*, because nobody
doing the work had a Mac to run it on.
**Layer one, found by reading the code instead of running it:** the block-at-birth
hook that stops each backend from falling back to a live host enumeration had been
wired into the Windows and Linux font backends, and simply never ported to CoreText.
Reading the three backends side by side made that omission visible without running
anything - a Mac host would enumerate its own system fonts right alongside the bundle,
leaking the host OS on the one platform where nobody could see it happen locally.
**Layer two surfaced only when the first fix actually ran in CI.** Porting the hook
and shipping it should have closed the gap. It didn't: the very next automated
macOS run still showed most of the bundle missing and several real host fonts
leaking through, on a build that had compiled cleanly and looked, from the source,
like a complete fix. The actual cause was one level down - the build configuration
that turns bundled fonts on at all was set to enable itself only on two of the three
target platforms. The third silently defaulted off, which also compiled out the very
hook layer one had just added, since that code only exists when bundled fonts are
built in. A hook that is correct and a build that never includes it produce the same
observed nothing.
Both layers are closed now, and CoreText enumerates the identical family set the
other two backends do. The reason this is worth telling as one story, not two
separate fixes: the first fix looked complete by every check available without a
real Mac, and was not. The only thing that caught the second layer was an automated
run on the actual operating system, checking the actual output, after the fix that
was supposed to be the whole answer. A gate that runs somewhere other than the real
target platform is checking a different, easier question.
## What this validates, and what it costs
Validated cross-platform: Windows and Linux expose the identical family set from the
bundle, zero host fonts leaking through on either,
[generic CSS families](https://www.w3.org/TR/css-fonts-4/) (serif, sans,
monospace, and the per-script CJK generics) resolving to the same bundled fonts rather
than collapsing to whatever the host happens to have. The same check on macOS runs in
CI, not locally, for the ordinary reason that not every setup has a Mac to test
on, and it has passed there too.
The cost is real and worth naming instead of glossing over. The binary is
meaningfully larger, because it now carries real font files instead of relying on
whatever the OS already had installed. And a fixed bundle also fixes the family list
in time: unlike a live host, the browser cannot pick up a font a real Windows Update
might add later. Both are the price of an answer that has no per-platform seams to find.
## Where it still leaks, named, not hidden
Consistent with treating a suppressed signal as a fail instead of a pass, the honest
gaps in this approach, found and not yet closed:
- One backend's [CSS `local()`](https://www.w3.org/TR/css-fonts-4/) font lookup path
isn't wired to the bundle-only mode at all, so a page asking for a font by exact name
through that specific CSS feature fails to resolve where a real installation would have. A resolved lookup versus a
failed one is itself a detail a determined check could compare.
- One backend's fallback for a character outside the bundle's family set reaches
straight for the real host catalogue rather than staying inside the bundle, so an
uncommon glyph can momentarily surface real host font data.
- One backend's `system-ui` generic keeps a narrow live query against the host font
service as an extra fallback candidate, a single generic family that didn't get
folded into the same guard as the rest.
- One platform's font-substitution mechanism reads a live OS-level alias table
regardless of bundle-only mode, so the set of names that resolve through it still
varies by the specific machine's own configuration.
None of these are enumeration leaks in the sense the validation above checks for -
that check passed, repeatedly, on real measurement. They are narrower seams: specific
code paths that keep a live dependency on the host font service instead of routing
through the bundle like everything else. Each is a known, open item rather than
something papered over, because a gap you haven't found yet is worse than one you have.
## A closed example of the same class: enumeration passing while rendering was wrong
Before the manifest fixed multi-face naming across platforms, a narrower version of the
same problem shipped and was found and closed on Linux specifically. It is worth
walking through because it is the clearest illustration of why enumeration alone is
never enough of a check.
A `.ttc` file is a collection: several complete faces sharing one set of font tables,
addressed through a `TTCHeader` that starts with the four-byte marker `ttcf` instead of
the single-face `sfnt` header an ordinary font file has. Several bundled CJK families -
regional Chinese, Japanese and a couple of serif/math variants - ship as `.ttc`
collections for exactly that reason: related faces, one file.
The font-table code on Linux never checked for that marker. It read every font file as
if it only had one face, at a fixed offset from the start of the file. For an ordinary
font that offset is correct. For a `.ttc` collection it lands wherever the first face's
data happens to be, regardless of which face was actually requested by name.
The result was a font that enumerated correctly - the family name resolved, the browser
reported it was using the right font - while the glyphs actually rendered came from
whichever face happened to sit at that fixed offset. Measured directly: metrics for
several of these families were wrong on Linux and correct on Windows, same seed, same
manifest, same claimed font name. Enumeration was clean. Rendering was not. That gap is
exactly what a check that stops at "is the font in the list" cannot see.
The fix adds a lookup that reads the `TTCHeader` when the `ttcf` marker is present,
finds the requested face's own offset from the collection's face-directory table, and
reads from there instead of assuming offset zero. After the fix, the same measurement
that had shown a mismatch showed matching metrics on both platforms, for every affected
family.
The general lesson is the same one the four seams above are named for: a signal that
looks closed because the obvious check passed is not the same as a signal that is
closed. This one needed a metrics comparison, not a font list, to be caught at all -
and it was a real, shipped gap for a period, not a hypothetical one.
## Conclusion
Filtering a host's fonts leaves the host's rendering underneath, which is a
contradiction with extra steps. Shipping the real files and reading only from them
removes the contradiction at the source, at the cost of a larger binary, a fixed
family list, and three separate backends that each needed convincing not to reach for
the host on their own. What's left is a short, named list of narrower seams, not a
general claim that the surface is closed.
## Short answers to the questions that lead here
**Can I make a Linux machine report Windows fonts?** Reporting the name is not the
hard part; matching the rendering is. Bundling the actual font files and reading only
from them is what makes the two agree.
**Does installing Windows fonts on Linux fix fingerprinting?** It gets you the right
names. It does not by itself stop the browser's normal font backend from also seeing
whatever else is on the host, and licensing is a separate problem again.
**Why not just spoof the font list in JavaScript?** There's no enumeration API to
intercept; [detection works by measuring rendered text](detect-installed-fonts-javascript.md),
and a script cannot change what the OS actually draws.
**Does this fix cost anything?** A larger binary, and a font list that's frozen at
build time rather than tracking whatever the real OS might add later.
**Is this the same thing Camoufox does?** The same direction - real files, not a
filter - checked independently rather than assumed to work the same way underneath.
**See also:** [why headless browsers render different fonts](headless-fonts-differ.md),
for the detection side this architecture answers; [invisible_playwright vs Camoufox](vs-camoufox.md),
for where this approach sits relative to theirs; and
[WebGL renderer strings](webgl-renderer-strings.md), for the same shape of problem on
different hardware.
## Sources
- This project's own font-bundle architecture and its per-platform integration work,
including the validated cross-platform measurement (Windows/Linux locally,
macOS in CI) and the four open gaps listed above.
- Firefox's own bundled-fonts build mechanism, which this architecture builds on
rather than replaces.
- [CSS Fonts Module Level 4](https://www.w3.org/TR/css-fonts-4/) (W3C), for the generic
font family keywords and the `local()` src descriptor referenced above.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level, including three separate font backends convinced not
to ask their host anything.*
@@ -0,0 +1,238 @@
---
title: "Can a website detect a virtual machine?"
description: "How a website infers a VM: software GPU renderers, odd core and memory counts, missing audio, generic metrics - what a browser fingerprint can and cannot hide."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 15
---
# Can a website detect a virtual machine?
Short version: a website cannot see your hypervisor directly, but it can read a
handful of browser-visible values that a virtual machine or a cloud instance tends to
get wrong, and it can add them up into a VM-likelihood score. So the honest answer is
"partly". It can guess from what the browser reports, and it usually cannot prove
anything from inside the page. What it can prove lives outside the browser: the exit
IP and the network handshake.
This page is what a detector actually looks at, why a default VM answers those
questions in a way that stands out, how a real-hardware persona changes the answers,
and the parts that a browser fingerprint does not and cannot touch.
## What a detector can see, and what it cannot
A page runs JavaScript. JavaScript can read the values the browser chooses to expose,
and nothing below that line. It cannot read the CPUID leaf that says "hypervisor
present", it cannot query the BIOS vendor string, it cannot see the virtual disk
controller. Those are the classic VM tells that a tool like
[Pafish](https://github.com/a0rtega/pafish) checks for, and they belong to native
malware analysis, not to a web page.
What a page can do is infer. Every value below is individually plausible and, taken
together, describes a machine. A physical desktop and a headless cloud instance answer
these questions differently, and a detector that has scored a large number of real
browsers knows what the physical desktop looks like.
- The GPU vendor and renderer string.
- The number of logical CPU cores.
- The reported device memory.
- Whether an audio output device exists, and what it sounds like.
- The screen geometry and pixel ratio.
None of these is an automation flag. They are all "this is probably not someone's
desktop" flags, which is a different and often more damaging thing.
## The signals that feed a VM score
Here is what each one looks like when it comes from a virtualized or headless
environment, and why it stands out.
**A software or generic GPU renderer.** A machine with no graphics hardware falls back
to a software rasterizer, and the [WebGL renderer
string](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info)
says so in plain text: a basic or generic renderer name, or the well-known software
rasterizer strings. A real desktop reports a specific GPU model from a specific vendor.
This is the single loudest VM tell
in the browser, because it is a string you can read directly instead of a statistic
you have to accumulate.
Worse, the string and the pixels can disagree: a renderer that
names real hardware while a software path actually draws the frame is
[a mismatch you cannot paper over with a property override](renderer-string-vs-render.md).
The full surface is in [WebGL renderer strings](webgl-renderer-strings.md).
**Odd core and memory counts.**
[`navigator.hardwareConcurrency`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hardwareConcurrency)
and
[`navigator.deviceMemory`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory)
are coarse, but their distribution across real browsers is not uniform. A tiny core
count paired with a claim of a modern desktop, or a memory
value that never appears on consumer hardware, moves the score. These two also have to
agree with each other and with the rest of the persona, which is
[why pinning one without its neighbours backfires](hardware-concurrency-device-memory.md).
**Missing or default audio.** An
[`AudioContext`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API)
exposes a sample rate, an output latency and a channel count that come from a real
audio device. A container with no sound hardware answers with defaults that say
exactly that, and the rendered audio
fingerprint carries the same information. See
[AudioContext fingerprinting](audiocontext-fingerprinting.md) for what is actually
being measured.
**Generic display metrics.** A resolution nobody ships, a device pixel ratio no real
panel has, an available screen height equal to the full height (meaning no taskbar and
no window chrome). Each of these is a small nudge; together they describe a virtual
framebuffer rather than a monitor.
A detector does not need any single one of these to be damning. It needs several of
them to point the same way at once, which is exactly what an unconfigured VM delivers.
## What invisible_playwright does about the browser-visible layer
invisible_playwright is a Firefox patched at the C++ level and driven by stock
Playwright. Its whole design is to look like a real browser run by a real person, and
that is why it passes most fingerprint, TLS and driver-layer checks: those layers read
as a genuine Firefox because the browser genuinely is one, not a JavaScript costume
over a headless engine.
For the VM signals specifically, the build derives one coherent real-hardware persona
from a seed and overrides the browser-visible values to match it: the WebGL vendor and
renderer name a real GPU (and the pixels are drawn to agree with the string, not just
the string), `hardwareConcurrency` takes a value a real desktop reports, the
`AudioContext` presents a real device's output characteristics, and the screen metrics
describe a physical display. `navigator.deviceMemory` stays undefined, because that is
what a real Firefox reports too: the API is Chromium-only, and inventing a number for it
would be the tell, not the fix. Every field that is set is drawn from the same seed, so
they agree with one another rather than being individually plausible and jointly
contradictory, which is the failure mode a VM score is built to catch.
Switching from plain Playwright is two lines, and the operation this page is about -
loading a page that scores your environment - is ordinary Playwright after that:
```python
from invisible_playwright import InvisiblePlaywright
# same seed -> same GPU, cores, audio and screen every run
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# read the values a VM detector would read
report = page.evaluate("""() => {
const gl = document.createElement('canvas').getContext('webgl');
const dbg = gl && gl.getExtension('WEBGL_debug_renderer_info');
return {
renderer: dbg ? gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL) : null,
cores: navigator.hardwareConcurrency,
memory: navigator.deviceMemory, // undefined on Firefox; the API is Chromium-only
sampleRate: new (window.AudioContext || window.webkitAudioContext)().sampleRate,
screen: [screen.width, screen.height, window.devicePixelRatio],
};
}""")
print(report)
```
Run that inside the build and the renderer names a real GPU, the core count sits in the
range real desktops report, `memory` comes back `None` exactly as it does on any real
Firefox, the sample rate is a real device's, and the screen looks like a monitor. Run it
in a stock headless browser on the same cloud
instance and you will typically see a software renderer, a low core count and screen
metrics that describe a framebuffer. That difference is the VM score, and it is the
part a browser can control.
Because the persona is seed-derived, `seed=42` gives the same machine on every run,
which is what makes a suspicious result reproducible instead of a one-off you cannot
chase.
## The parts a browser fingerprint cannot fix
This is the honest caveat, and skipping it is how people get surprised.
Matching the browser-visible layer to a real desktop covers the browser-visible layer.
It does nothing about:
- **The exit IP.** A datacenter address is a datacenter address, and a large share of
VM detection in practice is just the IP's reputation and ASN. A perfect persona on a
known cloud range still reads as a cloud instance. You supply the exit; the build
only sets the browser to match it. See
[why a container gets caught on the network and machine layers](playwright-docker-detection.md).
- **Hypervisor timing side-channels.** Some detectors time operations whose cost
differs under virtualization. That is a property of the CPU you are actually running
on, not of any value the browser reports, and no fingerprint override changes it.
- **Behaviour, rate and quota.** Human pacing, per-account limits and request velocity
are yours to supply. A consistent browser hammering one endpoint from one address
creates the exact signal it was trying to avoid.
So invisible_playwright helps with the browser-visible half of VM detection and does
not, on its own, fix the IP, the timing floor or your behaviour. It is designed to be
paired with a clean residential exit and human pacing, not to replace them. There is no
setting that makes a browser undetectable, and any tool that claims one is selling the
claim rather than the result.
## Conclusion
Can a website detect a virtual machine? It can make a strong guess from the browser
side - a software GPU renderer, odd core and memory counts, missing audio, generic
display metrics - and it can prove very little from inside the page while proving quite
a lot from your IP and handshake. invisible_playwright addresses the guessable,
browser-visible half by presenting one coherent real-hardware persona instead of the
default VM answers, and it is honest about the half it does not touch. Match the
browser to a real desktop, put it behind a clean exit, pace it like a person, and the
VM score stops being the thing that gives you away. Get any one of those three wrong and
the other two will not save you.
## Short answers to the questions that lead here
**Can JavaScript detect that I am in a VM?** Not directly. It cannot read CPUID, BIOS
strings or the hypervisor. It infers from browser-visible values like the GPU renderer,
core count, audio device and screen, and scores how VM-like they look together.
**What is the biggest browser-side VM tell?** A software or generic WebGL renderer
string. It is a value you can read in plain text rather than a statistic you have to
accumulate, so it stands out immediately.
**Does invisible_playwright hide that I am on a cloud server?** It fixes the
browser-visible signals it can change - GPU, cores, audio, screen - to one coherent real
desktop persona, and leaves `deviceMemory` undefined, which already matches real
Firefox. It does not change your IP, which is often the actual reason a cloud session
gets flagged.
**Can a website detect a VM through timing?** Some detectors time operations that cost
more under virtualization. That is a property of the CPU you run on, not a browser
value, so no fingerprint override affects it.
**Will a real-hardware persona alone get me through?** No. Pair it with a clean
residential exit and human pacing. The persona covers the machine the browser reports,
not the address it connects from or how fast you click.
**Is there a setting that makes the browser undetectable?** No, and be wary of anything
that says otherwise. This lowers the browser-visible VM score to a real desktop's; the
IP, timing floor and behaviour are still yours to get right.
## Sources
- The browser API references for each browser-visible value a VM score reads: the
[WebGL renderer string](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info),
[`hardwareConcurrency`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hardwareConcurrency),
[`deviceMemory`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory),
[`AudioContext`](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API) output, and
[`devicePixelRatio`](https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio)
for screen metrics, retrieved 2026-08-29.
- [Pafish](https://github.com/a0rtega/pafish), the open-source reference for the
native-side CPUID, BIOS and disk-controller checks a web page cannot reach,
retrieved 2026-08-29.
- This project's release gates, which compare each of those fields against a stock
Firefox on the same machine rather than reading a verdict.
**See also:** [WebGL renderer strings](webgl-renderer-strings.md) and
[hardwareConcurrency and deviceMemory](hardware-concurrency-device-memory.md) for two
of the signals above, and [how to test whether your browser is detected](how-to-test-bot-detection.md)
for the compare-against-stock method that catches a VM tell a verdict hides.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. It presents one coherent
real-hardware persona to the browser-visible layer; the IP, the timing floor and the
pacing are still yours to supply.*
@@ -0,0 +1,256 @@
---
title: "Can a website detect Clipboard API access?"
description: "A page can see navigator.clipboard and query clipboard-read permission state, but the async Clipboard API is a gesture gate, not a value fingerprint you leak."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 21
---
# Can a website detect Clipboard API access?
Short version: a page can see that `navigator.clipboard` exists, and it can ask the
Permissions API about `clipboard-read`, which answers with a state on Chromium and throws
on Firefox, so either way it can observe your relationship with the clipboard. What it
mostly cannot do is turn that into a stable fingerprint of your machine. The Clipboard API
is interesting to a detector for a different reason than canvas or WebGL are: it is not a
value you leak, it is a gate that only opens for a real user gesture, and the way the
Permissions API answers for it has to match the engine you claim to be.
This page is what the async Clipboard API actually exposes, why it behaves as a gate
rather than a fingerprint, the cross-check a detector runs against it, how to drive it
with a real trusted click, and the honest limit of what a patched browser does here.
## What the async Clipboard API actually exposes
The modern surface is the [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API)'s
`navigator.clipboard`, with two methods that matter for detection:
`writeText()` and `readText()` (plus their richer `write()`/`read()` cousins). Both return
promises, and both are guarded before they ever touch the system clipboard.
A page can read three things without any special access:
- **Whether `navigator.clipboard` is present at all.** A secure context (HTTPS) in a
modern browser has it; its absence under a modern user agent is itself a mismatch.
- **What the [Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API)
says about `clipboard-read`**, by asking it directly:
`navigator.permissions.query({name: 'clipboard-read'})`. Chromium answers with
`granted`, `denied` or `prompt`, no dialog involved. Firefox throws instead, because it
has never implemented that permission name.
- **What happens when it calls a method.** A rejected promise, and the shape of the
rejection, tells the page which guard tripped.
None of those three is a serial number. They describe policy, not hardware, and that is
the whole point of this surface.
## Why clipboard is a gate, not a value fingerprint
Canvas gives back a hash. WebGL gives back a renderer string. The clipboard gives back
almost nothing that varies from one honest machine to the next, because access is gated
on two conditions the specification requires:
1. **A user gesture.** `readText()` and `writeText()` are only allowed while the document
has [transient activation](https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/User_activation),
meaning a real interaction (a click, a key press) happened
recently. Call either one from a script with no gesture behind it and the promise
rejects.
2. **A second gate that differs by engine.** Chromium backs both operations with a real
`clipboard-read`/`clipboard-write` permission a page can query through the Permissions
API. Firefox implements no such permission at all: the identical query throws, and a
read that does not already satisfy the gesture rule falls back to an ephemeral,
one-shot "Paste" item in a native context menu instead of a stored grant. Either shape
is policy the page can observe, and neither hands back a value that varies from
machine to machine.
For an automation setup this is exactly the kind of check that separates a real browser
from a spoofed one, and it separates them on *behaviour*, not on a leaked value. A script
that dispatches its own synthetic `click` event to satisfy the gesture requirement fails,
because a page-built event carries [`isTrusted=false`](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted)
and does not count as activation.
This is the same boolean that decides
[whether an automated click reads as real input](playwright-clicks-istrusted.md): the
clipboard gate sits directly on top of it.
So the detector question is not "what is your clipboard value". It is "does the clipboard
open for you the way it opens for a person", and the answer depends on whether your
clicks are trusted.
## The cross-check: the Permissions API answer must match the engine
The sharper check does not call the clipboard at all. It reads what the Permissions API
says about `clipboard-read` and checks whether that answer matches the engine the rest of
the page claims to be.
A modern Firefox user agent implies a specific, boring answer:
`navigator.permissions.query({name: 'clipboard-read'})` throws, because Firefox has never
implemented that permission name. Chromium, by contrast, answers with a real
`granted`/`denied`/`prompt` state. A detector that sees a Firefox user agent and a
Chromium-shaped answer to that one query has found a browser lying about what it is:
either the engine underneath is not really Firefox, or something patched the Permissions
API on top of one without reproducing the one answer a real Firefox has always given.
It is the same family as
[the notifications permission mismatch](permissions-api-consistency.md), where
`Notification.permission` and `navigator.permissions.query({name: 'notifications'})` are
expected to give one coherent answer and a headless browser gives two, and it sits
alongside [the notification-state cross-check detectors already run](notification-permission-detection.md).
Clipboard is a blunter version of the same idea: the expected answer for a real Firefox is
not a state to match, it is a specific failure to reproduce. Nobody has to recognise
automation directly; they just ask the same question the browser already answers for free
and see if the answer fits.
A patched-at-the-engine build does well here for an unglamorous reason: it is a real
Firefox, so the Permissions API answers exactly the way any Firefox does, including by
throwing on a permission name Firefox never implemented. There is nothing to keep in sync
because nothing was bolted on.
## Reading the clipboard with invisible_playwright
Because Playwright's clicks go through the native input path, they arrive as trusted
gestures, so the clipboard gate opens exactly as it would for a hand on the mouse. The
launch is the usual two lines, and after that everything is stock Playwright:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# A page button whose handler calls navigator.clipboard.writeText(...).
# The Playwright click is a trusted gesture, so the write is permitted.
page.click("#copy-button")
# Inspect the surface the way a detector would: presence plus how the
# Permissions API answers for clipboard-read on this engine.
report = page.evaluate("""async () => {
const present = 'clipboard' in navigator;
let readState = 'unavailable';
try {
const s = await navigator.permissions.query({ name: 'clipboard-read' });
readState = s.state; // Chromium: 'granted' | 'denied' | 'prompt'
} catch {
readState = 'query-failed'; // Firefox: always lands here
}
return { present, readState };
}""")
print(report) # e.g. {'present': True, 'readState': 'query-failed'}
```
The values you get back are the ones a genuine Firefox returns: `navigator.clipboard`
present in the secure context, and a `clipboard-read` query that fails exactly the way it
fails on every real Firefox, rather than answering with a hand-forced constant.
[`context.grant_permissions([...])`](https://playwright.dev/python/docs/api/class-browsercontext#browser-context-grant-permissions)
works for the permissions Firefox actually implements through Playwright, such as
`geolocation`, but not for `clipboard-read` or `clipboard-write`: pass either one on a
Firefox context and Playwright itself raises `Unknown permission`, on stock Playwright as
much as on this one. There is no separate API and no workaround to learn here, because the
browser has nothing to grant; a `readText()` flow on Firefox depends on the trusted
gesture, not on a permission you can pre-approve.
The measurable point is the one from the section above: the presence flag reads true, the
`clipboard-read` query fails exactly the way it does on every real Firefox, and a
click-gated `writeText()` succeeds because the gesture was trusted. That match is what the
cross-check is looking for, and it is a property of being a real browser rather than of
any value we inject.
## What this does not fix
Passing the clipboard cross-check is a fingerprint-and-driver-layer win, and it is worth
being blunt about where that win stops.
- **IP reputation.** The clipboard gate has nothing to do with your exit address. A
coherent clipboard on a datacenter IP is still on a datacenter IP. Supply a clean exit;
see [Configuration](configuration.md) for the proxy setup.
- **Per-account quotas and rate limits.** Looking like a real browser does not raise a
limit that is counted per account or per address. Those are policy on the other side,
not a browser property.
- **Behaviour and timing.** The gate cares that a gesture is trusted, not that your pacing
is human. A trusted click fired in a machine-perfect rhythm is still a rhythm a watcher
can measure.
- **Clipboard prompts by design.** Some `readText()` flows are meant to prompt a human.
Automating your way around a deliberate consent step is a different problem from looking
real, and this page is only about the second.
invisible_playwright is built to look like a real browser driven by a real person, which
is why the fingerprint, the TLS handshake and the driver layer read as a genuine Firefox
and why checks like this one pass. It does not launder a bad IP or manufacture pacing.
Those you supply: a clean proxy and human-shaped behaviour.
## Conclusion
A website can absolutely detect that you are touching the Clipboard API, and it can ask
the Permissions API about `clipboard-read` without ever showing you a prompt. But the
async Clipboard API is a gate, not a value fingerprint: access opens only for a real
trusted gesture, and the way the Permissions API answers for `clipboard-read` has to match
how the engine you claim to be actually answers it. A patched-at-the-engine Firefox driven
by stock Playwright clears both because the gesture is genuinely trusted and the
permission plumbing is the browser's own, throw and all. That handles the browser side.
The exit and the pacing are still yours to get right.
## Short answers to the questions that lead here
**Can a website tell if I read the clipboard?** It can see that `navigator.clipboard`
exists and query `clipboard-read` on the Permissions API, which answers with a state on
Chromium and throws on Firefox. A silently rejected read also tells it which guard
tripped. It cannot turn any of that into a stable machine fingerprint.
**Is the Clipboard API a fingerprinting surface?** Barely, in the value sense. It is a
permission-and-gesture gate, so its interest to a detector is consistency and access
behaviour, not a hash that varies between machines.
**Why does `readText()` reject in my automation?** Almost always a missing trusted user
gesture. On Firefox specifically, a read that does not already satisfy that gesture rule
falls back to an ephemeral native "Paste" menu item a script cannot click. A
script-dispatched click never counts as the gesture in the first place.
**Do Playwright clicks satisfy the gesture requirement?** Yes. They go through the native
input path and arrive as trusted events, so the clipboard gate opens as it would for a
real user.
**What is the clipboard cross-check?** A detector checks whether querying the Permissions
API for `clipboard-read` behaves the way the claimed engine actually behaves: a real state
on Chromium, a specific unsupported-permission error on Firefox. A shim that answers with
a clean state on a Firefox user agent is the mismatch.
**Does a coherent clipboard mean I will not get blocked?** No. It is one browser-side
signal. IP reputation, per-account quotas and behaviour are separate and are yours to
handle.
## Sources
- W3C, [Clipboard API and events](https://www.w3.org/TR/clipboard-apis/), retrieved
2026-08-28, for the async Clipboard API and its `clipboard-read`/`clipboard-write`
permission requirements, read from the specification rather than from a blog summary.
- W3C, [Permissions API](https://www.w3.org/TR/permissions/), retrieved 2026-08-28, for
the `navigator.permissions.query()` behavior the cross-check relies on.
- MDN, [Clipboard API: Security considerations](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API#security_considerations),
retrieved 2026-08-28, for the browser divergence this page relies on: Chromium backs
`clipboard-read`/`clipboard-write` with a real, queryable Permissions API permission;
Firefox and Safari implement neither and gate access by transient activation instead.
- Mozilla Bugzilla, [bug 1560373](https://bugzilla.mozilla.org/show_bug.cgi?id=1560373),
retrieved 2026-08-28, for the `TypeError` Firefox throws on a `clipboard-write` Permissions
API query instead of returning a state, and for the WONTFIX resolution confirming Firefox
never planned to add that permission name. The same missing-enum gap is why a
`clipboard-read` query fails the identical way.
- microsoft/playwright, [issue 19888](https://github.com/microsoft/playwright/issues/19888),
retrieved 2026-08-28, for the `Unknown permission: clipboard-read` error `grant_permissions`
raises in stock Playwright. This project's own testing reproduces the identical failure
on a Firefox context, independent of anything this project changes.
- WHATWG HTML Standard, [Tracking user activation](https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation),
retrieved 2026-08-28, for the transient-activation gesture requirement the clipboard
gate sits on.
- This project's own permission and gesture gates, which check that a click-gated
operation succeeds under a trusted event and that what a page can observe from the
Permissions API matches what the real browser being claimed actually does.
**See also:** [the trusted-click boolean the clipboard gate sits on](playwright-clicks-istrusted.md),
[the permission answers that must agree](permissions-api-consistency.md), and
[the notification cross-check detectors already run](notification-permission-detection.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The clipboard opens for it
because the gesture is genuinely trusted, not because a value was faked.*
@@ -0,0 +1,220 @@
---
title: "Can a website tell you are running on a server?"
description: "Websites spot a datacenter or headless host via software WebGL, missing audio, headless metrics, datacenter ASN - and what a real fingerprint can fix and cannot."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 25
---
# Can a website tell you are running on a server?
Often, yes. Not because the code is automated, but because the host is a server:
no GPU, no sound card, no monitor, and an address that belongs to a datacenter. A
browser running there answers a handful of ordinary questions in a way that only a
server answers them, and a detector does not need anything clever to notice.
The honest split is worth stating up front. Most of these tells are JavaScript-visible
properties of the machine, and a browser that presents a real desktop persona answers
them the way a desktop does, whether the host underneath is a laptop, a Linux VM or a
Docker container. One of them is not a browser property at all: the exit IP is read at
the network layer, before any script runs, and no browser can disguise it. That one is
yours to solve with a clean proxy.
## What a server actually leaks
The failures that get a headless-host session blocked are almost never automation
flags like [`navigator.webdriver`](navigator-webdriver-explained.md). Those are solved
by every serious tool on day one. The ones that survive are hardware questions the
machine cannot answer honestly:
- **The GPU**, read through the [`WEBGL_debug_renderer_info`](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info)
extension, which on a server names a software rasterizer instead of real hardware.
- **The audio device**, read through [`AudioContext`](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext), which on a server does not exist.
- **The screen**, whose resolution, available height and device pixel ratio describe
a display that no real desktop has.
- **The exit address**, whose ASN says datacenter.
None of these are in JavaScript's gift to change from a page-level script, which is
why a stealth plugin bolted onto a stock headless browser does not touch them. They
are decided by the box the browser runs on. The rest of this page walks the first three
(which a real-browser build answers on the browser side) and then the fourth (which it
cannot).
## The software renderer tell
Ask a browser on a normal desktop what draws its graphics and it names a real GPU
vendor and model. Ask a browser on a server and, if it renders WebGL at all, it names
a software rasterizer: strings like [`llvmpipe`](https://docs.mesa3d.org/drivers/llvmpipe.html)
or [`SwiftShader`](https://github.com/google/swiftshader), or a generic "software"
renderer. That string is a plain statement that there is no graphics hardware present,
and a detector reads it as exactly that.
There is a subtler version of the same tell, and it is the one that catches half-fixes:
the renderer string can be edited to say a real GPU while the pixels are still drawn by
software. A page that draws a scene and reads back the result gets output that does not
match the name, which is [a mismatch you cannot patch from a string override](renderer-string-vs-render.md).
The name and the pixels have to agree.
invisible_playwright presents a real GPU persona, and the readback matches it, because
the presented persona is what actually answers both the string query and the render.
The [WebGL renderer strings page](webgl-renderer-strings.md) covers what a consistent
vendor/renderer pair looks like and why the two halves have to line up.
## The missing audio device and the headless screen
Sound is the same story as graphics. An AudioContext reports a sample rate, an output
latency and a channel count, and on a real machine those come from a real sound card.
A container has none, so it answers with the defaults that a headless host produces,
and the defaults are a signature. An empty or default audio profile under a desktop user
agent is a server saying it is a desktop. The mechanism is in
[AudioContext fingerprinting](audiocontext-fingerprinting.md).
The screen is the third. Headless hosts report resolutions nobody runs, a device pixel
ratio no physical display has, and an available height equal to the full height, which
means there is no taskbar because there is no desktop. Each value on its own is weak;
together they describe a monitor that does not exist. The full set of these is in
[screen size and other headless tells](screen-size-headless-tells.md).
A real-browser build answers all three as a Windows desktop would: a real GPU persona,
a real AudioContext output, and Windows screen metrics with a plausible available height
and device pixel ratio. Those answers are the same whether the host is your laptop or a
Linux container, because they are presented by the browser rather than read from the box.
## What invisible_playwright presents instead
The launch is two lines, and the browser you get back is a real Playwright
[`Browser`](https://playwright.dev/python/docs/api/class-browser), so every method is the one you already know. Here is the launch plus reading back the
three signals this page is about:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
report = page.evaluate("""() => {
const gl = document.createElement('canvas').getContext('webgl');
const dbg = gl.getExtension('WEBGL_debug_renderer_info');
const ac = new (window.AudioContext || window.webkitAudioContext)();
return {
renderer: gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL),
vendor: gl.getParameter(dbg.UNMASKED_VENDOR_WEBGL),
sampleRate: ac.sampleRate,
screen: [screen.width, screen.height, screen.availHeight],
dpr: window.devicePixelRatio,
platform: navigator.platform,
};
}""")
print(report)
```
Run that on a Linux server or inside a container and the renderer names a real GPU, the
vendor matches it, the AudioContext reports a desktop sample rate, the screen metrics
describe a Windows display with a taskbar, and `navigator.platform` reads `Win32`. The
same `seed=42` produces the same persona every run, so a value you saw once is a value
you can reproduce and diff, rather than a fresh random draw each launch.
Because the browser is a genuinely patched Firefox driven by stock Playwright, the layers
underneath the JavaScript match too: the TLS handshake and the driver surface read as a
real Firefox rather than as an automated one. That consistency is the reason it passes
most detection checks, and the way to confirm it is by comparison against a stock browser
on the same machine rather than by trusting a single verdict.
## The boundary: the datacenter IP is still visible
Here is the caveat, stated plainly because a page that only lists what it fixes is not
honest. Everything above happens inside the browser, at the JavaScript layer. The exit
IP does not. The server reads your address at the network layer before a single line of
script runs, and if that address sits in a datacenter ASN, a perfect browser fingerprint
does not hide it. The browser cannot disguise the IP, by design, because the IP is not
a browser property.
So a headless host with a flawless desktop persona and a datacenter exit has fixed the
JavaScript tells and left the network tell standing. The fix is a residential or mobile
proxy that presents a clean address, passed on launch:
```python
proxy = {
"server": "socks5://gate.example.com:1080",
"username": "user",
"password": "pass",
}
with InvisiblePlaywright(seed=42, proxy=proxy) as browser:
page = browser.new_page()
page.goto("https://example.com")
```
And the address is only the first of the things the browser does not fix. IP reputation,
per-account quotas, rate limits, and behaviour and timing are all supplied by you: a
clean exit, human pacing, and sane request volume. The [configuration page](configuration.md)
covers proxy schemes and how the browser timezone is auto-derived from the exit so the
two do not tell different stories, and the [Docker and container detection walkthrough](playwright-docker-detection.md)
covers the host-side tells in the order they usually bite.
## Conclusion
Can a website tell you are on a server? From the browser alone, it usually can, through
software WebGL, a missing audio device and headless screen metrics. A real-browser build
answers those as a desktop, on the browser side, regardless of the Linux or container host
underneath, which is why the JavaScript-visible surface stops giving the server away. What
it does not and cannot fix is the datacenter IP, which is read at the network layer and
needs a clean proxy, along with the account limits and pacing that no fingerprint touches.
Fix the machine tells with the browser, fix the address with the proxy, and pace the
behaviour yourself.
## Short answers to the questions that lead here
**Can a website detect a headless or server browser?** Often, from the machine rather
than the automation: a software WebGL renderer, no audio device, headless screen metrics,
and a datacenter IP.
**Does invisible_playwright hide that I am on a server?** It presents a real GPU, real
audio and Windows screen metrics on the browser side, so the JavaScript-visible tells look
like a desktop. It does not hide the exit IP, which is a network-layer signal.
**Is the datacenter IP a browser problem?** No. The address is read before any script runs,
so no browser can change it. That one needs a residential or mobile proxy.
**Why does a software renderer give me away?** Because a real desktop names a real GPU, and
`llvmpipe` or `SwiftShader` is a plain statement that there is no graphics hardware present.
**Do I still need a proxy if my fingerprint is perfect?** Yes, if the host is in a
datacenter. A flawless browser on a datacenter ASN is still on a datacenter ASN.
**Does this work the same in Docker as on a real machine?** The browser-side answers are
the same because the persona is presented by the browser, not read from the host. The IP
and the pacing still depend on where and how you run it.
## Sources
- MDN Web Docs: [`WEBGL_debug_renderer_info`](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info),
retrieved 2026-08-28, for the `UNMASKED_VENDOR_WEBGL` and `UNMASKED_RENDERER_WEBGL`
tokens a software renderer answers with.
- MDN Web Docs: [`AudioContext`](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext),
retrieved 2026-08-28, for the sample rate, output latency and channel count a
container reports with no sound card present.
- Mesa 3D Graphics Library documentation: [LLVMpipe](https://docs.mesa3d.org/drivers/llvmpipe.html),
retrieved 2026-08-29, for the software rasterizer whose name is one of the two strings a
GPU-less host answers `UNMASKED_RENDERER_WEBGL` with.
- Google SwiftShader, [project repository](https://github.com/google/swiftshader), retrieved
2026-08-29, for the other software renderer a headless host commonly reports in place of
a GPU.
- Playwright documentation: [`Browser`](https://playwright.dev/python/docs/api/class-browser),
retrieved 2026-08-29, for the class the launch call in this article returns unchanged.
- This project's release gates, which read WebGL renderer, AudioContext output and screen
metrics through the shipped binary on a Linux host and compare them against a stock
desktop browser.
- The per-surface pages linked throughout, each read from its own detector's source rather
than from a rendered verdict.
**See also:** [Docker and container detection](playwright-docker-detection.md),
[WebGL renderer strings](webgl-renderer-strings.md), and
[screen size and other headless tells](screen-size-headless-tells.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. It fixes the machine tells a
server leaks in JavaScript; the datacenter IP and the pacing are still yours to supply.*
@@ -0,0 +1,202 @@
---
title: "Can I Use My Real Browser Profile With Playwright?"
description: "Playwright can point at a persistent profile, but reusing your daily browser leaks cookies and your machine fingerprint. Use a dedicated seed-fixed profile instead."
parent: "The Automation Layer"
grand_parent: "Guides"
nav_order: 24
---
# Can I Use My Real Browser Profile With Playwright?
Yes, technically. Playwright can launch against a [persistent user data
directory](https://playwright.dev/python/docs/api/class-browsertype#browser-type-launch-persistent-context),
and you can point it at the exact folder your everyday browser uses. The question is not
whether it works. It is whether you want the two things that come with it: your personal
cookies and history riding along in automated traffic, and whatever inconsistent
fingerprint your daily machine happens to have.
Both are avoidable, and the fix is not "no profile". It is "a different profile". This
page separates the good idea (a persistent profile) from the risky one (your personal
one), and shows a seed-fixed persistent context that keeps login state across runs
without carrying the host machine into every request.
## What people actually mean by "my real browser profile"
Two different wishes hide under the same sentence, and they have different answers.
The first is "I do not want to log in on every run." That is a reasonable and common
need, and a persistent profile is the right tool for it: cookies, local storage and
login state survive between sessions instead of starting empty each time.
The second is "I want to reuse the profile I browse with personally, because it is
already logged in and already looks real." That is where it goes wrong. Your daily
profile is full of your own cookies, your own history and consent decisions tied to
your own identity, and none of that belongs in an automated session. It also inherits
the fingerprint of the machine it launches on, which is a separate problem covered
below.
You want the first wish granted and the second one declined.
## Why your personal profile is the wrong choice
Two independent reasons, and either one is enough on its own.
**It mixes your identity into automated traffic.** Every cookie, every stored session,
every site that recognises you is now attached to whatever the automation does. If the
automated session is flagged, throttled or challenged, it is your account that carries
the record, not a disposable one. Linkability runs both directions: the profile links
your automation to you, and links you to your automation.
**A stock profile carries whatever fingerprint the launching machine has.** This is the
part most people miss. A plain profile does not standardise the machine underneath it.
It reports the real GPU, the real fonts, the real screen and audio devices of wherever
it runs. On your laptop that is your laptop. On a server it is a server with no GPU, no
fonts and a screen size nobody has, which is [what actually gets a datacenter session
detected](playwright-detected-as-bot.md), independent of any automation flag. Reusing
your personal profile does not fix that. It just picks one specific inconsistent machine
to leak.
The durable pattern is a dedicated profile whose identity you control, not the one you
read your email with.
## The pattern that works: a dedicated, seed-fixed profile
invisible_playwright takes a persistent profile directory the same way plain Playwright
does, through `profile_dir`. The difference is what fills in the machine. Instead of the
host's real hardware, the fingerprint is derived from a seed, so the same seed produces
the same coherent Windows browser every run: same GPU, same fonts, same screen, same
audio context. Cookies and login state accumulate in the directory across runs; the
machine stays a stable, real-looking Windows instance regardless of what the host
actually is.
The launch is two lines over plain Playwright, and everything after it is stock
Playwright:
```python
from invisible_playwright import InvisiblePlaywright
# one directory, one seed, paired for good
with InvisiblePlaywright(seed=42, profile_dir="/profiles/identity-42") as browser:
page = browser.new_page()
page.goto("https://example.com/account")
# first run: log in here. the directory keeps the session.
# later runs on the same seed + directory: already logged in.
```
The `browser` object is a real Playwright `Browser`, so `new_page`, `goto`, `click`,
`fill` and every other documented method work exactly as upstream. There is no wrapped
subset to learn. Add a proxy and a timezone the same way [Configuration](configuration.md)
describes, and the identity is complete: a logged-in session, on a consistent machine,
behind the exit you chose.
The pairing is the rule to hold onto: one directory belongs to one seed, permanently. A
stable directory with a changing seed describes a browser whose history spans weeks and
whose graphics card changed overnight, which is exactly the contradiction [a persistent
profile can create if you let the seed drift](persistent-profiles.md).
## Reproduce a run, and pin what has to stay fixed
The reason a fixed seed matters for a login profile is not only realism. It is
debuggability. If every run drew a fresh machine, a failing run would tell you nothing:
you could not separate the site changing from the fingerprint changing. Log the seed
once and a failure becomes reproducible.
```python
sf = InvisiblePlaywright(profile_dir="/profiles/identity-99")
with sf as browser:
print("seed =", sf.seed) # write this down next to the directory
page = browser.new_page()
page.goto("https://example.com")
```
Record the seed beside the directory name, because the folder outlives your memory of
which number produced it. If one specific field has to hold constant across identities
for reasons of your own, [pin that field](pinning.md) and leave the rest seed-derived
rather than reusing a whole personal profile to get it.
## The honest caveat: what a profile does and does not buy you
A dedicated seed-fixed profile preserves session trust. It does not launder anything
else, and it is worth being precise about the boundary.
What it fixes: the "no history" problem. The session looks like it has been used, stays
logged in, and does not reset to a blank browser every run. What it does not touch:
- **IP reputation.** The profile says nothing about your exit. A perfect logged-in
identity on a known datacenter address is still on a known datacenter address. Supply a
clean proxy; the profile does not.
- **Per-account limits and quotas.** A site that caps actions per account still caps
them. A reused session does not raise the ceiling, and hammering it from one session is
the surest way to spend the account.
- **Rate limits and timing.** Behaviour and pacing are yours to supply. The engine makes
the browser look real; it does not make a burst of requests look human. That is a
[session-reuse-versus-relogin tradeoff](automating-login-vs-session-reuse.md) and a
pacing decision, not a fingerprint one.
invisible_playwright is built to look like a real browser driven by a real person, which
is why the fingerprint, TLS and driver layers read as a genuine Firefox and pass most
in-page detection. That is a real and useful thing. It is not the same as evading every
control, and a profile does not change where that line sits. The reader still brings the
clean exit and the human pacing.
## Conclusion
Can you use your real browser profile with Playwright? You can, and you should not. The
part you want, staying logged in, comes from any persistent profile. The part you do not
want, your personal cookies and one specific leaky machine in every request, is exactly
what reusing your daily profile adds.
Point automation at a dedicated directory, pair it permanently with one seed so the
machine underneath stays a coherent Windows browser instead of the host, and log the
seed so a bad run is reproducible. Then remember what the profile is not: it keeps the
session, and it leaves the IP, the quotas and the pacing to you.
## Short answers to the questions that lead here
**Can Playwright use an existing browser profile?** Yes, through a persistent user data
directory. The mechanism is fine. Reusing the profile you personally browse with is the
part to avoid.
**Why not just point it at my normal Chrome or Firefox profile?** Because it drags your
personal cookies and history into automated traffic and inherits the launching machine's
fingerprint, including a server's missing GPU and fonts.
**Does a persistent profile keep me logged in between runs?** Yes. Cookies and login
state live in the directory and survive across sessions, as long as one directory maps
to one seed and is never shared between concurrent runs.
**Does reusing a profile make me undetectable?** No. It fixes having no history and
nothing else. The machine, the exit IP, the account quotas and your timing are all
separate, and a profile touches none of them.
**Do I need a new seed for each profile?** Yes, a distinct seed per profile, and the
same seed every time for a given profile. The seed is the machine; the directory is the
history.
**Will a dedicated profile fix a blocked datacenter IP?** No. Session trust and IP
reputation are unrelated. A logged-in identity on a flagged address is still on a flagged
address; that needs a clean exit, not a profile.
## Sources
- Playwright's own [`launch_persistent_context`
documentation](https://playwright.dev/python/docs/api/class-browsertype#browser-type-launch-persistent-context),
which defines the user data directory mechanism this page builds on.
- This project's persistent-context handling and the seed-to-fingerprint derivation
described across these docs, including the seed and `profile_dir` pairing.
- The detection ordering in the companion checklist, where machine tells outrank
automation tells and the exit IP is a separate axis from the browser.
**See also:** [what a persistent profile fixes and breaks](persistent-profiles.md) for
the traps that come with the directory, [automating the login versus reusing a
session](automating-login-vs-session-reuse.md) for the tradeoff behind staying logged
in, and [scraping behind a login with Playwright](how-to-scrape-behind-login-playwright.md)
for the end-to-end version of this.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The seed-and-directory
pairing rule is one I wrote down after debugging a profile whose machine changed
overnight.*
@@ -0,0 +1,201 @@
---
title: "Can two devices share a browser fingerprint?"
description: "Yes - that's the goal: a shared browser fingerprint hides you among real users, while a unique one is trackable. How anonymity sets work and how to land in one."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 26
---
# Can two devices share a browser fingerprint?
Yes, two devices can present the same browser fingerprint, and if your goal is not to
be followed around, that is the outcome you want rather than the one to avoid.
The intuition most people bring to this is backwards. It feels like a fingerprint should
be unique, like a real one, and that a collision is a failure. For tracking it is the
opposite: a fingerprint that only you have is a fingerprint that follows only you. A
fingerprint that thousands of real people also have tells a tracker almost nothing about
which of them you are.
This page is about that trade, why a common configuration beats a clever one, and how to
land on a shared-looking identity on purpose instead of by luck.
## The anonymity set is the whole game
A browser fingerprint is not one value. It is a hash of many components read from
JavaScript: the GPU string, the canvas and audio outputs, the installed fonts, the
screen geometry, the platform, the language list, and dozens more. [FingerprintJS calls
the resulting hash a visitor ID](fingerprintjs-visitor-id.md), and its job is to
recognise you again on the next visit.
The number that decides whether it can is the size of the group that shares your value.
This group is the anonymity set. If ten thousand other browsers produce exactly your
hash, the visitor ID identifies a crowd, not you, and the tracker has to fall back on
other signals to tell you apart. If your hash is unique, the visitor ID identifies you
and only you, and it will do so every session until one of those components changes.
So the useful question is not "is my fingerprint unique". Uniqueness is the failure mode.
The useful question is "how many real people look exactly like this", and you want that
number large.
A one-of-a-kind fingerprint loses this even when every individual value is plausible. A
GPU nobody else reports, a screen size nobody else has, a font set assembled by no real
installer: each looks fine alone and, taken together, marks one browser out of everyone.
That is why [pinning fields by hand is risky](pinning.md) unless you know the
combination is one that real machines actually ship.
## Why a common configuration beats a clever one
The instinct to look special is exactly the wrong instinct here.
Trackers do not need to prove you are automated to follow you. They only need your
combination of values to be rare. Rarity is the signal, and it does not care whether the
values are suspicious. A perfectly innocent, perfectly consistent, perfectly unique
browser is perfectly trackable.
So the design target is the boring middle of the distribution: a Windows version many
people run, a GPU many people have, a screen size that sits on a common laptop panel, a
language list a large population shares. Land there and you disappear into a group. Land
on the tails, even with clean values, and you stand out by being precise.
This is also why "resist fingerprinting" and "blend into a crowd" are two different
strategies that can conflict. The browser's own
[resistFingerprinting mode](resist-fingerprinting.md) makes many browsers report the same
flattened values, which is one way to build an anonymity set, but the set it puts you in
is the set of people who turned that mode on, and that set has its own recognisable shape.
Blending in with the general population is a different bet: look like the common case, not
like the privacy case.
## How a seed lands you in a crowd
invisible_playwright generates each identity to look like a common, real-world Windows
machine rather than a rare or unusual one, because a configuration many genuine users
also present blends in, while a one-of-a-kind combination stands out and is trackable.
The GPU string, the renderer, and the capability limits it reports are chosen together
and cross-checked, so
[the WebGL parameters agree with each other](webgl-parameters-are-identical.md) the way a
real driver's do rather than being mixed from different machines.
Switching from stock Playwright is two lines, and the identity is generated for you:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright() as browser:
page = browser.new_page()
page.goto("https://example.com")
```
Pass a seed and every field it implies comes back identical, run after run, so you can
inspect the exact identity a seed produces and reuse it:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# same GPU, same canvas hash, same fonts, same screen, every run
```
The `browser` returned is a real Playwright
[`Browser`](https://playwright.dev/python/docs/api/class-browser). Every method works
exactly as documented upstream; there is no reduced API to learn.
Two different seeds give two different plausible identities, and because each is
generated to be a common real-world configuration, both can land in a well-populated
part of the space.
That is the sense in which two of your own devices can "share" a look: not that they hash
to the same value by accident, but that each is a common configuration, and common
configurations are shared by construction with the real population.
## The caveat: fingerprint is not the only thing matched
Blending in on fingerprint does not blend in everything, and this is the honest limit of
what any fingerprint layer can do.
A browser identity that looks like a common real machine is why invisible_playwright
passes most in-page detection: the fingerprint, the TLS handshake and the driver layer
read as a genuine Firefox rather than an automated one. That is a real and load-bearing
result. It is also only one of the axes a serious system matches on, and the others are
matched separately:
- **Your IP address.** A crowd-blending fingerprint on a datacenter address, or on a
proxy IP that is already known and shared by a thousand scrapers this minute, is
singled out by the address alone. Fingerprint collisions do not help you here; supply a
clean exit yourself.
- **Your request pattern.** Rate, timing, the order you touch pages, per-account quotas.
A hundred sessions that each look like a different real person, all arriving in the same
ten seconds from the same place, are a pattern no fingerprint hides. Human pacing is
yours to supply.
- **The story your surfaces tell together.** A common browser fingerprint with a timezone
or language that contradicts the exit IP is not blended in, it is inconsistent, and
[a timezone that does not match the proxy](timezone-proxy-mismatch.md) is one of the
most common self-inflicted versions of this.
So the accurate claim is narrow and worth stating plainly: a shared, common fingerprint
helps you avoid being tracked and identified by fingerprint. It does nothing for IP
reputation, quotas, rate limits, or behaviour. Those are matched on their own, they can
single you out on their own, and the reader supplies the clean proxy and the human pacing
that address them. Anyone promising that one browser makes a session undetectable is
selling the part that does not exist.
## Conclusion
Two devices sharing a browser fingerprint is not a bug, it is the objective. Uniqueness
is what makes a browser trackable across sessions; membership in a large group of
look-alike real users is what makes it hard to follow. Sampling common, cross-checked
real-world configurations lands you in that group on purpose. Then pair it with an
address and a rhythm that fit the same story, because fingerprint blending buys you the
fingerprint axis and only that one.
## Short answers to the questions that lead here
**Can two devices have the same browser fingerprint?** Yes. Many components are shared by
large populations, so identical hashes across devices are normal, and for anti-tracking
they are what you want.
**Is a unique fingerprint good or bad?** Bad, if you do not want to be followed. Unique
means recognisable on every future visit. Common means lost in a crowd.
**Does sharing a fingerprint make me anonymous?** On the fingerprint axis it hides you in
a group. It does nothing about your IP address or your request pattern, which are matched
separately and can identify you on their own.
**Why does invisible_playwright aim for a common configuration instead of a rare one?**
Because rarity is the tracking signal. A configuration many real users also present puts
you in a large anonymity set instead of marking you out.
**If I pass the same seed on two machines, do they look identical?** Yes. The same seed
produces the same GPU, canvas, audio, fonts and screen, which is deliberate: it makes a
run reproducible and lets two devices present the same known-good identity.
**Will a good fingerprint alone stop me from being blocked?** No. It handles the
fingerprint, TLS and driver layers. A datacenter IP or a robotic request pattern is still
a datacenter IP or a robotic pattern, and you supply the clean exit and the human pacing.
## Sources
- The FingerprintJS open-source library's visitor ID model, [read from its own
source](https://github.com/fingerprintjs/fingerprintjs), retrieved 2026-08-28, for how
many components combine into one recognisable hash.
- Mozilla's own documentation of the `privacy.resistFingerprinting` mode, [read on its
own wiki page](https://wiki.mozilla.org/Security/Fingerprinting), retrieved
2026-08-28, for how the mode flattens timezone, locale and window size to one shared
value instead of a unique one.
- This project's approach of generating common, real-world Windows and GPU
configurations rather than unique ones, and its cross-checking of GPU string, renderer
and capability limits against each other.
- This project's release gates, which separate fingerprint realness from IP and request
signals precisely because a clean fingerprint does not clear the other two.
**See also:** [what a FingerprintJS visitor ID actually measures](fingerprintjs-visitor-id.md),
[why the WebGL parameters have to agree with each other](webgl-parameters-are-identical.md),
and [when the timezone does not match the proxy](timezone-proxy-mismatch.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The anonymity-set framing
is the one that keeps me from "fixing" a shared fingerprint that was doing its job.*
@@ -0,0 +1,192 @@
---
title: "Can websites detect a datacenter or proxy IP?"
description: "Yes, directly at the network layer. No fingerprint can hide the IP the connection arrives on. Why fingerprint and IP layers are independent and both must be right."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 16
---
# Can websites detect a datacenter or proxy IP?
Yes, directly. The server sees the address your connection arrives on before a
single line of your JavaScript runs, and it can look that address up: which
network owns it, whether it belongs to a hosting provider or a home broadband
line, and whether it has been abused recently. No browser fingerprint changes
that lookup, because the address is a property of the connection, not of the
page.
This is the honest boundary of any browser-side stealth. A tool like
invisible_playwright makes the browser look like a real person's, and that is
most of what public detection checks read. It does not, and cannot, change the
reputation of the IP you route through. Those are two independent layers, and
both have to be right.
## What the server reads before your page loads
Every request carries a source IP. From that one number the receiving server
derives, with no cooperation from you:
- **The ASN**, the [autonomous system number](https://datatracker.ietf.org/doc/html/rfc1930),
which identifies the network that owns the address block. Hosting and cloud
providers have their own ASNs, and they are trivially separable from
consumer broadband and mobile carriers.
- **The address type**, datacenter versus residential versus mobile, which
public and commercial datasets label directly.
- **Reputation**, meaning whether this address or its neighbours have recently
sent traffic that looked automated or abusive. Shared and heavily recycled
exits accumulate this quickly.
None of that is a browser property. It is decided at the network layer, the same
layer that carries the [TLS handshake no in-page test can see](how-to-test-bot-detection.md).
A perfect fingerprint sitting on an address the server already distrusts is a
consistent browser on a flagged IP, and the flag wins.
## Why the fingerprint cannot reach it
The fingerprint cannot reach the IP because the two are different kinds of
value: the fingerprint is data the browser volunteers to the page, and the IP
is decided by the network carrying the connection, which the page never
touches.
A fingerprint is everything the page can measure about the client from inside
the sandbox: the user agent, the GPU string, the canvas and audio hashes, the
font list, the screen, the language settings. All of it is data the browser
volunteers in response to JavaScript. That is exactly why it is spoofable, and
why matching it to a real Windows machine is worth doing.
The IP is the opposite kind of value. It is not something the browser reports;
it is where the packets came from. The browser cannot lie about it because the
browser is not the one telling the server. The network is. You can change which
IP you arrive on by routing through a different proxy, but you cannot make a
given IP read as something it is not, and no amount of in-page patching touches
it. This is the single most common misunderstanding about stealth: people expect
a good fingerprint to cover the address, and the two never meet.
## Both layers, independently, with the real API
Because the layers are independent, you supply the IP and the tool supplies the
browser. The proxy is passed at launch, and everything downstream is stock
Playwright:
```python
from invisible_playwright import InvisiblePlaywright
proxy = {
"server": "socks5://gate.example.com:1080",
"username": "user",
"password": "pass",
}
with InvisiblePlaywright(seed=42, proxy=proxy) as browser:
page = browser.new_page()
page.goto("https://example.com/")
print(page.title())
```
Two things are happening here, and they are separate. `seed=42` fixes the
browser half: the same GPU, canvas hash, audio context, fonts and screen every
run, so a failure is reproducible. `proxy=...` fixes the IP half: every request,
including DNS, leaves through that exit. The `browser` object is a real
Playwright [`Browser`](https://playwright.dev/python/docs/api/class-browser), so
`new_page`, `goto`, `click` and the rest behave exactly as documented upstream.
By default, with no `timezone=` argument, the browser timezone is derived from
the exit IP so the two stories agree. If you want to confirm the exit is what you
think it is, read it from inside the browser rather than assuming, and check that
[WebRTC is not reporting a second address next to the proxy's](how-to-check-proxy-ip-leak.md).
## Choosing the IP half so it does not undo the browser half
The fingerprint work is wasted if the address is one a server distrusts on sight.
Two rules follow directly from what the server reads:
- **Type matters more than count.** A residential or mobile exit shares an ASN
and an address type with ordinary human traffic; a datacenter exit does not,
no matter how many of them you rotate through. Rotation does not change the
type.
- **Freshness matters as much as type.** A large share of cheaply available
proxies are already public, which means their addresses are already on the
lists servers consult, and they were flagged before you ever used them. The
distinction between a clean exit and a burned one is not price, it is whether
the address is already known. The tradeoffs between exit protocols are covered
in [SOCKS5 versus HTTP proxies for a browser](socks5-vs-http-proxy-browser.md),
and the reputation problem itself in
[why scraping gets blocked even through a proxy](web-scraping-getting-blocked-proxies.md).
Get both halves right and the server sees a genuine Firefox arriving from an
address that looks like a person's. Get the browser right and the IP wrong, and
you have built a careful disguise and then signed it at the door.
## What this does and does not fix
To be explicit, because overclaiming here is both false and a real risk:
invisible_playwright is designed to look like a real browser driven by a real
person, and that is why it passes most fingerprint, TLS and driver-layer checks:
those layers read as a genuine Firefox. On its own it does not fix IP reputation,
per-account quotas, rate limits, or behaviour and timing. Those are yours to
supply: a clean exit for the address, human pacing for the behaviour, sane limits
for the account. There is no setting that makes an IP undetectable, because the
IP is not something the browser gets to describe.
## Conclusion
Can websites detect a datacenter or proxy IP? Yes, directly and early, at a layer
no fingerprint reaches. The browser fingerprint and the IP are independent
signals, read by different parts of the stack, and a detector that sees a perfect
browser on a flagged address believes the address. So match the browser, which is
what this tool does, and pair it with an exit whose type and reputation hold up,
which is what you bring. Neither half alone is a session; both right is.
## Short answers to the questions that lead here
**Can a browser fingerprint hide my IP?** No. The IP is where the connection
comes from, not something the browser reports, so no in-page value or spoof
changes it.
**Will a residential proxy alone get me through?** It fixes the address half. If
the browser still looks automated, a clean IP does not save it. Both layers have
to be right.
**How does a site know my IP is a datacenter?** From the ASN and address-type
datasets tied to the IP. Hosting networks have their own autonomous system
numbers and are labelled as such in public data.
**Does rotating IPs help?** It helps with rate limits and per-address velocity.
It does not change the type: rotating datacenter exits are still datacenter
exits.
**Can invisible_playwright change my ASN or reputation?** No, and nothing on the
browser side can. It handles the fingerprint, TLS and driver layers; you supply
the exit.
**Why do I pass every fingerprint test and still get blocked?** Because the
suites do not see your address, and a consistent browser on a distrusted IP is
still on a distrusted IP.
## Sources
- [RFC 1930](https://datatracker.ietf.org/doc/html/rfc1930), the IETF guidelines
that define an Autonomous System as a routing policy unit and specify the ASN
that identifies it.
- [Playwright's `Browser` class reference](https://playwright.dev/python/docs/api/class-browser),
for what the `browser` object in the example above exposes once the proxy is
wired in.
- This project's default behaviour: the proxy dict passed at launch routes every
request and its DNS through the exit, and the browser timezone is derived from
that exit unless an explicit zone is set.
- The [configuration notes](configuration.md) on proxy schemes and on why roughly
nine in ten cheap proxies are already known before first use.
- The [testing method page](how-to-test-bot-detection.md), which lists IP
reputation among the things no in-page suite covers.
**See also:** [the checklist for being detected on one site](playwright-detected-as-bot.md),
[how to check for a proxy IP leak](how-to-check-proxy-ip-leak.md), and
[when the timezone does not match the proxy](timezone-proxy-mismatch.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The browser half is
what the patch does; the IP half is the one honest thing it cannot do for you.*
+206
View File
@@ -0,0 +1,206 @@
---
title: "Can websites detect Playwright? What is actually visible"
description: "Stock Playwright exposes a webdriver flag, protocol artifacts and mismatched OS fingerprint. Which signals catch your run, and what a patched Firefox fixes."
parent: "The Automation Layer"
grand_parent: "Guides"
nav_order: 20
---
# Can websites detect Playwright? What is actually visible
Yes, in principle. Stock Playwright leaves signals in the page that a script can read,
and any one of them is enough to tell "this is automated" from "this is a person". But
"in principle" is doing real work in that sentence. Whether a given site catches your
specific run depends entirely on which of those signals it bothers to check, and there
are only a handful of them.
This page enumerates the concrete tells a page can read, maps each to what a real-looking
browser does about it, and shows the two-line launch that removes the browser-level ones.
It also states plainly what that launch does not touch, because a page that promised you
undetectability would be lying to you.
## The three signals a page can actually read
Strip away the folklore and stock Playwright exposes three families of tell to in-page
JavaScript:
- **A driver flag.** `navigator.webdriver` is defined by the
[WebDriver automation standard](https://www.w3.org/TR/webdriver2/), and a page reads it
with one property access.
- **Protocol and automation artifacts.** Globals left in scope by a stealth layer, a
built-in whose `toString()` no longer says `[native code]`, an event that arrives
without the trusted bit a real click carries.
- **A fingerprint that contradicts itself.** The user agent claims one operating system
while the GPU string, the font list, the audio device or the screen geometry describe a
headless machine somewhere else.
Everything a page-level bot check does falls into one of those three. The rest of this
article takes them one at a time.
## Signal one: the webdriver flag
The cheapest check there is. Under standard automation, `navigator.webdriver` returns
`true`, and a single line of page script reads it.
The naive fix makes things worse. Setting the property to `false` from a script is itself
a tell, because a genuine browser that was never automated reports `undefined`, not
`false`. A value where there should be an absence is a signature of its own. The correct
behaviour is the one an untouched browser produces, and getting there from JavaScript
patching is [harder than it looks](navigator-webdriver-explained.md).
invisible_playwright drives a Firefox patched at the C++ level, so the flag reports the
real-browser value without a script ever assigning it. There is no override to catch,
because nothing overrode anything.
## Signal two: automation globals and protocol artifacts
Automation globals and protocol artifacts are what the act of driving the browser leaves
lying around, and they exist whether or not the driver flag above was ever touched.
JavaScript stealth plugins reach into built-ins to hide the first signal, and in doing so
they create the second: a redefined function whose `toString()` stops returning
`[native code]`, a property descriptor that a real engine never has, a global that only a
particular tooling stack defines. A tampering-oriented suite such as CreepJS does not ask
what you report, it asks whether anything you report contradicts anything else, and a
built-in that has been rewritten is exactly that kind of contradiction. This is
[the native-code check](tostring-native-code-detection.md), and it is the reason stacking
two disguises reads worse than one.
Because the browser is patched in the engine rather than in the page, there are no
injected globals to enumerate and no rewritten built-ins to catch with `toString()`. The
functions a page inspects are the genuine ones.
## Signal three: a fingerprint that does not match the claimed OS
A fingerprint that contradicts the claimed operating system is the family that catches most
server-side automation, and it has nothing to do with the driver at all.
A page reads the user agent, then reads the GPU renderer string, the installed fonts, the
audio device parameters and the screen geometry, and checks that they tell the same story.
A headless machine in a datacenter usually fails that check without any automation flag
being set: a software renderer under a claim of desktop hardware, a font set that belongs
to a different operating system, an audio stack answering with defaults, a screen
resolution no real display has. None of those are automation tells. They are
"this is a datacenter" tells, and they survive every page-level patch because they are not
in JavaScript's gift to change.
invisible_playwright derives a complete, internally consistent fingerprint from a seed:
GPU, canvas, audio, fonts and screen, roughly 400 fields, generated to agree with each
other and to describe a real Windows desktop rather than the host the code runs on. Same
seed, same machine, every run, which is what makes a failure reproducible enough to bisect.
This is the family that a real-browser fingerprint fixes and a property patch cannot, and
it is why the launch below passes most JS detection: the driver layer, the fingerprint and
the TLS handshake all read as a genuine Firefox.
## The launch that removes the browser-level tells
Switching from stock Playwright is two lines, and the object you get back is a real
Playwright `Browser`, so every method you already use works unchanged.
```python
from invisible_playwright import InvisiblePlaywright
# seed=42 makes the identity reproducible; drop it for a fresh one each run
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# navigator.webdriver reads as a real browser; the fingerprint is consistent
print(page.evaluate("navigator.webdriver"))
```
Add a proxy when you deploy, since the browser-level tells are only half the picture:
```python
from invisible_playwright import InvisiblePlaywright
proxy = {"server": "socks5://gate.example.com:1080", "username": "u", "password": "p"}
with InvisiblePlaywright(seed=42, proxy=proxy) as browser:
page = browser.new_page()
page.goto("https://example.com")
```
The async API is identical, `from invisible_playwright.async_api import InvisiblePlaywright`
with `await` in front of the page calls. Nothing else about your Playwright code changes.
## What this does not fix, and why saying so matters
Here is the honest boundary, because a tool that removed only some of the signals and let
you believe it removed all of them would get you blocked with more confidence, not less.
The launch above addresses the three browser-level families: the driver flag, the
automation artifacts and the fingerprint, plus the TLS handshake, because the request is
made by a real Firefox rather than something impersonating one. What it does not touch:
- **IP reputation.** A consistent browser on a known datacenter address is still on a
known datacenter address. You supply a clean exit.
- **Per-account quotas and rate limits.** A perfect fingerprint does not raise a limit the
account already hit.
- **Behaviour and timing.** A burst of identical requests, a form filled in eighty
milliseconds, a session with no pointer motion. Some sites do not fingerprint at all,
they watch, and pacing is on you.
So the accurate claim is narrow and true: invisible_playwright makes the browser read as a
real one, which is why it passes most in-page detection. It does not make the session
invulnerable, and no software can, because half the signals are about the network and the
account rather than the browser. When a run still fails with all three browser families
clean, the [checklist for being detected on one site](playwright-detected-as-bot.md) works
the remaining suspects in the cheap-first order, and the network layer has
[its own page on the handshake](ja3-ja4-tls-fingerprint.md).
## Conclusion
Can websites detect Playwright? They can detect stock Playwright whenever they check for
one of three things: the webdriver flag, automation artifacts, or a fingerprint that
disagrees with the claimed OS. A patched Firefox driven by stock Playwright removes all
three at the engine level, which is why it clears most JavaScript detection. It does
nothing for your IP, your quotas or your pacing, so the honest answer to the title is that
it fixes the browser and leaves the rest to you. Verify it the way you would verify
anything here: [compare against a stock browser and run it more than once](how-to-test-bot-detection.md).
## Short answers to the questions that lead here
**Can a website tell I am using Playwright?** If it checks the webdriver flag, automation
artifacts or fingerprint consistency, yes for stock Playwright. A patched-engine browser
removes those browser-level tells.
**Does invisible_playwright make me undetectable?** No, and nothing does. It makes the
browser read as a real Firefox, which passes most in-page checks. Your IP, account limits
and behaviour are separate and still yours to handle.
**Is navigator.webdriver enough to catch me?** It is the cheapest check and stock
automation fails it. Setting it to `false` in a script is its own tell; a real browser
reports `undefined`.
**Why do I pass fingerprint tests and still get blocked?** Because those tests do not see
your address, your request rate or your timing, and a consistent browser on a datacenter
IP is still on a datacenter IP.
**Do stealth plugins help?** They fix the first signal and often create the second: a
rewritten built-in that a tampering check flags. Running one on top of a patched engine is
two disguises contradicting each other.
**How do I check what a site actually reads?** Open a detection suite in your automated
browser and a stock browser on the same machine, and diff the reports field by field
rather than reading the score.
## Sources
- The [W3C WebDriver specification](https://www.w3.org/TR/webdriver2/), which defines the
`navigator.webdriver` property and the automation flag behind it.
- This project's real API surface, `InvisiblePlaywright(seed=...)` and the returned
Playwright `Browser`, as documented in the quickstart and configuration pages.
- The public detection suites CreepJS, BotD, FingerprintJS, sannysoft and BrowserLeaks,
each of which reads one or more of the three signal families described above.
- This project's release gates, which assert the presence of a real-browser signal rather
than the absence of a wrong one, and separate browser tells from IP and behaviour.
**See also:** [the webdriver flag in detail](navigator-webdriver-explained.md),
[the checklist for a single blocking site](playwright-detected-as-bot.md), and
[how to test whether your browser is detected](how-to-test-bot-detection.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The honest boundary in the
last section is the one I most wish more of these pages drew.*
@@ -0,0 +1,208 @@
---
title: "Can you be fingerprinted in incognito mode?"
description: "Yes: incognito mode clears cookies and site storage but leaves canvas, WebGL, fonts, user agent, timezone and the TLS handshake fully readable and re-linkable."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 23
---
# Can you be fingerprinted in incognito mode?
Yes. This is the single most common misunderstanding about private browsing, and it is
worth stating plainly before the details: incognito mode clears **state**, not
**identity**. It empties cookies and site storage at the end of a session. It does not
change what your browser looks like while the session is running, and that is exactly
the part fingerprinting reads.
This page is what private mode actually does, why stateless fingerprinting is untouched
by it, how a service re-links you across incognito windows anyway, and what changing the
fingerprint values themselves looks like in practice.
## What private mode actually clears
Open a private window and the browser makes one promise: when you close it, the cookies,
`localStorage`, `sessionStorage`, IndexedDB and cache from that session go away. History
is not written to disk. That is the whole feature, and for its intended purpose (a shared
family computer, not leaving a booking half-finished in your history) it does that job.
Notice what is on that list: all of it is **state the site wrote to your machine**. A
cookie is a value the server set and asked you to hand back. Private mode's guarantee is
that you stop handing those back once the window closes.
Nothing on that list is a property of the browser itself. And identification does not
need you to hand anything back.
## Why stateless fingerprinting does not care
A cookie is something you were **given**. A fingerprint is something you **are**. Private
mode only deletes the first kind.
When a page measures your browser, it reads values the browser exposes on request, no
storage involved:
- **Canvas.** The page draws text and shapes to an offscreen canvas and
[reads the pixels back](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
as an encoded image. The exact bytes depend on your GPU, drivers and font rasterizer, and
they are identical in a private window because it is the same GPU. See
[why canvas output can change every run](canvas-fingerprint-changes-every-run.md) for
what a real defense against this looks like.
- **WebGL.** The
[renderer and vendor string](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info)
and the numeric limits of your graphics stack. Same machine, same values, private or not.
- **Fonts.** The list of installed fonts, measured by rendering and comparing widths. A
private window renders with the same fonts.
- **User agent, platform, language, timezone.** All reported the same way in incognito.
- **The [TLS handshake](https://datatracker.ietf.org/doc/html/rfc8446).** Decided by the
network stack before a single line of page JavaScript runs, so no browsing mode touches
it. [No in-page test can even see it](ja3-ja4-tls-fingerprint.md), and neither can
incognito.
Read that list again against the previous section. There is no overlap. Private mode
clears cookies and storage; fingerprinting reads GPU, fonts, TLS and the rest. The two
sets do not intersect, which is why a fingerprint survives the mode that was supposed to
protect it.
## How you get re-linked across incognito windows
Here is the part that surprises people. Because the fingerprint is stable and does not
depend on stored state, a service can compute the same identifier in a normal window, in
a private window, and in a second private window you opened an hour later to "start
fresh". [FingerprintJS builds exactly this kind of visitor ID](fingerprintjs-visitor-id.md)
by hashing many of those stateless components together.
So the common workflow of "open an incognito window to look like a new visitor" does not
produce a new visitor. It produces the same visitor with an empty cookie jar. The site
sets a fresh cookie, ties it to the fingerprint it just computed, and the link is
restored on the first request. Clearing the cookie deleted the label on the folder, not
the folder.
This is not a bug in private mode. Private mode never promised a new identity. It
promised no leftover state, and it delivers that.
## Changing the values themselves, not clearing storage
If the problem is that the fingerprint values are stable and readable, the fix is to
change the values, which is the specific thing private mode does not do. That is what
invisible_playwright does: a Firefox patched at the C++ level so that canvas, WebGL,
fonts, screen and the rest report seed-derived values, driven by stock Playwright.
Two lines to launch, and the browser you get back is a real Playwright
[`Browser`](https://playwright.dev/python/docs/api/class-browser) with every standard
method:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# canvas, WebGL, fonts, screen all report seed-42 values,
# not this machine's values
```
The seed is the whole point. The same seed produces the same coherent identity every
run, and a different seed produces a different one. So where private mode gives you the
same machine with its storage wiped, a new seed gives you a genuinely different machine
that happens to be internally consistent:
```python
# a different, self-consistent identity - a different GPU, fonts, canvas hash
with InvisiblePlaywright(seed=7) as browser:
page = browser.new_page()
page.goto("https://example.com")
```
You can prove the difference to yourself. Open a public fingerprinting suite with
`seed=42`, note the visitor ID or the canvas hash, close it, reopen with `seed=42`, and
it matches. Change to `seed=7` and it moves. That is the value changing, which is the
axis incognito leaves fixed. For the Firefox `about:config` route to the neighbouring
problem, [`privacy.resistFingerprinting` and what it trades away](resist-fingerprinting.md)
is worth reading before you reach for it.
## The honest caveat: it does not change your IP
There is one thing this shares with private mode: neither touches your IP address.
Incognito does nothing for your address, and neither does changing the fingerprint. Your
exit IP, its reputation, and the ASN it sits in are all still exactly what they were.
This matters because a perfect, distinct, self-consistent browser on a datacenter IP that
a thousand other automated sessions are using this minute is still on that IP. The
fingerprint and the driver layer reading as a genuine Firefox is why most detection
checks pass; it is not why a session passes. The reader supplies the rest:
- **A clean exit.** The fingerprint work is wasted behind an address already on a
blocklist. See [Configuration](configuration.md) for proxy setup.
- **Human pacing and behaviour.** Timing, pointer motion and typing rhythm are a separate
surface that no fingerprint change addresses.
- **Per-account quotas and rate limits.** A new fingerprint is not a new account, and it
does not reset a counter the service keeps on its own side.
Changing the fingerprint fixes the fingerprint. It does not fix the network or the
behaviour, and claiming otherwise would be false.
## Conclusion
Can you be fingerprinted in incognito mode? Yes, identically to a normal window, because
private mode clears the cookies and storage a site wrote to your machine and leaves every
readable property of the browser (canvas, WebGL, fonts, user agent, timezone, TLS)
exactly where it was. Stateless fingerprinting reads those properties, so it works the
same in either mode, and a service can re-link you across incognito windows on the
fingerprint alone.
Changing the values themselves is a different operation from clearing state, and it is
the one incognito does not perform. invisible_playwright performs it per seed, so the
same input gives the same consistent identity and a new input gives a new one. Pair that
with a clean exit and human pacing, because the fingerprint is only one of the surfaces a
session is judged on.
## Short answers to the questions that lead here
**Does incognito mode stop fingerprinting?** No. It clears cookies and site storage at
the end of the session and changes nothing about canvas, WebGL, fonts, user agent,
timezone or TLS, which are what fingerprinting reads.
**Can a site tell it is the same person across two incognito windows?** Yes. The
fingerprint is stable and does not depend on stored state, so the same identifier is
computed in each window and the empty cookie jar is refilled and re-linked on the first
request.
**What does private mode actually protect me from?** Leaving state behind on the machine:
history, cookies and cache from that session. That is a real feature, just not an
anti-fingerprinting one.
**Does incognito change my IP address?** No, and neither does changing the fingerprint.
The exit IP and its reputation are a separate surface you have to handle yourself.
**How do I actually get a different fingerprint?** Change the values the browser reports
rather than clearing what a site stored. invisible_playwright does this per seed, so a
new seed is a new coherent identity.
**Is a new seed the same as a new incognito window?** No. An incognito window is the same
machine with its storage wiped. A new seed is a different machine, self-consistent across
its fields.
## Sources
- Firefox's own documentation of what private browsing clears (cookies, storage, history)
and, by omission, what it does not.
- The specs behind each stateless signal above:
[`HTMLCanvasElement.toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
for the canvas read-back, [`WEBGL_debug_renderer_info`](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info)
for the GPU renderer/vendor string, and [RFC 8446](https://datatracker.ietf.org/doc/html/rfc8446)
for where the TLS handshake sits relative to page JavaScript.
- The public detection suites named in this set, read for how each computes an identifier
from stateless components, each with its own page here.
- This project's seed-to-fingerprint pipeline and release gates, which measure the same
seed producing the same identity across runs.
**See also:** [how a stable visitor ID is built](fingerprintjs-visitor-id.md),
[what canvas fingerprinting reads and how to change it](canvas-fingerprint-changes-every-run.md),
and [the TLS handshake no browsing mode can hide](ja3-ja4-tls-fingerprint.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. Private mode clears what a
site stored on you; this project changes what the browser is, which is the axis private
mode leaves alone.*
@@ -0,0 +1,212 @@
---
title: "Can you run invisible_playwright serverless?"
description: "Why invisible_playwright mostly does not fit serverless: size of patched-Firefox is the blocker. Containers and long-lived workers are the actual home."
parent: "Scraping with Playwright"
grand_parent: "Guides"
nav_order: 84
---
# Can you run invisible_playwright serverless?
Mostly no, and for a structural reason rather than a setting you have not found yet.
The blocker is not a config flag. It is that this tool launches a full, real browser,
and a serverless function is sized for code that does not.
This page is the mechanism behind that answer, the one place it does fit, and the
container or long-lived worker that is the honest recommendation instead.
## The short answer, and why it is structural
invisible_playwright is not a JavaScript shim that patches an existing browser. It ships
a patched Firefox, built at the C++ level, and drives it with stock Playwright. On first
use it downloads that binary (about 238 MB compressed, roughly 544 MB once unpacked, as
listed on the [installation](installation.md) page), verifies a sha256, and caches it.
A real launch then needs that unpacked tree on disk plus working memory for the browser
process itself.
A typical function-as-a-service runtime caps three things at once: deployment package
size, memory, and wall-clock execution time. All three fight a cold-start browser
launch. The download alone can exceed a package limit; the unpacked tree plus a running
Firefox can exceed the memory limit; and downloading and starting a browser per
invocation can exceed the time limit before your first `goto` returns.
So the answer is not "add a bigger timeout". The weight of a real browser is the thing
that does not fit, and no configuration removes it.
## What a function actually has to do to launch this
Walk through a cold invocation of a function that has never run before:
1. Fetch the engine. If it is not baked into the image, that is a ~238 MB download on
the critical path, before any of your code runs.
2. Unpack and place it. Roughly 544 MB has to land somewhere writable and readable.
3. Verify it. A sha256 pass over the cached engine.
4. Launch Firefox and connect Playwright over its protocol.
5. Only now open a page and do the work you came for.
Steps 1 through 4 are pure overhead, and on a serverless platform they can repeat on
every cold start because the local disk and memory a function sees do not persist between
invocations by design. You are paying browser-startup cost per request instead of once.
## Where the weight goes: download, unpack, and resident memory
Three separate limits, three separate ways this fails:
- **Package or layer size.** Many function platforms cap the deployed artifact well
under the unpacked engine size. Baking Firefox into the deployment can blow past the
limit outright.
- **Ephemeral disk.** The engine has to be unpacked somewhere. A read-only or tiny
scratch filesystem cannot hold it.
- **Memory.** A real Firefox rendering a real page has a real resident-set size. Add the
unpacked binary in page cache and a modest function memory tier is gone.
The download can be moved off the critical path with a cache directory, and the wrapper
supports exactly that: `INVISIBLE_PLAYWRIGHT_CACHE_DIR` points the engine at a path your
platform already caches between runs, and `INVPW_BINARY_PATH` skips the download entirely
when a compatible binary is already on disk (see [Configuration](configuration.md)). That
helps a persistent worker a great deal. It helps a stateless function much less, because
the thing a function does not keep is exactly the local disk those variables point at.
## The recommendation: a container image or a long-lived worker
The honest home for this tool is somewhere the browser is unpacked once and reused across
many jobs:
- **A container image** with the engine already inside it, run on a service that keeps
the container warm. The unpack happens at build time, not per request. This is common
enough to have its own walkthrough in
[how to use invisible_playwright in Docker](how-to-use-invisible-playwright-in-docker.md),
and the fingerprint pitfalls specific to containers are in
[running Playwright in Docker undetected](how-to-run-playwright-docker-undetected.md).
- **A long-lived worker or VM** that launches the browser once at startup and pulls jobs
from a queue, reusing the same process across many pages.
Both share one property that a stateless function cannot: the ~238 MB download and the
~544 MB unpack are paid once, at startup or build, and every job after that reuses a warm
browser. That is the difference between browser cost per deployment and browser cost per
request.
Here is a minimal worker that launches once and reuses the browser across a list of jobs.
The `browser` returned is a real Playwright
[`Browser`](https://playwright.dev/python/docs/api/class-browser), so every method is the
stock API:
```python
from invisible_playwright import InvisiblePlaywright
JOBS = [
"https://example.com/a",
"https://example.com/b",
"https://example.com/c",
]
# seed=42 makes the identity reproducible, so a failing job replays exactly.
with InvisiblePlaywright(seed=42) as browser: # binary unpacked once, reused below
for url in JOBS:
page = browser.new_page()
page.goto(url)
print(url, page.title())
page.close()
```
In a real worker the `for` loop is a queue consumer, and the `with` block stays open for
the life of the process. The launch cost is amortized across every job the worker ever
handles, which is the whole point of not being serverless.
If you must fetch the engine ahead of time in an image build, do it as an explicit build
step so the download never lands on a request path:
```dockerfile
FROM python:3.12-slim
RUN pip install invisible-playwright
# Unpack the engine at BUILD time, not per request.
RUN python -m invisible_playwright fetch
# ... your worker entrypoint ...
```
## What the stealth actually does for you here, and what it does not
invisible_playwright is designed to look like a real browser driven by a real person, and
that is why it passes most detection checks: the fingerprint, the TLS handshake and the
driver layer read as a genuine Firefox rather than as automation. That property is the
same whether the browser runs in a function, a container, or a VM - where it runs does not
change what it looks like, which matters here because "serverless" and "undetected" get
searched together and are different problems.
What it does not do, on its own and in any environment:
- **IP reputation.** A genuine-looking browser on a known datacenter address is still on a
known datacenter address. You supply a clean exit.
- **Per-account quotas and rate limits.** These are counted server-side against your
account or key, not read off the browser.
- **Behaviour and timing.** Pacing, pointer motion and the rhythm of a session are yours
to shape. An automated cadence is visible no matter how real the fingerprint is.
Serverless makes the last one worse in a specific way: fan-out. A hundred functions firing
at once, from a small pool of platform egress addresses, in a burst no human pace explains,
is a velocity signal you created by the deployment shape rather than by the browser. A warm
worker pulling jobs at a human interval is easier to keep honest. None of that is a claim of
evasion; it is the list of things you still have to get right yourself.
## Conclusion
Can you run invisible_playwright serverless? Technically sometimes, on a generous
container-backed function tier with the engine baked into the image and kept warm.
Practically, a plain stateless function that downloads and launches a full Firefox per
invocation will be slow and fragile even where it fits, because the browser weight is
structural and no setting removes it.
The tool's job is to make the browser look real, and it does that anywhere it runs. The
deployment's job is to give that browser a warm home, a clean exit and a human pace. Put
the browser in a container image or a long-lived worker, pay the unpack once, and reuse it.
## Short answers to the questions that lead here
**Can I deploy invisible_playwright to a serverless function?** Usually not on a plain
stateless function. The patched Firefox is about 238 MB to download and roughly 544 MB
unpacked, which fights typical size, memory and time limits. A container image or a warm
worker is the real home.
**Why is the browser so heavy?** Because it is a real, full Firefox patched at the C++
level, not a JavaScript patch over an existing browser. That weight is why the fingerprint
and TLS read as genuine, and it is also why it does not fit a tiny function.
**Can I just make the function timeout longer?** No. Size and memory limits fail
independently of time, and a per-request download and launch is overhead you pay on every
cold start regardless of the timeout.
**Does running it in a container make it undetectable?** No tool is undetectable. A
container is the right place to unpack the browser once and keep it warm, but it does not
fix your IP reputation, your account quotas, or your timing. You supply those.
**How do I avoid downloading Firefox on every invocation?** Bake it into the image at
build time, or point `INVPW_BINARY_PATH` at a binary already on disk. On a stateless
function neither fully helps, because the local disk does not persist between calls.
**What is the smallest thing that works?** A single long-lived worker: launch once inside
a `with InvisiblePlaywright(...) as browser:` block, then consume a job queue inside that
block so the browser is reused for the life of the process.
## Sources
- This project's [installation](installation.md) and [configuration](configuration.md)
pages, for the measured engine download and unpacked sizes and the cache and binary-path
environment variables.
- The container walkthroughs in this set, linked above, for the build-time unpack pattern.
- Playwright's own [`Browser` class reference](https://playwright.dev/python/docs/api/class-browser),
for the stock API this wrapper hands back unchanged.
- General serverless platform limits on package size, memory and execution time, which are
documented per platform and are what the browser weight runs into.
**See also:** [how to use invisible_playwright in Docker](how-to-use-invisible-playwright-in-docker.md)
for the container build, [running Playwright in Docker undetected](how-to-run-playwright-docker-undetected.md)
for the fingerprint tells a headless container adds, and
[what a datacenter container gives away](playwright-docker-detection.md) for the machine
signals no stealth layer touches.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The weight that keeps it out
of a small function is the same weight that makes it look real.*
@@ -0,0 +1,214 @@
---
title: "Can You Run Playwright Without Being Detected?"
description: "An honest answer for Playwright automation: what removing browser-level tells clears, why it looks like a real browser, and the three signals it does not fix."
parent: "Testing and Troubleshooting"
grand_parent: "Guides"
nav_order: 11
---
# Can You Run Playwright Without Being Detected?
Not in an absolute sense, and any tool that promises otherwise is lying to you.
What is achievable is narrower and more useful: you can remove the browser-level
tells so the fingerprint and the automation flags read like a real person's browser,
and that alone clears most JavaScript-based detection. The rest of what gets a session
flagged is not a browser problem at all, and no amount of browser work touches it.
This page draws that line precisely. It shows what "undetected" can honestly mean,
what a real-browser fingerprint clears, and the three signal classes that are detected
independently of the browser and that you, not the tool, have to supply an answer for.
## The honest answer: "looks like a real browser", not "invisible"
The useful reframing is to stop asking "can I be undetected" and start asking "does
this look like a real browser driven by a real person". That is a question you can
actually answer yes to, and it is the one that most detection is really asking.
A detector almost never has a single "is this a bot" bit. It has a pile of signals and
a score. Some of those signals live in the page, in JavaScript: the fingerprint, the
automation flags, whether any built-in has been tampered with. Some live below the
page: the network handshake, the exit address. Some live in what the session does over
time: pacing, motion, request velocity.
A tool that drives a genuine, unmodified-looking browser can make the first pile read
clean. It cannot make the other two piles read clean, because they are not properties
of the browser. Being honest about that split is the whole point of this page, and it
is why [passing every public suite still does not mean the session passes](how-to-test-bot-detection.md).
## What "detected" actually means: three layers of signal
Before touching code, it helps to name the three layers, because a fix for one does
nothing for the others.
1. **The browser layer.** The fingerprint (GPU, canvas, audio, fonts, screen), the
automation flags ([`navigator.webdriver`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver)
and friends), and internal consistency
(does the platform you claim agree with the fonts you have). This is in JavaScript's
reach, and it is the layer a stealth engine addresses.
2. **The network layer.** The TLS handshake, the HTTP/2 settings frame, header order,
and the reputation of the exit address. Decided before a line of page script runs,
and [invisible to every in-page test](ja3-ja4-tls-fingerprint.md).
3. **The behaviour layer.** Pointer motion, typing rhythm, how fast a form is filled,
how many requests per minute from one account, and the timing shape of an
automated agent.
invisible_playwright is built to solve layer 1 well, and because it drives a real
Firefox binary, the handshake half of layer 2 comes out genuine for free: a real
Firefox handshake, not an impersonation. What it deliberately does not do is
manufacture a clean IP, a per-account quota, or human pacing. Those are yours to bring.
## What invisible_playwright removes: the browser layer
The product is a Firefox patched at the C++ level, driven by stock Playwright, with a
fingerprint derived from a seed so it is real-browser-shaped and reproducible. Every
session gets a coherent identity (roughly 400 fields that agree with each other)
instead of the default automation profile that detectors are trained on.
Switching from plain Playwright is a two-line change, and the object you get back is a
real Playwright `Browser`, so every method works exactly as documented upstream:
```python
from invisible_playwright import InvisiblePlaywright
# seed=42 makes the identity reproducible; drop it for a fresh one each run
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# navigator.webdriver reads false, the fingerprint is internally
# consistent, and the TLS handshake is a real Firefox handshake
print(page.evaluate("navigator.webdriver")) # -> False
```
Add a proxy and let the browser timezone follow the exit automatically, which is how
you keep the browser and the network from telling two different stories:
```python
proxy = {"server": "socks5://gate.example.com:1080", "username": "u", "password": "p"}
with InvisiblePlaywright(seed=42, proxy=proxy) as browser:
page = browser.new_page()
page.goto("https://example.com/login")
page.fill("#user", "someone")
page.click("#submit") # the pointer arcs to the button on a curve
```
The measurable result of layer 1 being clean: open the same fingerprinting page in
this browser and in a stock Firefox on the same machine, diff the reports field by
field, and the difference collapses to per-session noise (the IP and the random canvas
jitter a real browser also has). The JavaScript detectors read it as a genuine Firefox
because, at the layer they can see, it is one. That is why it passes most of them. It
is also the ceiling of what the browser layer can do.
## The three signal classes it deliberately does not touch
This is the part most "undetectable" claims skip. These three are detected
independently of the browser, the tool does not address them by design, and a clean
fingerprint on top of any one of them still loses.
- **IP reputation.** A perfect browser on a datacenter range, or on a residential exit
a thousand other people are sharing this minute, is still on a flagged address, and
that is decided before your script runs. Cheap and free proxy pools are reused across
thousands of scrapers, so a lot of that range is already flagged before you connect.
The fix is a clean exit, which is your input, not the
browser's output. [WebRTC through a proxy](webrtc-leak-proxy.md) is the related
browser-visible surface, but the reputation itself is not a browser property.
- **Per-account rate limits and quotas.** If one account does in an hour what a person
does in a week, no fingerprint hides it, because the signal is the account's own
history, not the browser's identity. Spreading work across accounts and staying under
human volume is an application-design decision the tool cannot make for you.
- **Behaviour and timing.** Uniform keystroke intervals, a form filled in eighty
milliseconds, a pointer that teleports, a request cadence with no human jitter, or
[the pause shaped exactly like model latency in an agent loop](ai-browser-agents-stealth.md).
The engine gives you curved mouse motion for clicks, but the overall rhythm of the
session is driven by your code.
None of these is a gap or a bug. They are outside the browser, so they are outside what
a browser-fingerprint tool can honestly claim. Pairing a real-browser fingerprint with
a clean exit and human pacing is the actual recipe; the tool is one of those three
parts.
## How to check what is left over
Because the browser layer is handled, your testing effort should go to the two layers
that are not. The method that catches the most:
- **Prove it is the browser before blaming it.** Open the target by hand from the same
machine and network. If the manual visit also gets the wrong page, this is the IP or
the account, and no browser change helps. This ordering is the whole point of the
[detected-on-one-site checklist](playwright-detected-as-bot.md).
- **Compare against a stock browser, do not read a score.** Diff the fingerprint fields
against a real Firefox on the same machine. Anything that matches is not your problem
whatever the verdict says; anything that differs, other than the address, is a
candidate.
- **Assert presence, not absence.** A blocked or empty signal is itself a tell and a
failure, not a pass. [Why a green verdict can mean the feature is broken](how-to-test-bot-detection.md)
is the trap here.
- **Watch the score, not just the pass line.** A [trust or confidence score](browser-trust-score-explained.md)
tells you more than a binary verdict, and it is where residual behaviour and IP
signals show up even when the fingerprint is clean.
Run any of this at least ten times, through the proxy you actually deploy with, on the
machine you actually deploy on.
## Conclusion
Can you run Playwright without being detected? You can make it look like a real browser
driven by a real person, and that clears most JavaScript-based detection, which is what
invisible_playwright is built to do: a patched Firefox, a seed-consistent real-browser
fingerprint, and a genuine handshake because the browser is genuine. What it does not
do, on purpose, is fix your IP reputation, your per-account quotas, or your behaviour
and timing. Those are detected independently, and you supply the answers: a clean exit
and human pacing. Treat "undetectable" as a slogan and you will overclaim; treat it as
"looks like a real browser, plus the two layers I own", and you will actually pass.
## Short answers to the questions that lead here
**Can Playwright be truly undetectable?** No, and any tool that says so is lying. You
can remove the browser-level tells so the fingerprint and flags look like a real
person's browser, which clears most JavaScript detection. IP, account limits and
behaviour are detected separately.
**Why does invisible_playwright pass most checks then?** Because at the layer those
checks can see, it is a real Firefox: real fingerprint, no automation flags, a genuine
handshake. Most public detection is a JavaScript check, and that is exactly the layer
it addresses.
**If my fingerprint is clean, why am I still blocked?** Almost always the IP, the
account's own request history, or the behaviour. Those are not browser properties, so a
clean browser does not touch them.
**Does it fix my proxy or my IP reputation?** No. It deliberately does not touch the
exit address. A perfect browser on a known-bad IP still loses, and you supply the clean
exit.
**Does it make my automation behave like a human?** It gives you curved mouse motion
for clicks, but the pacing, typing rhythm and request volume come from your code. That
is the behaviour layer, and it is yours.
**Is a passing sannysoft or CreepJS result enough to be safe?** No. It means the
browser layer is internally consistent and does not announce automation. The network
and behaviour layers are not in those tests at all.
## Sources
- This project's release gates, which compare the browser's fingerprint field by field
against a stock Firefox on the same machine and treat a suppressed signal as a
failure rather than a pass.
- The public detection suites named across this documentation set
([sannysoft](https://bot.sannysoft.com/), [CreepJS](https://github.com/abrahamjuliot/creepjs),
[BotD](https://github.com/fingerprintjs/BotD), [FingerprintJS](https://github.com/fingerprintjs/fingerprintjs),
[BrowserLeaks](https://browserleaks.com/)), each read from its own source rather than its
rendered verdict, retrieved 2026-08-28.
**See also:** [how to test whether your browser is detected](how-to-test-bot-detection.md),
[the checklist for being detected on one site](playwright-detected-as-bot.md), and
[what a browser trust score actually measures](browser-trust-score-explained.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. It is built to look like
a real browser, which is why it passes most checks and why it will never claim to make
you invisible.*
@@ -0,0 +1,146 @@
---
title: "Why the same canvas draws differently on Windows and Linux"
description: "Canvas fingerprints differ across Windows and Linux because the rasteriser, font files, hinting and GPU path differ, not the canvas drawing code."
parent: "Canvas, WebGL, Fonts and Audio"
grand_parent: "Guides"
nav_order: 15
---
# Why the same canvas draws differently on Windows and Linux
Two machines running the exact same `fillText()` and `toDataURL()` calls can return
different bytes. A canvas hash never measures the drawing code alone: it measures the
text rasteriser, the actual font file behind that family name, the subpixel and
hinting policy, and whether a GPU or a software path drew it. Change any one and the
pixels change, with nothing wrong in the script itself.
## What actually differs, mechanically, between two operating systems
A `fillText()` call looks like one instruction, but several layers sit underneath it
before a pixel comes back, and any one of them can move the output between two
machines running the identical script.
### The text rasteriser and its hinting policy
Windows draws glyphs through DirectWrite, or the older GDI path; Linux desktops
typically use FreeType, fed by fontconfig. Both decide, pixel by pixel, how much of
each pixel a glyph edge covers, and that depends on the hinting level in force. A
glyph spanning eleven and a half pixels gets rounded differently by rasterisers with
different hinting rules, and the rounding shows up directly in the readback.
### Which font file actually backs the family name
`ctx.font = "16px Arial"` does not point at one universal file. On Windows it
resolves to Microsoft's own Arial. On a Linux desktop without Microsoft's fonts
installed, the same family name commonly falls back to a metric-compatible substitute
such as Liberation Sans, matching Arial's advance widths but not its glyph outlines.
Same request, same font name, a different file drawing every letter.
### Subpixel geometry and antialiasing
A desktop session with subpixel rendering on draws each glyph edge using a display's
red, green and blue sub-elements, producing colour fringing invisible at normal
viewing distance but visible in a raw pixel readback. A headless or virtualised
environment usually falls back to plain grayscale antialiasing instead, since there
is no subpixel layout to target. The glyph looks the same to a human; the bytes do
not match.
### GPU-accelerated versus software rendering paths
Canvas content can be composited by the GPU or rasterised in software, and which path
a machine takes depends on driver support. A software rasteriser and a
GPU-accelerated one do not have to agree on sub-pixel rounding, so identical draw
commands can differ by a handful of values before fonts even enter the picture.
## Why text is the least stable element on a canvas
Draw a plain filled rectangle and the pixel values are close to universal: a solid
colour passes through a rasteriser mostly unchanged, so a flat-colour hash tends to
agree across machines that disagree on everything else. Draw text instead, and every
layer named above gets involved at once: rasteriser, font file, hinting, subpixel
policy, GPU path. That is why a text-free canvas is far more stable across machines,
and why fingerprinting scripts almost always put a mixed-case string on the probe
canvas rather than a plain shape.
## A canvas hash is a platform tell as much as a machine tell
Because font rendering is tied so tightly to the operating system, a canvas hash
carries platform information whether anyone intended it to.
[Windows implies Segoe UI and a specific CJK set; a bare Linux desktop implies
DejaVu and Liberation and little else](headless-fonts-differ.md), and text rendered
through those two stacks does not converge. That gives a page a checkable claim
rather than a rare value: a browser whose user agent says Windows, drawing text whose
antialiasing looks like Linux's FreeType instead of Windows' DirectWrite, has
contradicted itself, and the check needs only one sample of each platform, not a
notion of "normal" in the abstract.
## What this project does about it, and what it does not
For the values a page can read back from a canvas, this project ties the output to
the session's own seed rather than to whatever the host has, which is what lets [the
same identity return the same canvas and WebGL hash on Windows and on
Linux](canvas-webgl-cross-platform-consistency.md); [`measureText()`'s numeric fields
get the same treatment through a different mechanism](measuretext-textmetrics-fingerprinting.md).
That is a statement about what a page can observe, not a claim that the rendering
pipeline was rewritten to erase itself: rasterisation here is real drawing, done by
[a real, bundled font stack](bundled-fonts-cross-platform.md) rather than a
substituted picture, which is why a screenshot still shows real text instead of
noise. The honest limit: the fix covers only the readback calls a page can make
today, and any new export path a future engine adds needs the same treatment first.
## Conclusion
A canvas hash is not a single number a browser decides to report. It is the visible
output of a rasteriser, a font file, a hinting policy and a rendering path, four
layers a stock browser never controls independently of its operating system. Text
draws through all four at once, which is why a text-bearing canvas is the first
readback worth checking when a hash looks wrong for the platform a session claims to
be.
## Short answers to the questions that lead here
**Why does my canvas fingerprint differ between Windows and Linux?** The pixels come
from the OS's rasteriser, its font files, its hinting and subpixel policy, and
whether the GPU or software drew the glyph, not from the drawing code.
**Does the same drawing code produce the same canvas hash on every OS?** No, not on
a stock browser. Identical calls run through a different rasteriser and font file on
each platform, and the readback reflects that.
**Is a canvas fingerprint a browser tell or a platform tell?** Mostly a platform
tell. Two browsers on the same OS, drawing the same text, agree far more closely
than one browser does across two operating systems.
**Does removing text make the hash more stable?** Yes. Solid fills pass through a
rasteriser largely unchanged, while text pulls in the font stack, hinting and
subpixel geometry at once.
**Can a browser match its canvas hash to a claimed operating system exactly?** Only
by controlling what a page reads back, since the render itself comes from whichever
rasteriser and font files are actually installed.
**See also:** [canvas fingerprint noise and why per-call randomising
fails](canvas-fingerprint-noise.md), [why a canvas fingerprint changes every
run](canvas-fingerprint-changes-every-run.md), and [measureText and TextMetrics as a
fingerprinting surface](measuretext-textmetrics-fingerprinting.md).
## Sources
- [MDN: `CanvasRenderingContext2D.fillText()`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillText),
[MDN: `HTMLCanvasElement.toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
and [MDN: `CanvasRenderingContext2D.getImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData),
for the calls above.
- MDN, `CanvasRenderingContext2D.measureText()`,
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/measureText -
it "returns a TextMetrics object that contains information about the measured text
(such as its width, for example)", which is the surface this page's text argument rests
on. Read 5 September 2026.
- This project's own measurements on font rendering, font bundling and canvas
readback, referenced via the linked pages on this wiki.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. A canvas hash was never
really about the canvas; it was always about everything underneath it.*
@@ -0,0 +1,245 @@
---
title: "Canvas fingerprint changes every run: use a seed"
description: "Canvas, WebGL and audio hashes change every Playwright run because each session draws a fresh identity. Pass a fixed seed to make readbacks byte-identical."
parent: "Testing and Troubleshooting"
grand_parent: "Guides"
nav_order: 6
---
# Canvas fingerprint changes every run: use a seed
A canvas fingerprint that changes on every Playwright run is not a leak or a bug. Without
a seed, each session is handed a fresh, self-consistent device, so the canvas, WebGL and
audio readbacks are recomputed at every launch. Pass a fixed seed and all three come back
byte-identical, run to run. That single argument is the whole fix.
You open a fingerprinting page twice from the same automation, and the canvas hash
is different each time. The WebGL hash moves too, and so does the audio one. Nothing
in your code changed between the two runs, and yet the machine looks like a different
machine.
This is one of the most common confusions people hit with a fingerprint-spoofing
browser, and it is almost always a misread rather than a bug. A hash that changes on
every run is not noise leaking into your readback. It is a fresh identity being drawn
for each session, exactly as designed, and the fix is one argument.
## What "changes every run" actually means
Canvas, WebGL and audio are the three surfaces that read back a rendered value: you
draw something, then read the pixels or the samples out and hash them. On a real
machine that hash is stable, because the same GPU, the same font stack and the same
audio pipeline draw the same thing every time.
In this browser, those three readbacks are overwritten before they reach your code.
The value you read is a pure function of one number: an internal hardware seed the
wrapper derives from the identity seed of the session. Same seed in, same bytes out.
Different seed, different bytes.
So when you launch without passing a seed, each session gets a new one, and the three
hashes move together in a self-consistent way. That is not the spoof failing. That is
the spoof drawing a new device for you. The trouble is that a device which looks
brand new on every visit is its own signal, and it is usually not the signal you want.
## Why a per-run identity reads as a rotating device
A stable fingerprint is not automatically a suspicious one. What draws attention is a
fingerprint that behaves in a way real hardware cannot.
Real hardware does not change its canvas hash between two visits. If a site, or a
linkability service like [FingerprintJS, which hands you a visitor ID](fingerprintjs-visitor-id.md),
sees the same cookie or the same login return with a different canvas hash, a
different WebGL renderer and a different audio signature every time, that is a machine
that is repainting itself. Very few legitimate users look like that, and a scorer that
watches for churn will notice.
So the per-session default is the right behaviour for one job and the wrong one for
another:
- **You want a fresh identity per session.** Many short, unrelated visits, nothing
that should be linked, no returning account. Launch with no seed and take a new
device each time. This is the default for a reason.
- **You want the same identity every session.** A returning account, a persisted
profile, or simply a bug you are trying to reproduce. Here a rotating device is a
liability, and you pin it with a seed.
The mistake is not the rotation. The mistake is leaving it on when the situation calls
for a stable machine.
## Pin the seed and the readbacks stop moving
Pass a seed explicitly and every field it implies comes back identical: the GPU
string, the canvas hash, the WebGL hash, the audio context, the fonts, the screen.
The browser object you get back is a real Playwright
[`Browser`](https://playwright.dev/python/docs/api/class-browser), so the rest of your
code does not change.
```python
from invisible_playwright import InvisiblePlaywright
# Same seed -> same canvas / WebGL / audio hash, every run.
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# read your fingerprint page here; the readbacks are now stable
```
Run that twice and the three readbacks are byte-identical between the two runs,
because they are computed from the same seed both times. Change the number and you get
a different, equally self-consistent machine:
```python
# A different but still internally coherent device.
with InvisiblePlaywright(seed=1001) as browser:
...
```
The async surface is the same, one keyword apart:
```python
from invisible_playwright.async_api import InvisiblePlaywright
async with InvisiblePlaywright(seed=42) as browser:
page = await browser.new_page()
await page.goto("https://example.com")
```
If you launched without a seed and now want to keep the identity you happened to get,
you do not have to guess it. Every session records the seed it was generated from, so
log it once and you can replay that exact machine later:
```python
sf = InvisiblePlaywright() # no seed -> a fresh one is drawn
with sf as browser:
print("seed =", sf.seed) # write this down to reproduce this device
page = browser.new_page()
page.goto("https://example.com")
```
## Prove it: read the same hash twice
Do not take the determinism on faith. The whole point of the earlier troubleshooting
pages is that you [assert the presence of the right value rather than the absence of a
wrong one](how-to-test-bot-detection.md), and this is a case where you can measure the
right value directly.
Draw to a canvas, read it back with
[`toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL),
and compare the hash across two launches with the same seed:
```python
import hashlib
from invisible_playwright import InvisiblePlaywright
DRAW = """() => {
const c = document.createElement('canvas');
c.width = 300; c.height = 150;
const ctx = c.getContext('2d');
ctx.textBaseline = 'top';
ctx.font = '16px sans-serif';
ctx.fillStyle = '#069';
ctx.fillText('fingerprint probe 12345', 10, 10);
return c.toDataURL();
}"""
def canvas_hash(seed):
with InvisiblePlaywright(seed=seed) as browser:
page = browser.new_page()
page.goto("https://example.com")
data_url = page.evaluate(DRAW)
return hashlib.sha256(data_url.encode()).hexdigest()
a = canvas_hash(42)
b = canvas_hash(42)
c = canvas_hash(1001)
print("same seed match:", a == b) # True: byte-identical across runs
print("different seed differs:", a != c) # True: a different device
```
The first comparison is the one that matters. `a == b` being `True` is the readback
proving it is a stable function of the seed, not per-call randomness. This is exactly
what the project's own consistency gate checks on every release: it launches the same
seed more than once and requires an identical visitor ID from a linkability library,
and it fails the build if the two runs disagree. A green gate there means the same seed
is the same machine, run to run.
Because the readback is a function of the seed and not of the host, the same seed also
holds its hash across operating systems, which is
[why a Linux container and a Windows laptop can return the same canvas](canvas-webgl-cross-platform-consistency.md).
If instead the two hashes for one seed disagree within a single machine, that is the
tampering signal to chase, and reading the same value twice in one session is
[the cheapest such check there is](canvas-fingerprint-noise.md).
## Match the seed to the profile
Pinning the seed and pinning the profile are two halves of one decision. If you keep a
[persistent profile so cookies and storage survive between runs](persistent-profiles.md),
give it a stable seed as well. A profile that returns with the same cookies but a
different canvas hash is telling two stories at once: the account remembers you, the
hardware does not, and that contradiction is easier to spot than either half alone.
The clean pairings are the obvious ones. A fresh throwaway profile takes a fresh seed.
A durable identity that comes back tomorrow takes the same profile and the same seed
it had yesterday. Keep the two in step and the machine you present stays coherent over
its whole life instead of only within a single launch.
## Conclusion
A canvas hash that changes on every run is not a leak, it is a new device being drawn
per session, and it is the correct default for unrelated one-off visits. When you need
a machine that stays the same, whether for a returning account, a persisted profile or
a reproducible bug, pass a seed. The three readbacks then become a byte-identical
function of that seed, run to run and across operating systems, and the account and the
hardware finally tell the same story.
## Short answers to the questions that lead here
**Why does my canvas fingerprint change every run?** Because each session without a
seed gets a fresh, self-consistent identity by design. The readback is a function of
the session's seed, and a new session means a new seed.
**How do I make the canvas hash stable?** Pass a fixed seed at launch, for example
`InvisiblePlaywright(seed=42)`. The canvas, WebGL and audio readbacks then come back
identical on every run.
**Is a changing fingerprint a bug?** No. It is deliberate rotation. It becomes a
problem only when you needed a stable machine, for instance behind a returning account
or a persisted profile, and left rotation on.
**Does the same seed give the same hash on a different machine?** Yes. The readback is
computed from the seed, not from the host GPU or fonts, so the same seed holds its
hashes across operating systems.
**How do I reproduce the exact identity from an earlier run?** Read the session's seed
after launch and log it. Passing that number back reproduces the same device.
**Should the seed match my persistent profile?** Yes. A profile that returns with the
same cookies but a different fingerprint is a contradiction. Keep one stable seed per
durable identity.
## Sources
- The project's fingerprint generator, in which the canvas, WebGL and audio readbacks
are computed as a pure function of a hardware seed derived from the session seed.
- The release consistency gate, which relaunches a fixed seed and requires an
identical visitor ID from run to run, and fails the build otherwise.
- The [quickstart](quickstart.md) and [configuration](configuration.md) pages in this
documentation set for the seed argument and the API it belongs to.
- Playwright's own [`Browser` API reference](https://playwright.dev/python/docs/api/class-browser)
for what `new_page` returns: the object every example above drives is the standard
Playwright API, not a fork of it.
- MDN's [`HTMLCanvasElement.toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
reference for the readback method the proof above uses to pull bytes off the canvas.
**See also:** [how to test whether your browser is detected](how-to-test-bot-detection.md)
for the assert-the-right-value method, and
[the checklist for being detected on one site](playwright-detected-as-bot.md), whose
last step is to pin the identity so a failure is reproducible.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The seed is the same
lever whether you are hiding rotation or reproducing a bug: pin it and the machine
stops moving.*
+213
View File
@@ -0,0 +1,213 @@
---
title: "Canvas fingerprint noise: why per-call randomising fails"
description: "Per-call canvas fingerprint noise fails a detector that reads twice and flags as masking on a second check. What a consistent canvas actually looks like."
parent: "Canvas, WebGL, Fonts and Audio"
grand_parent: "Guides"
nav_order: 1
---
# Canvas fingerprint noise: why per-call randomising fails
Per-call canvas fingerprint noise fails because a detector can read the same canvas
twice. Real hardware returns an identical result both times; per-call noise returns two
different ones, which flags the browser as tampering rather than merely unusual. The fix
is not more noise, it is noise that stays consistent within a session and across sessions
of the same identity.
The standard advice for canvas fingerprinting is to add a little noise to the pixels so
your hash is not stable. It is the most widely deployed anti-fingerprinting technique
there is, and against a detector that asks once it works.
Against a detector that asks twice it is the thing that gets you caught. This page is
the check that catches it, the second check almost nobody knows about, and what a
consistent alternative has to look like.
## The check that catches per-call noise
Render the same canvas twice in the same page with
[`toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
and compare.
```js
function hash() {
const c = document.createElement('canvas');
const ctx = c.getContext('2d');
ctx.textBaseline = 'top';
ctx.font = '14px Arial';
ctx.fillText('abcdefghijklmnop', 2, 2);
return c.toDataURL();
}
hash() === hash(); // real hardware: true. Per-call noise: false.
```
On real hardware the answer is always identical, because drawing the same shapes with
the same rasteriser produces the same pixels. There is no source of variation.
A tool that adds `Math.random()` to the pixel values on every read produces two
different answers, and now the page knows something far more specific than your canvas
hash: it knows your canvas is being tampered with. An unusual hash makes you rare. A
hash that changes between two reads one millisecond apart makes you impossible.
This is four lines of JavaScript. Assume it is running.
## The second check, which is subtler
A detector draws a **small canvas filled with a handful of solid reference colours**,
then reads it back with
[`getImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData)
and checks those exact colour values came back unchanged. Not a hash, not a comparison
between two reads: an assertion that a flat red rectangle is still exactly that red.
The first check above is well known enough that better tools already seed their noise,
so two reads agree. This second shape is subtler, and it is worth understanding because
it caught us.
Real rendering does not change a solid fill. Any per-pixel noise does, even seeded
noise, even tiny noise. And a tool that fails this is not scored as "unusual", it is
scored as **masking detected**, which is a different and worse category.
The fix is a guard: before altering anything, count the distinct colours in the buffer.
If there are only a few, the render is a reference probe rather than a fingerprint, and
you leave it alone. Small buffers get the same treatment, for the same reason.
We shipped without that guard and learned it from a detector telling us so. The general
form is the same one that appears in audio and everywhere else:
> A detector does not have to recognise your noise. It only has to ask a question whose
> correct answer is already known, and check whether it still gets that answer.
## Additive noise versus substitution, and the cost nobody states
There are two ways to make a canvas read return something other than the truth.
| Approach | What it does | Same hash across machines? | Main cost |
|---|---|---|---|
| Additive noise | Perturbs each pixel slightly; the image still looks the same, the hash changes | No. The operating system's text stack still shows through the perturbation | The underlying platform signature leaks |
| Substitution | Replaces pixel values wholesale with seed-derived values | Yes. The hash is a pure function of the seed | Real canvas work (cropping, QR decoding, a video frame) gets the substituted values too |
**Additive.** Perturb each pixel slightly. The image still looks like the image, the
hash changes. This is what extensions do.
**Substitution.** Replace the pixel values wholesale with values derived from a seed.
The hash is then a pure function of the seed and nothing else, which means it is
identical on every machine running that identity, including a Linux server pretending
to be Windows.
Substitution is stronger for consistency, because with additive noise the underlying
rendering still carries the signature of
[the operating system's text stack](bundled-fonts-cross-platform.md) under the
perturbation. Two machines with different font backends produce different base images,
and a small perturbation on top does not hide that -
[this is the reasoning that gets the same seed to the same byte-identical hash on
Windows and Linux](canvas-webgl-cross-platform-consistency.md), not just a similar one.
Now the cost, which is real and which most write-ups omit. A substitution applied at
readback does not know why the page is reading the canvas. It cannot distinguish a
fingerprinting probe from an application that is cropping a photo, decoding a QR code,
capturing a video frame or applying a filter. Those all read pixels through the same
API, and they all get the substituted values.
So if your automation does real canvas work, you have to know this is happening. It is
a trade, not a free win, and anyone presenting per-pixel protection as costless has not
built one.
## What a defensible canvas looks like
Working backwards from the checks above:
- **Stable within a session.** Two reads agree. Non-negotiable and trivially checked.
- **Stable across sessions of the same identity.** A hash that changes every launch
describes a machine that changed its GPU overnight.
- **Different between identities.** Otherwise every user of the tool shares one hash,
which is its own cohort.
- **Solid fills come back solid.** Reference probes are untouched.
- **Consistent with the rest of the claim.** A canvas that says one platform under a
user agent that says another is caught by comparison, not by rarity.
That list is short and every item is a thing a page can verify in a few lines. That is
the level the checks are actually at.
The same canvas element carries a second surface that doesn't involve reading a single
pixel: [`measureText()` and its ten-plus numeric fields](measuretext-textmetrics-fingerprinting.md),
which fail the same way for the same reason if the noise added to them accumulates
instead of staying bounded.
## Checking your own
```js
const a = hash(), b = hash();
console.log('stable within session:', a === b);
// solid-fill probe
const c = document.createElement('canvas'); c.width = 70; c.height = 5;
const ctx = c.getContext('2d');
ctx.fillStyle = '#ff0000'; ctx.fillRect(0, 0, 10, 5);
const px = ctx.getImageData(0, 0, 1, 1).data;
console.log('solid red survived:', px[0] === 255 && px[1] === 0 && px[2] === 0);
```
Then relaunch with the same identity and confirm the first hash is the same value. Two
launches, one identity, one hash.
## Conclusion
Per-call noise fails the moment a page reads the same canvas twice, and seeded noise
that survives that check can still fail the second time a page draws a flat reference
colour and checks it came back unchanged. Both checks run in a handful of lines of
JavaScript, and both are already in use.
What passes both is substitution: pixel values that are a pure function of a seed,
stable within a session, stable across relaunches of the same identity, and different
between identities. The cost is real. A substitution applied at readback cannot tell a
fingerprinting probe from a QR scanner or a photo crop, so anything reading canvas
pixels for a genuine reason inherits the substituted values too.
## Short answers to the questions that lead here
**Does adding noise to canvas prevent fingerprinting?** It prevents a stable identifier
and it announces that something is modifying the canvas. Which of those matters depends
on whether anything is checking.
**Is Canvas Blocker style protection detectable?** The per-call randomisation kind is,
in four lines. That is a statement about the technique, not about any particular tool.
**Why does my canvas hash change on every page load?** Because something is randomising
per call or per session. No real machine does that; there is
[a dedicated page on why a canvas fingerprint changes every run](canvas-fingerprint-changes-every-run.md).
**Should the hash be unique to me?** It should be consistent for one identity and
different between identities. Unique-per-request is not privacy, it is a signature.
**Does `privacy.resistFingerprinting` solve this?** It alters canvas readings, and it
also makes you identifiable as someone running that mode. There is
[a longer page on that trade](resist-fingerprinting.md).
**Will noise break my application?** If you read pixels for anything real, yes,
potentially. Protection applied at readback cannot tell your QR decoder from a
fingerprinting probe.
## Sources
- [MDN: `HTMLCanvasElement.toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
and [MDN: `CanvasRenderingContext2D.getImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData),
retrieved 2026-08-28, the two readback APIs the checks on this page run directly against.
- The two protections named above: [Canvas Blocker - Fingerprint Protect](https://addons.mozilla.org/en-US/firefox/addon/canvas-blocker-no-fingerprint/),
a Firefox extension whose modes include per-call random noise, and Mozilla's own
[Resist Fingerprinting support page](https://support.mozilla.org/en-US/kb/resist-fingerprinting)
for what `privacy.resistFingerprinting` changes on a canvas read, both retrieved 2026-08-29.
- This project's own testing notes: the solid-fill guard shipped without it and was
learned from a detector telling us so, and the field-by-field canvas parity
measurements referenced throughout.
**See also:** [AudioContext fingerprinting](audiocontext-fingerprinting.md), where the
same per-call mistake has the same consequence and where our own noise turned out to be
the thing being detected, [what sannysoft checks](sannysoft-explained.md), whose
canvas-in-iframe rows are a consistency test rather than a fingerprint test, and
[how BrowserLeaks reports the canvas and WebGL hash](browserleaks-canvas-webgl-hash.md).
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The solid-fill guard exists because we shipped
without it.*
@@ -0,0 +1,181 @@
---
title: "Canvas and WebGL fingerprints, identical across OSes"
description: "Canvas and WebGL fingerprints identical across Windows and Linux: intercept readback, not the render, so one seed produces a byte-identical hash on every OS."
parent: "Canvas, WebGL, Fonts and Audio"
grand_parent: "Guides"
nav_order: 9
---
# Canvas and WebGL fingerprints, identical across OSes
A GPU-backed render surface can't be read from or written to directly and safely, so
the fix intercepts the one place JavaScript can actually see the result instead - the
same seed then produces a byte-identical canvas and WebGL hash on Windows and Linux.
[Why headless browsers render different fonts](headless-fonts-differ.md) and
[how to make Linux and macOS report real Windows fonts](bundled-fonts-cross-platform.md)
cover the same shape of problem and fix, for text instead of pixels.
## The surface you can't safely touch is not the surface JavaScript reads
A GPU-backed render target is not something you can map and rewrite freely - reading
one directly with the ordinary in-process API can crash rather than return data,
depending on the backend. That rules out the obvious approach of patching the render
itself.
It turns out you don't need to. Content never touches the render surface directly. It
only ever gets pixels back through a small, enumerable set of export calls:
- [`toDataURL`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL) and
[`toBlob`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob), both on the canvas element itself
- [`getImageData`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData), on the 2D context
- [`readPixels`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels), on the WebGL context
- a captured [`OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas)
- the chain that runs through [`createImageBitmap`](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap)
Every one of those is a **readback** call, and readback is a single choke point you
can intercept safely, even when the surface behind it cannot be touched directly.
So the fix is the same shape as the font one: block the host's real value at the one
place content can actually observe it, rather than trying to prevent the value from
existing in the first place.
## What gets overwritten, and what doesn't
At each readback call, the real pixel buffer is rewritten with output derived from
the session's seed and the pixel's own position, before JavaScript ever sees it - for
both the canvas-2D path and the WebGL path, since they are separate APIs with
separate export calls that both needed the same treatment.
The one thing this has to get right is not breaking the pages that read canvas
content for a legitimate reason. A reference probe - a handful of flat colours used
to check whether canvas output has been tampered with at all - looks nothing like a
real rendered scene: very few distinct colours across the whole buffer. Below a
small distinct-colour threshold, the output is left untouched; above it, the
substitution applies in full.
A solid red rectangle comes back solid red. A real
rendered scene, which is high-entropy by construction, gets the full treatment. This
is what keeps a masking-detection probe from immediately noticing that something
intercepts every readback.
## Why substitution instead of noise, here specifically
[Adding noise per call is the common approach, and it fails a very cheap check](canvas-fingerprint-noise.md):
read the canvas twice in the same page and compare. What makes substitution the
right choice for cross-platform consistency specifically is a different property:
substituted output is a pure function of the seed and the pixel position, with zero
input from the actual rendering pipeline underneath.
Additive noise on top of a real
render still carries the render's own signature - two machines with different font or
GPU backends produce different base images, and a small perturbation on top doesn't
hide that. Substitution removes the underlying image from the equation entirely, so
there's nothing left for the host to leak into the result.
There's a second, sharper way per-pixel noise fails, found on this exact surface: a
detector doesn't need two reads to catch it, because the noise itself has a
statistical shape that a single read can flag. A small random offset applied to a
fraction of pixels reads as unnaturally high-frequency variation - a masking-detection
check built to look for exactly that pattern flagged it directly, on the WebGL
readback specifically, with the rest of the fingerprint surface clean.
Replacing it
with a per-channel remap - which looks like an ordinary colour-profile difference
between GPUs rather than injected noise - took a measured spike count from roughly
320 down to near zero on the same probe. Substitution inherits that property too,
for the same reason: nothing about it resembles noise added on top of a real signal.
| Approach | How it hides the host | Where it fails |
|---|---|---|
| Additive per-call noise | Perturbs a fraction of pixels on top of the real render | Two reads in one page differ; the real render's font/GPU signature still shows through; the noise has a high-frequency shape a single read can flag |
| Full substitution | Replaces pixels with a pure function of the seed and the pixel position, with zero input from the render underneath | Must leave low-entropy buffers untouched so it does not break legitimate canvas reads |
## The proof: byte-identical hashes, not just "looks similar"
Rendered the same seed's canvas (text plus a gradient) and WebGL scene (a
high-entropy draw) on Windows and on Linux, hashed both in-page. The hashes matched
byte for byte on both platforms. Run against a commercial fingerprint scanner across
multiple seeds, zero failures on either OS.
That is a stronger claim than "produces a plausible fingerprint." It's the same
identity, provably, regardless of which OS is actually running underneath - which is
what makes a seed a real, portable identity instead of a value that happens to look
right on the machine it was tested on.
## What this generalises to, and where the edges still are
The underlying idea applies to any surface where content can only see a value
through a small number of export or readback calls: intercept there, and it doesn't
matter what happens upstream.
It is also, necessarily, an enumeration problem - the
fix is only as complete as the list of export paths it covers, and browsers keep
adding new ones (newer capture and streaming APIs, newer GPU-facing interfaces).
Treat any such list as something that needs revisiting as the platform grows, not as
a fact that becomes true once and stays true.
## Conclusion
The render was never the reachable surface. Content only ever sees a canvas or a
WebGL scene through a handful of readback calls, and putting the substitution there
instead of in the renderer is what makes a seed portable: the same identity produces
the same bytes on Windows and on Linux, because nothing about either host's actual
rendering pipeline reaches the output.
The tradeoff is honest rather than free - the fix covers only the readback paths it
enumerates, and a masking-safe design still has to leave genuinely low-entropy canvas
reads alone so it doesn't break the pages that use canvas for something other than
fingerprinting.
## Short answers to the questions that lead here
**Can canvas and WebGL fingerprints be made identical across operating systems?** Yes,
if the interception happens at every point content can read the result rather
than at the render itself, which is the part that can't be touched directly on a
GPU-backed surface.
**Why substitution instead of adding noise to the real render?** Noise on top of a
real image still carries the host's own rendering signature underneath it.
Substitution replaces the value entirely, so nothing about the actual host reaches
the output.
**Won't this break real uses of canvas, like image editing or QR decoding?** A
masking-safe design leaves near-uniform, low-entropy output untouched and only
substitutes high-entropy renders, which is what a fingerprinting probe looks like
and an image editor's output usually doesn't - though the same caveat as
[canvas fingerprint noise](canvas-fingerprint-noise.md) applies if your own use case
happens to fall on the wrong side of that line.
**Is this the same fix as the font work?** The same shape - intercept at the point
content can observe, not at the source - applied to a different surface.
## Sources
- [MDN: `HTMLCanvasElement.toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL),
[MDN: `HTMLCanvasElement.toBlob()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob),
[MDN: `CanvasRenderingContext2D.getImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData),
[MDN: `WebGLRenderingContext.readPixels()`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels),
[MDN: `OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), and
[MDN: `createImageBitmap()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap),
retrieved 2026-08-28, the enumerable set of readback calls this page's interception
point covers.
- This project's own render-readback interception work and its cross-platform
validation (same-seed byte-identical hashes on Windows and Linux, multi-seed
results against a commercial fingerprint scanner).
**See also:** [canvas fingerprint noise](canvas-fingerprint-noise.md), for why
per-call randomisation specifically fails; [how to make Linux and macOS report real
Windows fonts](bundled-fonts-cross-platform.md), for the same architecture applied to
fonts; [WebGL renderer strings](webgl-renderer-strings.md), for the adjacent
surface of what the GPU claims to be rather than what it draws; and
[how the BrowserLeaks canvas and WebGL hash is computed](browserleaks-canvas-webgl-hash.md),
for what that hash actually measures.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The same-seed check here once passed while the
render was actually broken: a Linux canvas with text came back holding 11994 distinct
colours where Windows gave 16, and identical bytes for two different strings.*
+205
View File
@@ -0,0 +1,205 @@
---
title: "The ChromeDriver `cdc_` variable, and why renaming it fails"
description: "The cdc_ variable ChromeDriver leaves on the page is a one-line Selenium test. Renaming it in the binary raises the bar but does not remove the tell."
parent: "The Automation Layer"
grand_parent: "Guides"
nav_order: 2
---
# The ChromeDriver `cdc_` variable, and why renaming it fails
**The `cdc_` variable is a property that ChromeDriver injects into every page it
controls, and its presence is a one-line test for Selenium automation. Renaming the
string in the binary hides it from a check that greps for the exact prefix, but not
from one that looks for the pattern, because the properties are still on the page.**
If you have automated Chrome with Selenium and been detected, you have probably met
this variable. This is what it is, why renaming it in the binary does not remove it,
and what that generalises to.
The check looks like this:
```js
Object.getOwnPropertyNames(window).find(k => k.startsWith('cdc_'))
```
It is a one-line test, it is in every bot-detection script, and understanding why it
works explains a lot about how this whole category of tell comes to exist.
## What the variable is
ChromeDriver, the binary Selenium talks to, needs to run its own JavaScript inside
the page: that is how it finds elements, reads text, and executes your `execute_script`
calls. To do that it keeps some state on the page's own objects, under names derived
from a fixed string compiled into the binary. Historically they look like this:
```
cdc_adoQpoasnfa76pfcZLmcfl_Array
cdc_adoQpoasnfa76pfcZLmcfl_Promise
cdc_adoQpoasnfa76pfcZLmcfl_Symbol
```
The prefix is stable across installations because it is a literal in the executable,
which is exactly what makes it a reliable signal. A page that finds one of those
property names is not guessing: nothing else puts them there.
Note what this is not. It is not a flag someone forgot to remove, and it is not the
same class of thing as `navigator.webdriver`. It is working state that the tool needs
in order to function.
## Why the usual fix is a rename
Some guides describe a manual version of the fix: edit the compiled ChromeDriver binary
directly and replace the `cdc_` literal with a different random-looking string of the
same length, since it is an in-place patch of a compiled file and the replacement has to
fit exactly where the original sat.
That defeats the check at the top of this page, because the check greps for `cdc_`. It
does not defeat a slightly better one. The variables are still there, still a set of
related names appearing together under a common stem, still matching a shape no page
author would produce. A detector that looks for *the pattern* instead of the prefix,
several own properties on `window` sharing a random-looking stem and typed suffixes,
finds them again under the new name.
[`undetected-chromedriver`](vs-undetected-chromedriver.md) goes further than a rename.
Its patcher finds the exact statement that assigns the `cdc_` properties inside the
compiled driver binary and overwrites it in place with a fixed, harmless statement of the
same byte length, so the assignment never runs and no `cdc_`-prefixed property lands on
`window` at all. That closes the specific check this page opened with. It does not close
the general one: the same fixed replacement ships in every copy of the patched driver,
and the browser it drives is still a stock, unpatched Chromium underneath, reporting
whatever canvas, font and WebGL values the host machine actually has.
So: a rename raises the bar without removing the surface, and overwriting the assignment
outright removes one named check without touching the fact that a driver is attached at
all. That distinction is the whole point of this page, and it applies far beyond this one
variable.
## The general shape of the problem
Any automation tool that needs to run code in the page needs somewhere to keep state.
The options are:
1. **Put it on page objects under a known name.** Easy, and detectable by name.
2. **Put it on page objects under a randomised name.** Harder, and detectable by
shape.
3. **Do not put it on page objects at all.** Keep the state on the driver side of the
boundary, or in an execution context the page cannot enumerate.
Option three is the only one that removes the surface instead of obscuring it, and
it is a design decision made long before anyone runs a detection test. It is also why
["which stealth plugin should I use"](playwright-stealth-levels.md) is often the wrong
question: no plugin can move state out of the page after the fact.
## Where Firefox differs, and where it does not
Firefox's automation does not use ChromeDriver, so `cdc_` does not exist there. That
is a fact about the protocol, not a virtue: Firefox's automation surfaces are
simply different ones.
What Firefox does still do by default is set `navigator.webdriver` to `true` when a
session is under automation control, because the
[WebDriver specification](https://www.w3.org/TR/webdriver2/) requires it: the
property reflects a "webdriver-active" flag the spec sets whenever the user agent
is under remote control. So a stock Playwright Firefox is trivially detectable too,
just by a different two-line check, and anyone claiming Firefox is inherently
undetected is selling something.
The useful difference is architectural, not moral. Firefox's automation
protocol runs in privileged code with its own execution contexts, so the state a
driver needs does not have to live where the page can enumerate it. Whether a given
tool takes advantage of that is a separate question from whether the engine allows
it.
## What to actually check
If you are debugging a detection problem on a Chromium-based stack, check in this
order:
1. `Object.getOwnPropertyNames(window)` and the same for `document`, looking for
groups of related unfamiliar names, not one specific prefix.
2. `navigator.webdriver`, remembering that `false` is not the same answer as
`undefined`, and a clean browser gives the latter.
3. Whether anything you loaded has patched a built-in: print
`Function.prototype.toString.call(navigator.__lookupGetter__('webdriver'))` and
see whether it says `[native code]`.
4. The non-automation signals, which is usually where the real problem is by the time
you have got this far: the GPU string, the font set, the timezone against the IP.
Number four catches more sessions than one to three combined, and it is the one
nobody checks first.
## Conclusion
The `cdc_` variable is not an oversight. It is working state a driver needs to run its
own code inside the page, which is why a naive fix does not make it disappear. A rename
defeats a check that matches a prefix, but not one that matches a shape, because the
properties are still sitting on `window` under a different label. Overwriting the
assignment outright, which is what a tool like undetected-chromedriver actually does,
closes that specific hole without changing anything else a driver or the stock browser
underneath still reveals. The lesson generalises past this one variable: any tool that
keeps state on page objects is one enumeration away from being found, and the only fix
that removes the surface instead of raising the bar is keeping that state off the page in
the first place.
## Short answers to the questions that lead here
**What is the `cdc_` variable?** A property ChromeDriver injects into `window`, whose
name starts with `cdc_` followed by a random-looking string. Its presence is a one-line
check for Selenium automation.
**Does patching it out in the binary work?** A rename defeats a check that greps for the
exact prefix, but not one looking for the *pattern*, several unexpected own properties on
`window` sharing a stem. Overwriting the assignment outright, which is what
undetected-chromedriver actually does, removes the property entirely, but the driver and
the stock browser underneath are otherwise unchanged.
**How do I find it?** Enumerate `window`'s own properties and look for entries no normal
page has.
**Does Playwright have an equivalent?** Not this one, because it does not use
ChromeDriver, and not a comparable global either - checked directly, enumerating
every own property on `window` in a live Playwright-driven Chromium session finds
nothing resembling `window.__playwright` or any similarly-named global. Some
online guides describe one anyway; it is worth checking a claim like that yourself
before repeating it, the same way this page checks `cdc_` by opening a real
session rather than trusting a description of one. That does not mean Playwright
sessions have no artefacts at all - [each automation stack has its own, and each
one is a function whose source can be printed](tostring-native-code-detection.md) -
only that this specific one does not appear to be real.
**What is the real fix?** Do not add the properties at all, which means the automation
layer has to be built differently rather than patched afterwards.
## Sources
- Chrome for Developers, [What is ChromeDriver?](https://developer.chrome.com/docs/chromedriver),
retrieved 2026-08-28, for ChromeDriver's role as the binary Selenium talks to and the
driver-side state it needs to run its own JavaScript in the page.
- Chromium source, [call_function.js](https://chromium.googlesource.com/chromium/src/+/main/chrome/test/chromedriver/js/call_function.js),
retrieved 2026-08-29, for the `cdc_adoQpoasnfa76pfcZLmcfl_` prefix and the `_Array`,
`_Promise` and `_Symbol` suffixes quoted earlier on this page.
- [undetected-chromedriver's GitHub repository](https://github.com/ultrafunkamsterdam/undetected-chromedriver),
retrieved 2026-08-29, for its documented approach of downloading and patching the
ChromeDriver binary.
- [undetected-chromedriver's `patcher.py`](https://github.com/ultrafunkamsterdam/undetected-chromedriver/blob/master/undetected_chromedriver/patcher.py),
retrieved 2026-08-29, for the `patch_exe` function that locates the injected `cdc_`
assignment inside the compiled binary and overwrites it with a fixed placeholder of
the same byte length.
- Selenium, [WebDriver documentation](https://www.selenium.dev/documentation/webdriver/),
retrieved 2026-08-28, for the driver-to-browser relationship ChromeDriver implements.
- The [WebDriver specification](https://www.w3.org/TR/webdriver2/), retrieved 2026-08-28,
which requires a conforming browser to set `navigator.webdriver` to `true` under
automation control.
- This project's own sessions, enumerating every own property on `window` in a live
Playwright-driven Chromium session, for the claim that Playwright has no comparable
`cdc_`-style global.
**See also:** [why setting `navigator.webdriver` to false is worse than leaving it alone](navigator-webdriver-explained.md), [the three levels a stealth tool can work at](playwright-stealth-levels.md), since where the state lives is a level-two decision, and [selenium-stealth's actual maintenance status](selenium-stealth-unmaintained.md), for the popular package that patches properties next to this one.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. Firefox-based, so `cdc_` was never our problem,
but the general shape of it is everybody's.*
+259
View File
@@ -0,0 +1,259 @@
---
title: "Chromium is not Chrome, and detectors know the difference"
description: "Chrome for Testing, Playwright's default since 1.57, plays H.264 but still fails the Widevine DRM check - a compiled-in gap that no JavaScript patch can close."
parent: "Comparisons"
nav_order: 3
---
# Chromium is not Chrome, and detectors know the difference
**Short answer:** no, they are not the same, and the gap moved in 2026 instead of closing.
Playwright's default Chromium - Chrome for Testing since v1.57 - now plays the same
H.264/AAC codecs as real Chrome, checked directly in a live session. It still fails
Chrome's [Widevine DRM check](https://developer.mozilla.org/en-US/docs/Web/API/Encrypted_Media_Extensions_API), and that part cannot be patched from JavaScript because it is
a compiled-in capability, not a value a page reads off a string.
Every stealth guide for Chromium-based automation quietly assumes "Chromium" and "Chrome"
mean the same thing, or that the gap between them is fixed and permanent. Neither is true.
The gap is real, it moved in 2026, and one part of it is still a **compiled-in capability**
that a page can test for directly and that no amount of JavaScript patching can produce.
This page is what Playwright actually ships today, what changed and what didn't, why the
part that remains cannot be patched, why spoofing the user agent makes it worse, not
better, and why Firefox has no equivalent gap.
## What Playwright ships today, checked directly, not assumed
Playwright's own browser documentation used to be the whole answer: the default managed
Chromium was an open-source build, missing the proprietary parts Google adds on top. As of
[Playwright 1.57](https://playwright.dev/docs/release-notes), that changed. The default managed binary - launched with no `channel` set
at all - is now **Chrome for Testing**, Google's own dedicated distribution for automated
testing, pinned to the Playwright version instead of auto-updating.
Chrome for Testing is not the stripped-down build the old default was. It ships the same
proprietary codec support as the Chrome a real visitor runs. Checked directly, in a live
Playwright session with no `channel` argument and no stealth layer applied: H.264 and AAC
both play. The codec half of this page's original argument no longer holds for a current,
default Playwright launch - it holds for whatever version you're actually pinned to, and it
is worth checking your own rather than assuming either answer.
## The Widevine gap that survives the switch
Checked in the same session: Widevine still rejects.
```js
await navigator.requestMediaKeySystemAccess('com.widevine.alpha', [{
initDataTypes: ['cenc'],
videoCapabilities: [{ contentType: 'video/mp4; codecs="avc1.42E01E"' }],
}]);
// current default Playwright (Chrome for Testing): rejects, NotSupportedError
```
Chrome for Testing carries Chrome's codecs but not its Widevine CDM (Content Decryption
Module) - DRM distribution has its own licensing path separate from the codec libraries,
and Google's dedicated testing distribution does not carry it. That gap is the one worth
building an argument around, because unlike the codec question, it is not a moving target
tied to which Playwright version happens to be pinned - it is a deliberate omission from a
distribution built for automation in the first place.
Here is the part that matters for anyone building or buying a stealth tool:
> **This is not a value. It is a capability.** A missing DRM module is missing machine
> code. You can lie about `navigator.userAgent` because it is a string; you cannot lie
> about whether the build can actually negotiate a Widevine session, because the page can
> ask it to and read the real answer.
This is the same distinction as
[a renderer string against the pixels a rasteriser actually draws](renderer-string-vs-render.md),
and it is the expensive class of problem for the same reason.
[The codec page](codec-fingerprinting.md) covers the wider surface; this is the sharpest
surviving instance of it, even after the part that used to accompany it closed.
## Almost nobody browses with a Widevine-less build
Almost nobody outside development, CI and automation runs a browser without Widevine.
Real people use Chrome, Edge, Brave, Opera, Vivaldi, and every one of those ships Widevine,
because a browser that cannot play protected video from a mainstream streaming service is
not a browser anybody keeps as their daily one. A build that answers "no" to the Widevine
check is a developer artefact, a CI image, or automation - not a real visitor's machine.
So the population of "sessions reporting no Widevine support" is made up overwhelmingly of
developers and automation. That is not a fingerprint value being rare. That is **a cohort
whose membership is almost entirely the thing being looked for.**
And unlike most signals in this subject, it needs no model and no scoring. It is a
capability check with a yes or no answer.
## Spoofing the user agent makes this worse
Setting the user agent to claim Chrome does not close the Widevine gap - it turns a merely
missing capability into a contradiction the page can check directly.
A stealth tool sets the user agent to claim Google Chrome. On a current, default Playwright
launch the codec set now agrees with that claim - that particular contradiction closed along
with the codec gap. The Widevine one didn't. Now the page has:
- a user agent saying **Chrome**,
- a Widevine check saying **no such CDM**,
- and in Chromium, `Sec-CH-UA` brands that
[have their own copy of the same claim](client-hints-sec-fetch.md), agreeing with the
user agent while the DRM check contradicts both.
Before the spoof, the browser was merely missing a capability real visitors have. After it,
the browser is lying about being able to do something it provably cannot, and the lie is
checkable in one line rather than inferred from a rare value. That is
[the same mistake the user agent page is about](playwright-user-agent.md), in its most
concrete remaining form.
## The `channel` escape, and what it costs
Playwright does let you opt into a branded browser:
```python
p.chromium.launch(channel="chrome")
```
That launches the real Chrome installed on the machine, with the real Widevine. It
genuinely closes the remaining gap - the one thing a current default launch, running Chrome
for Testing, still doesn't give you.
The costs are real and worth being explicit about:
- **You do not ship it.** It uses whatever Chrome is installed, at whatever version, so
your fleet is only as consistent as your machine images.
- **It updates underneath you**, on Google's schedule rather than yours.
- **It is not available everywhere**, particularly in slim containers, which is exactly
where automation runs.
- **It is still Chrome with automation attached**, so every other layer of this subject
applies unchanged.
It is the right call when you can take those costs. It is not a solved problem, it is a
traded one.
## Firefox has no equivalent gap
Firefox has no capability gap like Widevine to exploit, because it has no proprietary-versus-open
split of this kind in the first place - which is the structural reason this belongs in a
comparison rather than a list of tips.
There is no "Firefox" and
"Firefox-without-the-codecs" pair where one is what people run and the other is what
automation runs. The build Mozilla ships and a build compiled from the same source with
the release configuration have the same feature set.
So a patched Firefox is **Firefox**, in the ways a capability check can test. A patched
Chromium is **Chromium claiming to be Chrome**, and the claim is contradicted by things
that are not strings.
That is not an argument that Firefox wins overall.
[The argument against Firefox is its share of real traffic](firefox-vs-chromium-antidetect.md),
and it is serious. But on this specific axis the two engines are not in comparable
positions, and most comparisons never mention it.
## Codec and DRM support, by build
| Build | H.264 / AAC playback | Widevine DRM | What it actually is |
|---|---|---|---|
| Bare open-source Chromium (pre-1.57 default, or an explicit unbranded build) | No | No | Missing the proprietary codec and DRM additions Google adds on top of open-source Chromium |
| Chrome for Testing (Playwright's default since 1.57, no `channel` set) | Yes | No | Google's own automation distribution - Chrome's codecs, not Chrome's DRM licensing |
| Real Chrome, launched via `channel="chrome"` | Yes | Yes | The actual installed browser, with the update and install costs described above |
| Firefox, patched at the C++ level | N/A - no split | N/A - no split | One build, not two: there is no stripped variant that only automation runs |
## How to check your own build for the gap
Run this in whatever browser your automation actually launches:
```js
const v = document.createElement('video');
console.table({
h264: v.canPlayType('video/mp4; codecs="avc1.42E01E"') || 'no',
aac: v.canPlayType('audio/mp4; codecs="mp4a.40.2"') || 'no',
mp3: v.canPlayType('audio/mpeg') || 'no',
ua: navigator.userAgent,
});
navigator.requestMediaKeySystemAccess('com.widevine.alpha', [{
initDataTypes: ['cenc'],
videoCapabilities: [{ contentType: 'video/mp4; codecs="avc1.42E01E"' }],
}]).then(() => console.log('widevine: yes'), () => console.log('widevine: no'));
```
Then compare against the browser you are claiming to be, on the same machine.
- If the user agent says Chrome and H.264 comes back empty, your build predates the
Chrome for Testing default, or you launched with an explicit bare-Chromium build, and you
have the codec-level version of the contradiction described above.
- If Widevine rejects while the user agent says Chrome, that is the gap that survives even
on a current, default launch.
- If both are consistent with the claim, this particular problem is not yours - but check
which one actually changed before assuming why.
## Conclusion
The most repeated advice in Chromium-based stealth is to make the browser look like
Chrome. As of Playwright 1.57's switch to Chrome for Testing as the default, the browser
got measurably closer to actually being Chrome on the codec axis - that part of the old
advice is less wrong than it used to be. Widevine did not follow, and it remains a
capability rather than a value, which puts it out of reach of every technique that works
on the others.
The choices that actually address the remaining gap are to run real Chrome through a
branded channel and accept that you no longer control the binary, or to use an engine that
does not have the gap in the first place.
What does not address it is a better user agent string, which converts a browser that is
merely missing one capability into one that is provably lying about it.
## Short answers to the questions that lead here
**Does Playwright use Chrome or Chromium?** As of Playwright 1.57, the default managed
binary (no `channel` set) is Chrome for Testing - Google's own dedicated automation
distribution, carrying Chrome's codecs but not its Widevine CDM. Earlier Playwright
versions, or an explicit bare-Chromium build, still lack the codecs too. Branded channels
remain available as an opt-in for the rest.
**How can a website tell an automated Chromium-family browser from real Chrome today?**
Mostly by asking for Widevine DRM support, which the codec-carrying default still lacks.
The codec check that used to work for this closed as of the 1.57 default switch.
**Can I patch Widevine support in?** Not from JavaScript. A missing DRM module is missing
code, not a missing property.
**Is using a Widevine-less build suspicious?** Yes, specifically: almost the only sessions
answering "no" to that one check are developers, CI, and automation.
**Should I spoof the user agent to say Chrome?** No. On a current default launch it no
longer contradicts the codec check, but it still contradicts the Widevine one, and that
contradiction is checkable in one line.
**What about `channel="chrome"`?** It closes the remaining gap and hands you a browser you
do not ship, do not version and cannot always install.
**Does Firefox have the same problem?** No. There is no widely-used stripped Firefox that
automation runs and people do not.
**See also:** [Codec fingerprinting](codec-fingerprinting.md) for the wider surface,
[why you should not set the user agent](playwright-user-agent.md),
[Client Hints and Sec-Fetch](client-hints-sec-fetch.md) for the third copy of the same
claim, and
[Firefox or Chromium for anti-detect](firefox-vs-chromium-antidetect.md) for the argument
in both directions.
## Sources
- [Playwright's release notes](https://playwright.dev/docs/release-notes), on the switch
from custom-compiled open-source Chromium to Chrome for Testing as the default managed
binary.
- Direct capability checks run in a live Playwright session, 2026-07-30: H.264 and AAC
playable, Widevine (`com.widevine.alpha`) rejected with `NotSupportedError`, on the
default managed binary with no `channel` argument set.
- [The Encrypted Media Extensions API](https://developer.mozilla.org/en-US/docs/Web/API/Encrypted_Media_Extensions_API), for the Widevine capability check above.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. This is the argument for the engine choice that we
find most convincing, and it is the one most comparisons leave out.*
+84
View File
@@ -0,0 +1,84 @@
---
title: "CLI reference"
description: "The invisible-playwright command line: two commands, fetch and version, and what each one covers."
parent: "Documentation"
nav_order: 5
---
# CLI reference
The installed command is `invisible-playwright`, with a hyphen. `python -m
invisible_playwright` works identically and needs nothing on `PATH`.
```bash
invisible-playwright fetch # download the engine if missing, check every cached
# one against the seal, print the path
invisible-playwright version # wrapper, core and engine versions, and where the
# engine is cached
```
## `fetch`
Makes the engine present and correct, then prints where it is.
It checks every cached engine tree against the seal shipped inside
`invisible-core` **before** downloading anything. That ordering is the point: a
tree that no longer matches the seal is the case worth catching, and it is
invisible to a plain "download if missing" that only looks at whether a file is
there. Anything that does not match is reported on stderr and left alone; the
sealed engine is fetched and verified against its sha256.
The last line on stdout is the absolute path, by itself, so this is the scripting
form:
```bash
FIREFOX="$(invisible-playwright fetch)"
```
which is better than asking for a path separately, because it guarantees the
thing it names actually exists and matches the seal.
Running it when everything is already correct is cheap and does nothing.
## `version`
```
invisible_playwright 0.6.0
invisible_core 18.12.0 (declared: ==18.12.0)
engine firefox-18 Firefox 151.0 build 20260724001949
seal f294a96ae4ec [.../invisible_core/seal.json]
cache /home/you/.cache/invisible-playwright
```
This is the output to paste into a bug report. Two lines are worth knowing about:
- if the installer's record disagrees with the core that will actually run, a
`STALE RECORD` line appears between them. That is the state pip and `pip check`
both call healthy, because both read the record and neither reads the files.
- `cache` is where the engine trees live. Deleting a directory there is how you
reclaim the space; there is no subcommand for it, on purpose - see below.
## What happened to the other four
The command line used to have six entries: `fetch`, `fetch --force`, `path`,
`version`, `clear-cache`, `doctor`. Each was a step somebody had to know to take,
in a package whose whole promise is that the browser handles itself. None of the
behaviour was lost:
| gone | where it went |
|---|---|
| `doctor` | `fetch` does it on every run. It was the thing most worth doing and the thing least likely to be typed, which is the worst combination a subcommand can have. |
| `fetch --force` | unnecessary once every run verifies. A tree is replaced because it does not match the seal, not because a flag was passed. |
| `path` | `fetch` prints it as its last line, and unlike `path` it guarantees the tree is there and correct. |
| `clear-cache` | deliberately not folded in. The cache root belongs to `invisible_core`, not to this package, so pruning "trees no seal points at" would delete an engine this package did not put there. `version` prints the location. |
The `tag` argument went with them. The seal decides which engine a given build
runs, and the engine check refuses anything else, so a tag on the command line
could only ever name something that would then be rejected.
## See also
[Installation](installation.md) for the initial `fetch`, and
[Configuration](configuration.md) for the environment variables that change where
the engine is cached or which binary gets used.
+215
View File
@@ -0,0 +1,215 @@
---
title: "Client Hints and Sec-Fetch: headers that must agree"
description: "Client Hints (Sec-CH-UA) and Sec-Fetch headers come from the browser's own state, so they are cheap to compare and hard to fake. Why Firefox sits differently."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 6
---
# Client Hints and Sec-Fetch: headers that must agree
[Client Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Client_hints) and
Sec-Fetch are two families of request headers the browser generates from
its own internal state, not from the page and not from anything you configure. That makes
them awkward to fake and very cheap to check, which is a combination detectors like.
They also catch a specific mistake: changing the user agent string and nothing else.
This page is what each family carries, the mismatches that get caught, why Firefox and
Chromium are in structurally different positions here, what automation can and cannot
control, and how to check your own.
## Client Hints: one identity in three places
Modern Chromium reports its identity in three places that come from the same internal
state:
```
Sec-CH-UA: "Chromium";v="141", "Not?A_Brand";v="8", "Google Chrome";v="141"
Sec-CH-UA-Mobile: ?0
Sec-CH-UA-Platform: "Windows"
```
```js
navigator.userAgentData.brands // the same brands and versions
navigator.userAgentData.platform // the same platform
await navigator.userAgentData.getHighEntropyValues(['platformVersion', 'architecture'])
```
```
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) ... Chrome/141.0.0.0 ...
```
In a real browser those three agree by construction, because one piece of state produces
all of them. Comparing them is a few lines on the server and it needs no fingerprinting
library at all.
**The mismatches that get caught:**
- **A spoofed user agent with untouched Client Hints.** You set the string to Chrome 141
and the headers still describe whatever the browser really is. This is the single most
common version of the mistake, because changing the string is the thing every guide
tells you to do.
- **A version that differs between the two.** A current version in the user agent and an
older one in the hints is a straight contradiction.
- **A platform that differs.** Claiming Windows in the string while the hint reports the
host operating system.
- **The JavaScript API disagreeing with the headers.** Patching
[`navigator.userAgentData`](https://developer.mozilla.org/en-US/docs/Web/API/NavigatorUAData)
in the page does nothing to the headers, which were sent before your script existed.
That last one is worth sitting with. The headers travel with the request. A page-level
override cannot reach them, ever, because they were already sent.
## Firefox is in a different position, in both directions
Firefox does not implement User Agent Client Hints. It sends no `Sec-CH-UA` headers and
has no `navigator.userAgentData`.
That cuts two ways and both are worth being explicit about.
**In your favour, if you are actually Firefox.** There is no second identity pipeline to
keep synchronised. The absence is correct, expected, and matches every other real Firefox
on the internet. The whole class of mismatch above simply does not apply.
**Against you, if you claim to be Chrome.** A request whose user agent says Chrome and
which carries no Client Hints at all is contradicted by its own headers. There is no way
to fix that from inside a Firefox, because you would have to implement the pipeline.
So "which browser should I claim" is not a free choice. Claim the one you are running.
[Which is the argument for not setting the user agent at all](playwright-user-agent.md).
## Sec-Fetch: how the request was initiated
[Sec-Fetch](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Sec-Fetch-Site)
is a separate family of headers, present in every modern browser including
Firefox, that describes how a request was initiated rather than what the browser is. It is
much less discussed than Client Hints, and just as cheap for a server to check.
```
Sec-Fetch-Site: same-origin | same-site | cross-site | none
Sec-Fetch-Mode: navigate | cors | no-cors | same-origin
Sec-Fetch-Dest: document | image | script | style | empty
Sec-Fetch-User: ?1 (only present when a user activated the navigation)
```
These describe **the circumstances of the request**, not the browser. The browser fills
them in from what it knows: where the request came from, what it is for, and whether a
user gesture triggered it.
Why that is interesting for automation:
- A top-level navigation typed into the address bar carries `Sec-Fetch-Site: none`. One
that came from clicking a link on the same site carries `same-origin`. A request
fabricated outside the normal flow can easily carry the wrong one.
- `Sec-Fetch-User: ?1` appears only when the navigation was user activated. Automation
that clicks properly produces it; automation that navigates programmatically does not,
and a page that expected a click can notice the difference.
- `Sec-Fetch-Dest` has to match what the request is actually for. A document request that
claims to be an image is not a browser.
The connection to the rest of this subject: user activation is also readable in the page,
through `navigator.userActivation`, and it is the value that
[an automation driver can announce by accident](debugger-timing-detection.md). Getting
that wrong in either direction, claiming a gesture nobody made or lacking one a real flow
would have, is the same class of inconsistency as everything else here.
## What automation can and cannot control
The practical division:
**Cannot be set from the page.** All of it. These headers are constructed by the network
stack when the request is made. Anything you do in JavaScript happens after.
**Can be set by the automation layer**, badly. Most frameworks let you add or override
request headers. Overriding these by hand is how you produce a set that no real browser
sends, because you are now maintaining by hand something the browser was maintaining
correctly.
**Should be left alone.** That is the whole recommendation. If the browser is real and
you have not overridden its identity, both families are correct for free.
The one legitimate case is adding headers a site requires for its own API, which is
unrelated to identity and does not touch either family.
## Checking your own
Send a request to any service that echoes headers back and read the full set, then
compare against what the same page reports in JavaScript.
```js
// in the page
console.log(navigator.userAgent);
console.log(navigator.userAgentData); // undefined in Firefox, and that is correct
if (navigator.userAgentData) {
console.log(await navigator.userAgentData.getHighEntropyValues(
['platformVersion', 'architecture', 'model', 'uaFullVersion']));
}
```
What you want:
- If `navigator.userAgentData` exists, its brands, version and platform match both the
user agent string and the `Sec-CH-UA` headers on the request.
- If it does not exist, no `Sec-CH-UA` headers are being sent either, and the user agent
claims a browser that genuinely does not send them.
- `Sec-Fetch-Site` matches how you actually navigated.
- `Sec-Fetch-User` is present when you clicked and absent when you navigated
programmatically.
- Header **order** matches a real browser's, [a separate surface](http2-fingerprint-detection.md)
one layer down, and one more reason not to hand-assemble any of this.
## Conclusion
These headers are hard to fake for a good reason: the browser generates them from state
it already has, so a real browser is consistent without trying and a spoofed one has to
maintain three copies of an identity by hand.
The practical advice is short. Do not override the user agent, so there is nothing to
keep in sync. Do not hand-set these headers. Claim the browser you are actually running,
because Firefox not sending Client Hints is correct for Firefox and damning for something
claiming to be Chrome.
## Short answers to the questions that lead here
**What is `Sec-CH-UA`?** A request header carrying the browser's brand and version,
generated from the same internal state as the user agent string.
**Why do Client Hints give away a spoofed user agent?** Because changing the string does
not change the headers, so the two describe different browsers.
**Does Firefox send Client Hints?** No, and it has no `navigator.userAgentData`. That is
correct for Firefox and a contradiction for anything claiming to be Chrome.
**Can I set Client Hints from JavaScript?** No. The headers are sent before your script
runs.
**What is `Sec-Fetch-User`?** A header present only when a user gesture triggered the
navigation.
**Should I override these headers in my automation?** No. A real browser fills them in
correctly, and hand-maintaining them is how you produce a combination that does not
exist.
## Sources
- WICG, [User-Agent Client Hints](https://wicg.github.io/ua-client-hints/), retrieved
2026-08-28, for the `Sec-CH-UA` headers and `navigator.userAgentData`, as implemented in
Chromium and absent in Firefox.
- W3C, [Fetch Metadata Request Headers](https://www.w3.org/TR/fetch-metadata/), retrieved
2026-08-28, for `Sec-Fetch-Site`, `-Mode`, `-Dest` and `-User`.
- This project's handling of user activation, which is described on
[the debugger page](debugger-timing-detection.md).
**See also:** [why you should not set the user agent](playwright-user-agent.md), which is
the same argument from the other end,
[JA3 and JA4](ja3-ja4-tls-fingerprint.md), for the layer below these headers, and
[how to test whether your browser is detected](how-to-test-bot-detection.md).
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. Running a real Firefox means the Client Hints
question answers itself, which is the kind of advantage you only get by not lying in the
first place.*
+188
View File
@@ -0,0 +1,188 @@
---
title: "Closed shadow roots: what Playwright cannot see"
description: "Stock Playwright finds nothing inside a closed shadow root, in Firefox and Chromium alike. Measured, with the page that reproduces it and what this engine does instead."
parent: "The Automation Layer"
grand_parent: "Guides"
nav_order: 45
---
# Closed shadow roots: what Playwright cannot see
A closed shadow root makes `element.shadowRoot` return `null`, and stock
Playwright locators stop at that boundary: measured on 5 September 2026
against a page with one open and one closed root, stock Firefox and stock
Chromium both matched the open content and returned zero matches for the
closed content. The engine this wiki documents returns one match for the
same closed content, and the page still reads `null`.
For the ordinary case, open shadow roots, Playwright crosses them by itself
and there is nothing to configure: see
[how to scrape shadow DOM content with Playwright](how-to-scrape-shadow-dom-playwright.md).
This page is about the other case, and it starts with a number rather than
an opinion.
## The measurement, and the page that reproduces it
The test page defines two custom elements. One attaches its shadow root with
`mode: "open"`, the other with `mode: "closed"`, and each puts a unique
string inside. Served from `127.0.0.1`, so no network variability, and the
same file for every arm.
```html
<open-widget></open-widget>
<closed-widget></closed-widget>
<script>
class OpenWidget extends HTMLElement {
connectedCallback() {
const r = this.attachShadow({mode: "open"});
r.innerHTML = '<p id="inner-open">OPEN_SECRET_VALUE_7788</p>';
}
}
class ClosedWidget extends HTMLElement {
connectedCallback() {
const r = this.attachShadow({mode: "closed"});
r.innerHTML = '<p id="inner-closed">CLOSED_SECRET_VALUE_9911</p>';
this.readIt = () => r.querySelector("#inner-closed").textContent;
}
}
customElements.define("open-widget", OpenWidget);
customElements.define("closed-widget", ClosedWidget);
</script>
```
Three arms, one instrument, same page:
| arm | `#inner-open` | `#inner-closed` | text inside the closed root | `closed.shadowRoot` |
|---|---|---|---|---|
| Playwright, stock Firefox | 1 match | 0 matches | 0 matches | `null` |
| Playwright, stock Chromium | 1 match | 0 matches | 0 matches | `null` |
| Playwright, this engine | 1 match | **1 match** | **1 match** | `null` |
The stock rows are exactly what Playwright's own documentation promises:
"Closed-mode shadow roots are not supported." The third row is this engine,
and the last column is the part that matters most: from the page's point of
view nothing changed. `element.shadowRoot` still reads `null`, because the
resolution happens beneath the page's JavaScript rather than by rewriting
what the page can see.
## Why the boundary exists at all
`attachShadow({ mode: "closed" })` is defined to hide the subtree from
outside code. MDN puts it plainly: elements inside the shadow root "cannot
be accessed from JavaScript via the `shadowRoot` property, which is set to
`null`". The mode does not hide anything from the component itself, because
`attachShadow()` returns the root to the code that called it, and that code
keeps the reference for the life of the page.
So a closed root is an encapsulation choice by the component author, not a
protection against automation, and it is not a detection surface either.
Nothing about a closed root tells a site who is visiting.
## How to recognise one in ten seconds
Three signals together, never one alone. The element renders visible
content. A selector aimed inside it returns nothing. And the host's
`.shadowRoot`, read from the console, comes back `null`.
That last signal does not separate a closed root from an element with no
shadow root at all. Pair it with the host's own `textContent`: on our test
page the closed host returns an empty string while text is plainly on
screen, which is the tell. Content you can see, text you cannot read from
the host, and a `null` shadow root is a closed root every time.
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42, headless=True) as browser:
page = browser.new_page()
page.goto("http://127.0.0.1:8731/page.html")
host = page.query_selector("closed-widget")
print(host.evaluate("el => el.shadowRoot !== null")) # False: null, as the spec says
print(host.evaluate("el => el.textContent")) # '' while text is on screen
print(page.locator("#inner-closed").count()) # 1 on this engine, 0 on stock
```
## What still works when a selector will not reach
On stock Playwright the closed subtree is off limits to selectors, and
three routes remain, each for a different reason.
The component's own script keeps full access, so any interface the author
deliberately exposed on the host still answers. On the test page above the
component sets a `readIt()` method on its host, and `page.evaluate` calling
that method returned the closed string on every arm, stock included. A well
built component publishes properties, methods, or events dispatched with
`composed: true`, and that public surface is the door the author intended.
Input reaches the component regardless. The host sits in ordinary light DOM,
so it has a real bounding box, it can be clicked, and keyboard focus moves
into the controls inside it. Neither route lets you name what you are
touching, but both reach it.
And the data usually exists before the component renders it. Most closed
components are filled from a network response, and
[waiting for that response](wait-for-specific-api-response-playwright.md)
sidesteps the rendered tree entirely.
## The workaround that is worse than the problem
You will find snippets that patch `Element.prototype.attachShadow` before
the page's scripts run so every later call becomes `mode: "open"`. It has
two problems. It only wins a timing race you rarely control, and it changes
what the page itself can observe: after the patch, `element.shadowRoot`
stops being `null` on components whose authors asked for `null`. That is a
difference a consistency check can read, which is the opposite of the goal
on a wiki like this one.
The measurement above is the argument against it. Reaching the content while
leaving `shadowRoot` at `null` is strictly better than reaching it by making
the page lie about itself.
## Short answers to the questions that lead here
**Why does my Playwright locator find nothing when the element is visible?**
If the host's `.shadowRoot` reads `null` while text renders on screen, the
content is inside a closed shadow root. Stock Playwright locators stop
there, in Firefox and Chromium alike.
**Does Playwright support closed shadow roots?** No. Its documentation says
so directly, and the measurement above confirms it on both stock engines:
zero matches for content that is plainly rendered.
**How do I tell an open root from a closed one?** Read `element.shadowRoot`.
An object means open. `null` means closed, or no shadow root at all, and the
host's empty `textContent` next to visible text separates those two.
**Can I force a closed root open?** You can patch `attachShadow` before the
component runs, and you should not. It depends on a race you do not control
and it changes what the page can observe about itself.
**What if the data only exists inside a closed root?** Call whatever the
component exposes on its host, or read the network response that filled it.
On this engine, a locator also reaches the content directly.
**See also:** [scraping open shadow DOM with Playwright](how-to-scrape-shadow-dom-playwright.md),
[scraping iframe content with Playwright](how-to-scrape-iframe-content-playwright.md),
and [waiting for a specific API response](wait-for-specific-api-response-playwright.md).
## Sources
- MDN, `Element.attachShadow()`,
https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow -
the `closed` mode definition and the quoted sentence about `shadowRoot`
being set to `null`. Read 5 September 2026.
- Playwright, Locators,
https://playwright.dev/python/docs/locators - "All locators in Playwright
by default work with elements in Shadow DOM" and "Closed-mode shadow roots
are not supported". Read 5 September 2026.
- Our own measurement, 5 September 2026: the page above served from
`127.0.0.1`, run against stock Playwright Firefox, stock Playwright
Chromium and this engine, same script for all three arms.
---
*From [invisible_playwright](https://github.com/feder-cr/invisible_playwright).
The three-arm table is our own run and the test page is printed above so you
can reproduce it rather than take our word for it.*
+86
View File
@@ -0,0 +1,86 @@
---
title: "Cloudflare's AI Labyrinth, Explained"
description: "Instead of blocking a crawler that ignores robots.txt, Cloudflare feeds it an endless maze of real, AI-generated but irrelevant pages, wasting its time while quietly confirming it is a bot. Read from Cloudflare's own announcement and current docs."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 35
---
# Cloudflare's AI Labyrinth, Explained
Every other page in this corpus is about a gate: a check that decides whether a request gets through. AI Labyrinth is a different idea entirely. It does not block anything. When Cloudflare's systems flag a crawler that is ignoring the site's stated crawl preferences, instead of returning a 403 or a challenge, they hand that crawler an endless supply of real, readable, AI-generated pages that link to more of the same, and let it keep "succeeding" indefinitely against content that was never the site it thinks it is reading.
Cloudflare announced this on 2025-03-19 as a free, opt-in feature available to every customer, including those on free plans. Read from Cloudflare's own announcement post and its current developer documentation, both retrieved 2026-08-30.
## Why not just block it
Cloudflare's own stated reasoning for building a maze instead of a wall is a deliberate, named tradeoff: "blocking malicious bots can alert the attacker that you are on to them, leading to a shift in approach." A blocked crawler learns something immediately, that this site is defended, and can retool: rotate IPs, change its user agent, slow down, try a different path. A crawler wandering deep into a maze of plausible-looking, internally-linked pages does not get that signal. It keeps crawling, believing it is still succeeding, for as long as it is willing to follow links that go nowhere real.
The scale problem this exists to address is stated plainly too: Cloudflare's own figures describe "AI Crawlers generat[ing] more than 50 billion requests to the Cloudflare network every day," a volume where per-request blocking decisions compete for the same infrastructure the crawlers are hammering in the first place.
## How the maze is actually built
The mechanism, per Cloudflare's own description, uses "Workers AI with an open source model to create unique HTML pages on diverse topics." Two details matter for understanding what this is and is not:
**The content is real, but deliberately unrelated.** Cloudflare states the generated pages cover "scientific facts, just not relevant or proprietary to the site being crawled." It is not garbage text and not misinformation by design, it is genuine, coherent content that has nothing to do with the site a crawler thinks it is scraping, chosen specifically so the maze does not itself become a source of false claims circulating under someone else's domain.
**It is pre-generated, not created live per request.** Cloudflare's post describes "a pre-generation pipeline that sanitizes the content to prevent any XSS vulnerabilities," with pages stored (in Cloudflare's own infrastructure, via R2 object storage), not generated fresh for every hit. That is a performance and safety choice: generating unique HTML live for every crawler request at Cloudflare's traffic volume would be its own cost and attack surface, and pre-screening for injected script content closes an obvious way a maze of AI-generated pages could otherwise be turned against the very sites serving them.
## It is also a honeypot, not just a delay tactic
The links into the maze are placed where, per Cloudflare's own framing, "no human would deliberately explore deep into a maze of AI-generated nonsense." Cloudflare's developer documentation describes these as invisible, `nofollow`-tagged links: they carry no SEO effect and are "only seen by bots," never rendered in a way a real visitor would notice or click. A compliant crawler that honors a site's no-crawl signals never encounters them either, since triggering the maze specifically requires already having decided to ignore those signals.
That makes following one of these links close to unambiguous evidence of automated, non-compliant crawling. Cloudflare states this data feeds directly back into its detection systems: identifying a crawler this way "with high confidence" contributes fingerprinting signal that improves the machine-learning models Cloudflare uses for bot identification more broadly, shared, per Cloudflare's own materials, across the customer base that opts into blocking AI bots. A single crawler's decision to wander into the maze on one site can sharpen detection everywhere Cloudflare's bot-management systems run.
## Enabling it, and what changed since launch
Cloudflare's current documentation describes activation as a single dashboard toggle: navigate to Security settings, filter to bot traffic, and switch AI Labyrinth on, with no additional configuration required. It produces, per Cloudflare's own current wording, "no impact [on] your search engine optimization (SEO) or your website's appearance."
AI Labyrinth was one early piece of a larger shift in how Cloudflare treats AI crawler traffic broadly. By mid-2026, Cloudflare had extended its crawler-management framing into three explicit categories, Search crawlers (which index and return referral traffic), Agent crawlers (executing real-time tasks on a user's behalf, the same category [an LLM-driven browser agent falls into](ai-agent-timing-signal.md)), and Training crawlers (scraping to embed content into a model permanently), alongside an extension to the `robots.txt` Content Signals format letting a site express which of the three it welcomes. Cloudflare's own announced default, effective 2026-09-15, blocks "mixed-use" crawlers by default specifically on pages that carry advertising. AI Labyrinth sits underneath that broader policy shift as one enforcement mechanism among several, not a standalone feature frozen at its 2025 launch state.
## What this means for a real, engine-level browser
This is worth being direct about, because it is a genuinely different kind of mechanism from everything else in this corpus: **AI Labyrinth is not a fingerprint check at all.** It does not read canvas output, WebGL parameters, TLS handshakes, or navigator properties. It is triggered by crawling behavior, following invisible links a normal rendering and interaction pattern never reaches, after a site's crawl preferences have already been ignored. There is no honest-engine argument to make here the way there is for [CreepJS](creepjs-explained.md) or [DataDome's device layer](datadome-explained.md), because nothing about being a genuinely real browser engine changes whether a crawling process follows every link it finds on a page, including invisible ones humans never see.
`invisible_playwright` is browser-automation infrastructure, not a crawling framework, and this project makes no claim about how any particular scraping logic built on top of it handles hidden links or robots.txt. What is worth stating plainly: a scraper that respects a site's stated crawl preferences and does not follow invisible, `nofollow`-tagged links in the first place never encounters this mechanism at all. AI Labyrinth is aimed at crawlers that have already chosen not to do that.
## Short answers to the questions that lead here
**What is Cloudflare's AI Labyrinth?** A feature that, instead of blocking a crawler ignoring a site's crawl preferences, serves it an endless sequence of real but irrelevant AI-generated pages linking to more of the same, wasting the crawler's resources rather than alerting it to being detected.
**Why not just block the crawler outright?** Cloudflare's own stated reasoning: blocking tells an attacker they have been noticed, which can prompt them to change tactics. A maze keeps a non-compliant crawler engaged without revealing that it has been identified.
**Is the maze content fake or harmful?** The pages are genuine, coherent AI-generated content (Cloudflare cites scientific-fact topics as an example), deliberately unrelated to the site being protected, and pre-screened for XSS before being served, per Cloudflare's own description.
**Does AI Labyrinth affect real visitors or SEO?** No, per Cloudflare's own documentation. The maze's links are invisible, `nofollow`-tagged, and only reachable by something crawling the raw page structure rather than rendering it the way a human browsing session does.
**Does following a maze link get a crawler blocked immediately?** Cloudflare's own framing treats it primarily as a high-confidence detection signal that feeds its broader bot-identification models, rather than describing an automatic, standalone block triggered by that action alone.
**Is AI Labyrinth still the whole story on Cloudflare's AI crawler policy?** No. By mid-2026 Cloudflare had layered a three-category crawler framework (Search/Agent/Training) and a `robots.txt` Content Signals extension on top of it, with default blocking rules for certain crawler types phasing in through September 2026. AI Labyrinth is one enforcement mechanism inside that larger, evolving policy.
**Does a real, engine-level Firefox change whether AI Labyrinth triggers?** No. This mechanism is not a fingerprint check at all; it responds to crawling behavior (following invisible, non-rendered links after ignoring stated crawl preferences), which is a property of the scraping logic driving the browser, not of the browser engine's realness.
**See also:** [Anubis: the proof-of-work firewall, explained](anubis-proof-of-work-explained.md) for a completely different anti-crawler philosophy built on computational cost rather than deception; [How Cloudflare Turnstile actually works](cloudflare-turnstile-explained.md) for Cloudflare's fingerprint-and-challenge mechanism aimed at human visitors rather than crawlers; and [the AI-agent timing signal](ai-agent-timing-signal.md) for how Cloudflare's own Agent-crawler category overlaps with LLM-driven browser automation.
## Sources
- Cloudflare, [Denying AI Bots (announcement post)](https://blog.cloudflare.com/ai-labyrinth/), retrieved 2026-08-30,
for the launch date, the "blocking... alerts the attacker" reasoning, the Workers AI generation pipeline, the
XSS-sanitization and R2 storage detail, and the honeypot/detection-feedback framing.
- Cloudflare, [AI Labyrinth developer documentation](https://developers.cloudflare.com/bots/additional-configurations/ai-labyrinth/),
retrieved 2026-08-30, for the current activation steps, the invisible/`nofollow` link mechanism, and the
"no impact on SEO" statement.
- Cloudflare, [Your site, your rules: new AI traffic options for all customers](https://blog.cloudflare.com/content-independence-day-ai-options/),
retrieved 2026-08-30, for the Search/Agent/Training crawler categories, the Content Signals `robots.txt`
extension, and the 2026-09-15 default-blocking date for mixed-use crawlers on ad-bearing pages.
- Press coverage of the original launch: [Cloudflare Unveils AI Labyrinth: A New Approach to Exhaust AI Crawlers](https://cybersecuritynews.com/cloudflare-unveils-ai-labyrinth-a-new-approach-to-exhaust-ai-crawlers/),
retrieved 2026-08-30, cross-checked against Cloudflare's own post for the 2025-03-19 announcement date and
free/opt-in availability.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright), a Firefox
patched at the C++ level. This mechanism has nothing to do with browser fingerprinting, so this page has
nothing to claim about engine realness one way or the other, honestly: a scraper that respects a site's
crawl preferences and does not chase invisible links never triggers it in the first place.*
+239
View File
@@ -0,0 +1,239 @@
---
title: "Cloudflare Bot Management, Explained"
description: "Cloudflare Bot Management is the always-on scoring engine behind Cloudflare's edge, not the Turnstile widget: a 1-99 bot score from JA3/JA4, HTTP fingerprinting, ML and behavior, computed on nearly every request. Read from Cloudflare's own docs."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 44
---
# Cloudflare Bot Management, Explained
Cloudflare Bot Management is not a widget anyone sees. It is the scoring system running in
the background on almost every request to a Cloudflare-protected site, whether that site
ever shows a visitor a challenge or not. [Turnstile](cloudflare-turnstile-explained.md), the
checkbox-or-nothing widget covered elsewhere on this site, is a separate product a site
opts into and embeds on specific pages. Bot Management is the always-on system behind the
scenes that produces a score, which can feed a WAF rule, a Turnstile risk decision, or
nothing visible at all, depending on how the site owner wired it up.
Cloudflare sells both under the same "bot" umbrella, and a lot of practitioner writing
blends them into one paragraph. This page keeps them apart: what the scoring engine
measures, the score itself, the three product tiers it ships in, and where it hands off to
Turnstile rather than replacing it. Built from Cloudflare's own developer documentation and
one independent technical write-up, retrieved 2026-08-30.
## The bot score: 1 to 99, and what the number means
Cloudflare's own definition is direct: "a score of 1 means Cloudflare is quite certain
the request was automated, while a score of 99 means Cloudflare is quite certain the
request came from a human." Lower is more automated, not the other way around, which
trips people up the first time they read a Bot Analytics dashboard.
The documented bands:
| Score | Category |
|---|---|
| 1 | Automated, high confidence |
| 2-29 | Likely automated |
| 30-99 | Likely human |
| Verified bot | A non-malicious, declared automation (search engine crawlers, uptime monitors) scored separately from the numeric band |
| 0 | Not computed at all for this request |
That last row matters more than it looks: a score of 0 is not "definitely human," it means
Bot Management never ran a scoring pass on that request, for reasons Cloudflare does not
fully enumerate. Reading 0 as a clean bill of health is a misreading of the vendor's own
scale.
Granular, per-request scores are an Enterprise-with-Bot-Management feature. Sites on lower
tiers see traffic bucketed into groupings in a dashboard, not the raw 1-99 number, which the
tier section below spells out.
## What actually produces the score
Cloudflare names four detection engines, and they do not all run on every request or plan:
| Engine | What it does | Plan requirement |
|---|---|---|
| Heuristics | Matches every request against "a growing database of malicious fingerprints"; runs on all requests, all plans | All plans |
| JavaScript Detections (JSD) | Lightweight, invisible client-side script injection aimed at "headless browsers and other malicious fingerprints"; feeds its result to the other engines | All plans, optional |
| Machine Learning (ML) | Cloudflare states this engine "accounts for the majority of all detections," using supervised learning over "headers, session characteristics, and browser signals" to set the final 1-99 score | Business and Enterprise |
| Anomaly Detection (AD) | Unsupervised learning against a per-domain traffic baseline to flag outliers | Enterprise, and Cloudflare has been deprecating it |
Cloudflare's own docs name the categories and stay vague on field-level detail: the company
does not publish which headers, timing values or JavaScript properties the ML engine
weighs, or what JSD's script reads once injected. A Scrapfly write-up, working from the
outside, describes the JS-side probing as covering canvas and WebGL rendering output
alongside mouse-movement and click-cadence behavior, reconstructed from observation, the
same caveat this corpus applies to [Akamai's sensor payload](akamai-bot-manager-explained.md)
and [Imperva's reese84 cookie](imperva-incapsula-explained.md).
One documented mechanism sits underneath all of this: the `__cf_bm` cookie, necessary for
Bot Management (and the free Bot Fight Mode) to function, generated per-site, expiring
after 30 minutes of inactivity, and used, in Cloudflare's own words, to "smooth out the bot
score and reduce false positives" by carrying a session's established pattern forward
instead of re-deriving it cold on every request.
## The network layer: JA3/JA4 as one input, not the whole score
TLS fingerprinting is a documented, named input. Cloudflare's own description of JA3/JA4:
they "identify TLS clients based on how they initiate connections," and the resulting
fingerprint is "a stable identifier across different destination IPs, ports, and
certificates." JA4 exists because JA3 decayed: modern browsers randomize TLS extension
order per connection, which used to make JA3 hashes inconsistent for the same real browser,
and JA4 fixes that by sorting extensions before hashing instead of hashing arrival order.
The mechanics of both, and why one can be patched and the other cannot, are covered in
depth on [the JA3/JA4 page](ja3-ja4-tls-fingerprint.md) and
[the HTTP/2 fingerprint page](http2-fingerprint-detection.md); this page only needs that
Cloudflare treats JA3/JA4 and HTTP/2 metadata (SETTINGS values, pseudo-header order) as
inputs, exposed to Enterprise customers as `cf.bot_management.ja3_hash` and `ja4` fields
for custom WAF rules.
A matching TLS fingerprint is one input clearing, not a passed score. The same point is
made at length for a comparable vendor, where a byte-identical JA3/JA4/HTTP2 fingerprint
still did not stop a block on one deployment: see
[the documented Camoufox case](akamai-bot-manager-explained.md#the-case-that-shows-matching-fingerprint-is-not-passing).
Cloudflare's own ML engine is described the same way, as combining "headers, session
characteristics, and browser signals," never any one of those alone.
## Three tiers, and what each one actually adds
Cloudflare sells bot detection at three levels; the free and mid tiers use the same
underlying engines as Enterprise Bot Management, with less control over what happens next.
| Tier | Plan | What it adds |
|---|---|---|
| Bot Fight Mode | Free | Challenges or blocks obvious bots; no per-category actions, no custom rules |
| Super Bot Fight Mode | Pro, Business | Adds, in Cloudflare's own phrasing, "configurable actions per bot category, bot analytics, and the ability to create exceptions using WAF custom rules," across three groupings: "Definitely automated," "Likely automated," "Verified bots" |
| Bot Management | Enterprise, paid add-on | Per-request numeric scores instead of groupings, JA3/JA4 signal fields for custom rules, dedicated Bot Analytics; Cloudflare recommends it specifically for "API or mobile app traffic" |
A site on Super Bot Fight Mode and one on full Bot Management run the same engines
described above; the difference is what the owner can see and do with the result, not a
different sensor underneath. The two are also mutually exclusive on a zone: enabling
Enterprise Bot Management replaces the Bot Fight Mode / Super Bot Fight Mode toggles
rather than stacking with them.
## Where Turnstile actually fits into this
This distinction is worth being precise about, because the two products get merged in
casual writing constantly. Bot Management is the always-on scoring system: it runs whether
or not the page shows anything, and its output is a number a site owner's rules can act on.
[Turnstile](cloudflare-turnstile-explained.md)
is a widget a site chooses to embed on a specific page, most often a login, checkout, or
comment form, with its own non-interactive checks (proof-of-work, proof-of-space, API
probing, covered in full on the Turnstile page) and its own token verified server-side
against Siteverify. The two often work together: a site can wire a low Bot Management
score into a rule that shows Turnstile specifically to the traffic already flagged,
rather than to everyone. But Turnstile is not how Bot Management works, and passing one
is not evidence about the other. A visitor with a clean Turnstile pass on one page can
still carry a low background bot score on the next request if that page has no Turnstile
embedded to act on it, because the underlying score is computed independently of whether
any widget is present at all.
## The ecosystem around it, and what it actually claims
A real, actively maintained open-source project,
[`cloudscraper`](https://github.com/VeNoMouS/cloudscraper) (6.7k stars at the time of
writing), is worth naming because it shows what practitioner tooling in this space actually
targets: its README describes handling Cloudflare's older "I'm Under Attack Mode"
JavaScript challenges (v1-v3) and, since its 3.0 release, Turnstile CAPTCHA challenges,
using a JavaScript engine to solve the puzzle payload served. That is a different problem
from the one this page describes. Solving a visible challenge is downstream of a decision
Bot Management already made to show one; it says nothing about the numeric score itself,
never exposed to the client, or the session history the ML engine weighs alongside the
current request. Reliably solving every challenge a site serves is not the same as learning
what score triggered it.
## The honest boundary
An engine-level, patched Firefox like this project answers the client-observable layer
honestly: the TLS handshake and the resulting JA3/JA4 hash come from the real network
stack, not a JavaScript override, and the canvas, WebGL, font and navigator surfaces JSD's
script can read are produced by an actually-genuine engine rather than simulated. That is
real, and only part of what Cloudflare's own documentation says the ML engine weighs.
What stays outside anything a browser build touches: the bot score itself, a server-side
number never disclosed to the client that generated it; IP and ASN reputation, which
travels with the exit connection, not the browser; `__cf_bm` cookie state accumulated
across a session; and whatever the supervised model learned from "billions of daily
requests," which no outside party has visibility into. `invisible_playwright` does not
claim to defeat, bypass, or predict Cloudflare's bot score. A real engine changes whether
the client-side half of that score is computed on honest inputs or spoofed ones; it has no
effect on the half that never reaches the client at all.
## Short answers to the questions that lead here
**Is Cloudflare Bot Management the same thing as Turnstile?** No. Bot Management runs on
requests regardless of whether a widget is present. Turnstile is a separate, opt-in
challenge widget a site embeds on specific pages. The two can be wired together, but
neither is a mode of the other.
**What does a Cloudflare bot score of 1 mean, and what does 99 mean?** 1 is Cloudflare's
highest-confidence "this was automated" reading; 99 is the highest-confidence "this was a
human" reading. A score of 0 means no scoring pass ran at all, not a clean result.
**What is Super Bot Fight Mode?** The Pro/Business-tier product, using the same detection
engines as Enterprise Bot Management, adding per-category actions across three bot
groupings, bot analytics, and WAF custom-rule exceptions the free Bot Fight Mode lacks.
**Does a matching TLS (JA3/JA4) fingerprint mean a request passes Cloudflare's scoring?**
No. It is one documented input among several (heuristics, JavaScript detections, machine
learning, and historically anomaly detection). The same "necessary, not sufficient" pattern
is documented in detail for a comparable vendor in
[the Akamai Bot Manager case study](akamai-bot-manager-explained.md).
**Can a browser automation tool guarantee a good Cloudflare bot score?** No. The score is
computed server-side from reputation and session history a browser build has no way to see
or influence.
**Does invisible_playwright bypass Cloudflare Bot Management?** No. It does not solve
Turnstile's interactive tier, does not predict or spoof the bot score, and makes no claim
to defeat the scoring pipeline as a whole. It answers the client-observable inputs to that
pipeline (TLS handshake, canvas, WebGL, fonts, navigator surface) honestly, because they
come from a genuinely real engine rather than a script overriding them.
**See also:** [How Cloudflare Turnstile actually works](cloudflare-turnstile-explained.md)
for the widget product this page deliberately does not re-cover; [How Akamai Bot Manager
actually works](akamai-bot-manager-explained.md) for a comparably-structured scoring
pipeline and a documented case where a matching network fingerprint was not enough; [JA3
and JA4: why a TLS fingerprint cannot be patched](ja3-ja4-tls-fingerprint.md) and [HTTP/2
fingerprint: the layer above the TLS handshake](http2-fingerprint-detection.md) for the
network-layer inputs above; and [Browser trust scores explained](browser-trust-score-explained.md)
for why a Cloudflare bot score, a CreepJS trust score and a reCAPTCHA v3 score do not imply
each other.
## Sources
- Cloudflare, [Bot scores](https://developers.cloudflare.com/bots/concepts/bot-score/),
retrieved 2026-08-30, for the 1-99 scale, the documented score bands, and the `__cf_bm`
cookie's role.
- Cloudflare, [Bot detection engines](https://developers.cloudflare.com/bots/concepts/bot-detection-engines/),
retrieved 2026-08-30, for the Heuristics, JavaScript Detections, Machine Learning and
Anomaly Detection descriptions and plan requirements.
- Cloudflare, [Bot Management for Enterprise](https://developers.cloudflare.com/bots/plans/bm-subscription/),
retrieved 2026-08-30, for the Enterprise tier's capabilities and its mutual exclusivity
with Bot Fight Mode / Super Bot Fight Mode.
- Cloudflare, [Super Bot Fight Mode overview](https://developers.cloudflare.com/bots/get-started/super-bot-fight-mode/),
retrieved 2026-08-30, for plan availability, the three bot groupings, and the difference
from free Bot Fight Mode.
- Cloudflare, [JA3/JA4 fingerprint](https://developers.cloudflare.com/bots/additional-configurations/ja3-ja4-fingerprint/),
retrieved 2026-08-30, for the TLS fingerprint description and the exposed
`cf.bot_management.ja3_hash` / `ja4` fields.
- Cloudflare, [Cloudflare Cookies](https://developers.cloudflare.com/fundamentals/reference/policies-compliances/cloudflare-cookies/),
retrieved 2026-08-30, for the `__cf_bm` cookie's per-site generation, 30-minute
inactivity expiry, and stated purpose.
- Scrapfly, ["How Cloudflare Detects Bots: TLS, HTTP/2, Canvas, and Turnstile
Explained"](https://scrapfly.io/blog/posts/how-cloudflare-detects-bots), retrieved
2026-08-30, a practitioner write-up (not Cloudflare's own documentation) for the
reconstructed canvas/WebGL and behavioral detail behind JavaScript Detections.
- [`VeNoMouS/cloudscraper`](https://github.com/VeNoMouS/cloudscraper), GitHub, retrieved
2026-08-30, for what a real, actively maintained practitioner tool in this space targets
(IUAM JavaScript challenges and Turnstile CAPTCHA pages), distinct from the scoring
engine this page describes.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level and driven by stock Playwright. Bot Management's actual
score never reaches the client that earned it; what this page can speak to is the half of
the pipeline a real browser engine touches, and it stops exactly where that half stops.*
+247
View File
@@ -0,0 +1,247 @@
---
title: "How Cloudflare Turnstile actually works"
description: "Turnstile is not a puzzle widget, it is a signal-gathering decision engine: non-interactive JS challenges, proof-of-work, a risk-scored escalation to a checkbox, and a server-side token check. Read from Cloudflare's own docs."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 23
---
# How Cloudflare Turnstile actually works
Turnstile is not a captcha with the images swapped for a checkbox. Most of the time
there is no checkbox at all: the widget runs a set of quiet JavaScript checks in the
background, decides the visitor is probably fine, and hands back a token before a
human would even notice anything happened. The checkbox is the fallback path, shown
only when those quiet checks come back uncertain.
This page is about that mechanism, read from Cloudflare's own developer
documentation rather than guessed at from a blocked request. Not how to get past it,
how it decides.
## What the widget actually is
A Turnstile deployment has two halves. The client-side widget is a script loaded
from `https://challenges.cloudflare.com/turnstile/v0/api.js` and dropped into a page
either implicitly, by adding a `cf-turnstile` container div and letting the script
scan for it on load, or explicitly, by calling `turnstile.render()` yourself when
you need control over timing, such as a form that only appears after some other
interaction. Each widget carries a public sitekey and is bound to a private secret
key that never leaves your server.
When the widget finishes its checks, it produces a token and writes it into a hidden
`cf-turnstile-response` field (or hands it to a callback you registered). That token
is not proof of anything by itself. It has to be checked, server-side, against
Cloudflare's Siteverify API, which is the second half of the deployment and the part
a lot of first attempts skip.
## The part that runs before you ever see a checkbox
Cloudflare's own description of the mechanism is that it runs "a series of small
non-interactive JavaScript challenges" to gather signals about the visitor and the
browser environment, and names the categories directly: proof-of-work, proof-of-space,
probing for web APIs, and other checks aimed at browser quirks and human behavior.
**Proof-of-work** is a small computational puzzle the browser has to solve, the same
family of idea as Hashcash: spend a measurable amount of CPU on something that is
cheap for the server to verify. A script that can run arbitrary JavaScript pays this
cost the same as a real browser does; a client with no JS engine at all cannot pay it
and never produces a token.
**Proof-of-space** is the storage-based cousin of the same idea, trading disk or
memory instead of CPU cycles.
**Web API probing** and **browser-quirk detection** are the categories that matter
most for anything driving a real browser: calling real, specified APIs and checking
whether the answers are internally consistent with each other and with the engine the
page claims to be. Cloudflare does not publish the exact list of properties it reads,
and the widget script itself is not meant to be human-readable, so anyone claiming a
precise inventory of what it checks is going further than Cloudflare's own
documentation does. What is documented is the shape of the approach, not the field
names.
The point of running all of this before showing anything is stated plainly in
Cloudflare's docs too: the goal is to "fine-tune the difficulty of the challenge to
the specific request and avoid showing a visual or interactive puzzle to a user" who
does not need one. Most visitors, automated or not, never see a widget at all if the
non-interactive layer is satisfied.
## The three modes, and when a checkbox appears
A site owner picks one of three widget modes when they create a sitekey, and the
mode decides whether an interactive step exists at all.
| Mode | What the visitor sees | When it appears |
|---|---|---|
| Managed | Nothing, or a checkbox | Non-interactive checks run first; a checkbox appears only if visitor risk is high enough |
| Non-Interactive | A loading spinner, never a checkbox | Verification always runs silently in the background |
| Invisible | Nothing at all | No visible widget or loading indicator under any outcome |
Managed is the one most sites use and the recommended default in Cloudflare's own
guidance, because it is the only mode that can show an interactive step, and it only
does so when the signal-gathering layer above flags the visitor as worth a second
look. Non-Interactive and Invisible never show a checkbox by design, no matter what
the signals say; a site that wants a hard human gate has to use Managed.
## The managed challenge: a human gate, not a fingerprint gate
When Managed mode does decide to show something, Cloudflare's own documentation
describes it as a "simple checkbox that the visitor must click to proceed", explicitly
not an image puzzle or text to transcribe. This is the point worth being precise
about: the checkbox is not another fingerprint probe layered on top of the earlier
ones. It is a click, gated behind whatever risk score the earlier signals produced.
That distinction matters for what a real engine can and cannot do about it. Everything
in the non-interactive layer, the proof-of-work, the API probing, the consistency
checks, is answered by whatever is running the JavaScript. A genuine browser engine
answers those honestly because it is not simulating the answers, it is producing
them the normal way, the same way it would for any other page. The interactive
checkbox tier is a different kind of gate: it exists specifically for the visitors
the earlier layer could not clear on signal alone, and clicking it is a human action,
not a value a browser reports. No amount of engine-level fidelity changes what that
tier is checking for, because it stopped checking the browser and started checking
for a click.
## The token, and why passing the widget is not the finish line
A successful pass, interactive or not, produces a token. Cloudflare's own
documentation is direct about what that token is worth on its own: "You must call
the Siteverify API to complete your Turnstile implementation. The client-side widget
alone does not protect your forms." The token proves the widget ran and returned
success; it proves nothing to your server until your server checks it.
The check is a server-to-server call:
```
POST https://challenges.cloudflare.com/turnstile/v0/siteverify
```
with the site's secret key and the token as the two required parameters (an optional
`remoteip` and an `idempotency_key` for safe retries are also accepted). The response
is JSON: a `success` boolean, a `challenge_ts` timestamp, the `hostname` the challenge
ran on, an `action` and `cdata` if the integration set them, and an `error-codes`
array when it fails.
Two properties of the token matter for anyone thinking about this mechanically.
It expires 300 seconds after it is issued, and it is single-use: presenting the same
token to Siteverify twice returns a `timeout-or-duplicate` error on the second call.
A token cannot be harvested once and replayed later, and a token generated for one
page load does not answer for the next one.
## What one real deployment looked like
Security researcher Troy Hunt wrote up putting invisible Turnstile in front of an API
endpoint that was under sustained bot traffic, and the numbers are a useful reality
check on what the mechanism actually filters in practice. Over roughly five months
and more than 100 million challenges issued, he reported a 91% pass rate among issued
tokens, around 990,000 requests rejected for arriving without a valid token, and
traffic that had previously spiked to 121,300 requests in a five-minute window during
attacks dropping to zero abnormal spikes after deployment. He also noted that 40% of
the requests that failed validation traced back to just five distinct JA3 TLS
fingerprints, a network-layer signal outside anything the JavaScript layer measures.
That is one deployment, on one endpoint, and it is not a claim that every Turnstile
deployment behaves identically. It is real, named, and checkable, which is more than
most numbers floating around this topic can claim.
## Where an engine-level browser actually helps, and where it does not
The non-interactive layer is built to read real signals from a real JavaScript
environment: whether a proof-of-work computation lands where a real engine's timing
puts it, whether the web APIs it probes answer the way the engine they claim to be
actually answers, whether the browser-quirk checks find the quirks a genuine build of
that engine has. A browser that is genuinely the engine it presents, patched at the
level that produces those answers rather than overridden from a content script,
answers this layer the same way any other real instance of that engine does, because
there is no simulated answer to catch, only the real one.
What that does not change is the interactive tier. If Managed mode's risk scoring
decides a visitor needs to click the checkbox, an honest engine fingerprint does not
make that requirement disappear, because the requirement was never about the
fingerprint in the first place. It is a human-verification gate sitting downstream of
the signal layer, and no amount of realness upstream removes a gate that is checking
for something else entirely.
None of this is a claim that any tool solves Turnstile, and a captcha-solving promise
is not one this project makes: `invisible_playwright` does not click checkboxes for
you or defeat the interactive tier. What a real, engine-level Firefox does is answer
the non-interactive layer honestly, the same way a real Firefox always would, which is
the layer that decides whether most visitors ever see a checkbox at all.
## Short answers to the questions that lead here
**Does Cloudflare Turnstile detect headless browsers?** The non-interactive layer is
built to catch the gap between a browser's claimed engine and its actual JavaScript
environment, which is exactly the kind of gap an incomplete or scripted environment
tends to have. Cloudflare does not publish a specific "headless" flag; it publishes
signal categories, not a checklist.
**What is the difference between Turnstile's three modes?** Managed can show an
interactive checkbox when the earlier signals look risky; Non-Interactive always
verifies silently behind a spinner and never shows a checkbox; Invisible shows nothing
at all under any outcome. Only Managed has a human-click tier.
**Does passing the checkbox mean I passed everything?** No. The checkbox produces a
token, and the token only counts once your server has validated it against
Siteverify. A token that is never checked server-side protects nothing.
**Can a Turnstile token be reused or harvested for later?** No. It expires after 300
seconds and Siteverify rejects a second submission of the same token with a
`timeout-or-duplicate` error.
**Is Turnstile the same thing as a captcha?** No, and Cloudflare's own framing leans
on that distinction: it is a low-friction check that tries to avoid ever showing a
visual or interactive puzzle, reserving the checkbox for visitors its non-interactive
signals could not already clear.
**Does a real browser engine bypass Turnstile?** It answers the non-interactive
signal layer the way any genuine instance of that engine does, because those answers
are not overridden, they are the real ones. It has no effect on the interactive
checkbox tier, which is a human-verification gate, not a fingerprint check.
**Where does the actual detection logic live?** Cloudflare does not publish the exact
properties the widget reads or the scoring behind the risk decision. What is
documented is the category list (proof-of-work, proof-of-space, web API probing,
browser-quirk and behavior checks) and the three-mode structure; the internals below
that are not public.
**See also:** [navigator.webdriver is not the tell you think it is](navigator-webdriver-explained.md),
for the one property every detector checks first and why patching it alone changes
little; [Function.prototype.toString and the \[native code\] check](tostring-native-code-detection.md),
for why a JavaScript-level override of a Web API is itself detectable; [Playwright
detected as a bot: the checklist to fix it](playwright-detected-as-bot.md), for a
troubleshooting order when one site starts showing automation a different page; and
[what mouse-dynamics behavioral biometrics score](mouse-dynamics-behavioural-biometrics.md),
for the kind of human-behavior signal Cloudflare's category list names but does not
detail.
## Sources
- Cloudflare, [Turnstile overview](https://developers.cloudflare.com/turnstile/),
retrieved 2026-08-30, for the non-interactive challenge categories (proof-of-work,
proof-of-space, web API probing, browser-quirk and behavior detection) and the
stated goal of avoiding a visual puzzle where possible.
- Cloudflare, [Turnstile widgets](https://developers.cloudflare.com/turnstile/concepts/widget/),
retrieved 2026-08-30, for the Managed, Non-Interactive and Invisible mode
definitions and when each one can show a checkbox.
- Cloudflare, [Turnstile challenge types](https://developers.cloudflare.com/cloudflare-challenges/challenge-types/turnstile/),
retrieved 2026-08-30, for the signal-based decision framing and the description of
the interactive challenge as a checkbox click.
- Cloudflare, [Embed the widget](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/),
retrieved 2026-08-30, for the widget script URL, implicit vs. explicit rendering,
and the `cf-turnstile-response` token field.
- Cloudflare, [Server-side validation](https://developers.cloudflare.com/turnstile/get-started/server-side-validation/),
retrieved 2026-08-30, for the Siteverify endpoint, its parameters and response
fields, and the 300-second single-use token behavior.
- Troy Hunt, ["Fighting API Bots with Cloudflare's Invisible Turnstile"](https://www.troyhunt.com/fighting-api-bots-with-cloudflares-invisible-turnstile/),
retrieved 2026-08-30, for the real deployment numbers quoted above: challenge
volume, pass rate, rejected requests, and the JA3-fingerprint concentration among
failures.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level and driven by stock Playwright. This page describes
a mechanism, not a workaround: the product does not solve captchas or click Turnstile's
interactive tier for you, and any tool that claims to defeat Cloudflare wholesale is
promising more than the docs above actually say.*
+199
View File
@@ -0,0 +1,199 @@
---
title: "Codec fingerprinting: canPlayType and MediaCapabilities"
description: "Codec fingerprinting: the formats a browser claims to play reveal its build and platform; whether decoding is power efficient reveals the machine behind it."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 7
---
# Codec fingerprinting: canPlayType and MediaCapabilities
Codec fingerprinting identifies a browser by which media formats it claims it can
decode, and identifies the machine underneath by how efficiently it decodes them. Ask a
browser what video formats it can play and the answer is not about the person using it.
It is about the build, the operating system underneath, and increasingly the hardware,
which makes it three separate fingerprinting surfaces wearing one API.
It is also one of the surfaces nobody checks after spoofing everything else, which is
what makes it worth a page.
## What the two APIs actually return
Two APIs answer the "what can you play" question, from two different eras of the
platform: the old `canPlayType()` returns a vague string, the modern
`mediaCapabilities.decodingInfo()` returns a structured verdict including whether
decoding is power efficient. The old one is deliberately vague:
```js
const v = document.createElement('video');
v.canPlayType('video/mp4; codecs="avc1.42E01E"'); // "probably", "maybe", or ""
v.canPlayType('video/webm; codecs="vp9"');
v.canPlayType('audio/mpeg');
```
Three possible answers: `probably`, `maybe`, or an empty string. The vagueness is
historical, and it does not reduce the information much, because what matters is the
**pattern across a list of types**, not any single verdict.
The modern one is far more revealing:
```js
await navigator.mediaCapabilities.decodingInfo({
type: 'file',
video: { contentType: 'video/mp4; codecs="avc1.42E01E"',
width: 1920, height: 1080, bitrate: 3000000, framerate: 30 }
});
// { supported: true, smooth: true, powerEfficient: true }
```
Note the third field. That is the interesting one and the rest of this page is largely
about it.
## Codec support identifies the build and the platform
Which codecs a browser supports depends on how it was compiled and what the operating
system provides. Some formats are handled by the browser's own decoders, others are
delegated to the platform, and licensing means builds differ.
The practical consequences:
- **Different browsers give different patterns**, which is how codec probing is used for
plain browser identification, independently of the user agent.
- **The same browser version on different operating systems gives different patterns**,
because the platform decoders differ. A Linux build and a Windows build of the same
Firefox are not identical here.
- **Stripped builds differ from consumer builds.** A minimal container image may lack
system codecs that a desktop install has.
That third point is the one that bites automation. Claiming Windows while returning the
codec profile of a slim Linux container is the same class of contradiction as
[claiming Windows with a Linux font set](headless-fonts-differ.md), and it is checked
the same way: by comparison, not by rarity.
## powerEfficient is a hardware question, not a codec question
`powerEfficient` reports whether decoding a given stream would use hardware
acceleration, which is what turns this from a browser-identification surface into a
machine one. On a desktop with a modern GPU, common formats decode in dedicated silicon
and the answer is `true`. On a machine with no GPU, everything decodes on the CPU and the
answer is `false` for formats a real desktop would accelerate.
So this API answers, in one field, the same question as
[a software WebGL renderer](webgl-renderer-strings.md),
[an empty speech voice list](speech-synthesis-voices.md) and
[a missing audio device](audiocontext-fingerprinting.md): is this a person's computer or
a server.
And `smooth` adds a second dimension, since it reflects whether the machine can decode
that resolution and framerate in real time.
Nobody lists `decodingInfo` in a stealth checklist. It costs one `await`.
## Why randomising codec support is the wrong instinct
The reflex is to vary the answers per session. That is the same
mistake as
[randomising WebGL numeric parameters](webgl-parameters-are-identical.md), and it fails
for the same reason.
Codec support is not a per-user setting. Everyone running a given browser build on a
given platform reports the same pattern, which means the pattern is a **cohort**, and the
crowd is the disguise. A browser reporting a combination of supported and unsupported
formats that no real build produces is not blending in, it has invented a build that does
not exist.
Nor should the values move between page loads. A browser that supports AV1 on one load
and not the next is describing software that reinstalled itself mid-session.
The defensible approach is the one used for the other hardware-shaped values in this
project: sample the codec profile **together with the machine class**, from combinations
that occur, so a low-end integrated-graphics identity does not claim the codec profile of
a workstation. It is one of four dimensions sampled jointly rather than independently,
alongside the audio profile, the storage quota and the antialiasing level, precisely so
they cannot contradict each other.
## Checking your own
```js
const v = document.createElement('video');
const types = [
'video/mp4; codecs="avc1.42E01E"',
'video/mp4; codecs="hev1.1.6.L93.B0"',
'video/webm; codecs="vp8"',
'video/webm; codecs="vp9"',
'video/mp4; codecs="av01.0.05M.08"',
'audio/mpeg', 'audio/ogg; codecs="opus"', 'audio/mp4; codecs="mp4a.40.2"',
];
console.table(Object.fromEntries(types.map(t => [t, v.canPlayType(t) || 'no'])));
const info = await navigator.mediaCapabilities.decodingInfo({
type: 'file',
video: { contentType: 'video/mp4; codecs="avc1.42E01E"',
width: 1920, height: 1080, bitrate: 3000000, framerate: 30 },
});
console.log(info); // watch powerEfficient
```
What you want to see:
- The pattern matches a stock browser of the same version **on the platform you claim**,
not on the platform you are running.
- `powerEfficient` is `true` for mainstream formats if you are claiming a desktop.
- The answers are identical on a reload and on a relaunch of the same identity.
- Nothing exotic is supported that the claimed build does not support.
The first and second are the ones that fail on a server, and neither is fixed by anything
at the JavaScript layer.
## Conclusion
Codec probing is cheap, unglamorous and rarely audited. It carries three different kinds
of information at once: which browser you are, which platform you are on, and whether
your machine has a video decoder.
The first two are fixed by making the answers match the build and platform you claim.
The third is the familiar one: a machine with no GPU says so, in yet another place, and
the only real fixes are the same as everywhere else.
## Short answers to the questions that lead here
**Is `canPlayType` used for fingerprinting?** Yes, as a pattern across a list of types
rather than as a single answer. It identifies the browser and the platform.
**What does `powerEfficient` reveal?** Whether decoding would be hardware accelerated,
which is a statement about the machine rather than the codec.
**Should I spoof codec support?** Match it to the build and platform you claim. Do not
randomise it, and do not let it vary between page loads.
**Why do Linux and Windows builds differ?** Because some decoding is delegated to the
platform, and the platforms provide different things.
**Does `privacy.resistFingerprinting` cover this?** Firefox has worked on standardising
these answers under that mode, which is one more way of being identifiable as someone
running that mode. There is
[a longer page on that trade](resist-fingerprinting.md).
**Is this checked in practice?** It is cheap enough that assuming it is checked costs you
nothing, and it is one `await` to verify on your own setup.
**See also:** [screen size and viewport tells](screen-size-headless-tells.md),
[hardwareConcurrency, deviceMemory and storage quota](hardware-concurrency-device-memory.md)
and [Playwright in Docker](playwright-docker-detection.md), which are the rest of the
"what the machine says about itself" family.
## Sources
- MDN, [`HTMLMediaElement.canPlayType`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType)
and the [Media Capabilities API](https://developer.mozilla.org/en-US/docs/Web/API/MediaCapabilities_API).
- Firefox's own tracking of standardising these answers under resist-fingerprinting.
- This project's codec profile, sampled jointly with the machine class rather than
independently, for the reason given above.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The joint sampling is the same decision made for
audio, storage quota and antialiasing, and for the same reason: independently sampled
dimensions contradict each other.*
@@ -0,0 +1,215 @@
---
title: "Color-gamut and HDR media queries as a fingerprint"
description: "Color-gamut and HDR media features expose display capability without JavaScript. Why they must align with screen.colorDepth and what misalignment reveals."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 28
---
# Color-gamut and HDR media queries as a fingerprint
Most of the fingerprint surfaces people worry about live in JavaScript: `navigator`,
canvas, WebGL, audio. This one does not. The [`color-gamut`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/color-gamut), [`dynamic-range`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/dynamic-range) and
[`video-dynamic-range`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/video-dynamic-range) media features describe what a display can show, and a page can
read them from CSS alone, before a single line of script runs. That makes them a
quiet consistency check: they have to agree with everything your JavaScript says about
the same screen, and nothing you set in code touches them.
This page is what those features report, why they are read from a different code path
than `screen.colorDepth`, the disagreement that gives a browser away, and how
invisible_playwright keeps the two sides telling one story. It answers the question in
the title honestly: matching these features helps you look like a real display, and it
does nothing for your IP or your pacing.
## What color-gamut and dynamic-range actually report
Three CSS media features describe a display's color and brightness capability:
- `color-gamut` reports the range of color the output can render, as one of `srgb`,
`p3` or `rec2020`. A page tests it with `@media (color-gamut: srgb) { ... }` or from
script with `matchMedia("(color-gamut: p3)")`.
- `dynamic-range` reports whether the display and the browser can show high dynamic
range content, as `standard` or `high`.
- `video-dynamic-range` is the same question aimed specifically at video output, and
can differ from `dynamic-range` on hardware that treats the two paths separately.
None of these needs JavaScript to be readable. A stylesheet can branch on them and a
detector can observe which branch applied, so they are live even on a page that runs
no script at all. This puts them in the same family as the
[CSS media features documented for dark mode and pointer type](css-media-query-fingerprinting.md),
and distinct from them in what they describe: not a user preference, but a hardware
property of the panel.
The values are not free-floating. A real Windows laptop with a standard sRGB panel
reports `color-gamut: srgb` and `dynamic-range: standard`, and it reports a
`screen.colorDepth` of 24 to match. Those two facts come from the same physical
display, so on real hardware they never contradict each other. That is the whole
point of the surface for a detector.
## Why this is read from a different code path than colorDepth
Here is the trap. `screen.colorDepth` is a JavaScript property. The color-gamut media
feature is resolved by the CSS engine when it evaluates a media query. A page can read
both, and it can compare them, but they arrive through two entirely separate paths
inside the browser.
That separation is exactly what a consistency detector wants. If a stealth layer
overrides `screen.colorDepth` in JavaScript to report a plausible 24-bit display, but
the CSS side still resolves `color-gamut` against whatever the underlying environment
actually has, the two disagree. One code path was patched and the other was not. A
real browser cannot produce that disagreement, because both values are read off the
same panel. So a page that finds `screen.colorDepth: 24` next to a `color-gamut` that
resolves to something else has found a browser whose two halves were configured
independently, which is a tell that no single value would have given up.
The same shape shows up in
[the platform and oscpu strings that have to agree with the user agent](navigator-platform-oscpu-consistency.md):
individually every value is plausible, and the fingerprint is in whether they line up.
A JavaScript-only spoof can set the property a page reads first, and miss the second
surface that reports the same underlying fact through CSS.
## Why a page-level override cannot fix this
If your approach to fingerprinting is injecting JavaScript, this surface is a problem,
because there is nothing in JavaScript's gift to change here. You can redefine
`matchMedia` to lie about `color-gamut`, but redefining a built-in is itself one of
the loudest tells there is: [CreepJS](how-to-test-bot-detection.md) walks descriptors
and prototypes and records a patched built-in by name. And even if you patch
`matchMedia`, the pure-CSS path that applies a `@media (color-gamut: ...)` rule
without ever calling script is still resolving against the real value. You cannot
intercept a stylesheet branch from a `matchMedia` override.
The only place this can be made consistent is below JavaScript, where the CSS engine
and the `screen` object read the same display description. invisible_playwright is a
Firefox patched at the C++ level rather than a script injected into a stock browser,
so the display it presents is a single coherent object: the color-gamut media feature,
`dynamic-range`, `video-dynamic-range` and `screen.colorDepth` all resolve from one
plausible Windows sRGB display, the way they do on the real Firefox it is built from.
There is no second code path left unpatched, because the value is not being faked at
the property level at all.
This is the same reason [an impossible screen geometry](screen-size-headless-tells.md)
survives every page-level spoofer: the surfaces that describe the physical display are
not the ones a script can reach.
## Reading it yourself
The `browser` returned by invisible_playwright is a real Playwright `Browser`, so you
read these features the same way you would in any Playwright script. Launch, open a
page, and evaluate the media queries plus the property they have to agree with:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
report = page.evaluate("""() => ({
colorGamut:
matchMedia('(color-gamut: rec2020)').matches ? 'rec2020' :
matchMedia('(color-gamut: p3)').matches ? 'p3' :
matchMedia('(color-gamut: srgb)').matches ? 'srgb' : 'unknown',
dynamicRange:
matchMedia('(dynamic-range: high)').matches ? 'high' : 'standard',
videoDynamicRange:
matchMedia('(video-dynamic-range: high)').matches ? 'high' : 'standard',
colorDepth: screen.colorDepth,
pixelDepth: screen.pixelDepth,
})""")
print(report)
# {'colorGamut': 'srgb', 'dynamicRange': 'standard',
# 'videoDynamicRange': 'standard', 'colorDepth': 24, 'pixelDepth': 24}
```
The check that matters is not any single line of that output. It is that
`colorGamut: 'srgb'` and `colorDepth: 24` describe the same display, and would still
describe the same display if you read them again in the next session. Because the
identity is derived from the seed, passing `seed=42` gives you the same display every
run, so this is a value you can assert on in a test rather than a moving target. The
[reproducible-fingerprint workflow](quickstart.md) is what makes that assertion stable.
Run it against a stock Firefox on the same machine and diff the two reports field by
field. On a real desktop panel they match. The point of the exercise is to confirm the
patched build sits on the same side of that diff as the real browser, not on the
overcorrected side where a spoof reports a `p3` display no one asked for.
## The honest limit
This makes your browser's display self-consistent. It is worth being precise about
what that does and does not buy you.
Color-gamut and dynamic-range are properties of the browser and its claimed hardware.
Getting them right removes one way a page distinguishes a real display from a patched
one, and it removes it at the layer where it actually lives rather than papering over
it in script. That is a real part of why invisible_playwright reads as a genuine
Firefox to fingerprint, TLS and driver-layer checks.
It is not the whole session. These media features say nothing about where your traffic
exits or how fast you send it. A perfectly consistent sRGB display on a datacenter
address that a scoring service already knows is still on a known address. A browser
that fills a form in eighty milliseconds still moves like no human, whatever its
color-gamut reports. invisible_playwright does not touch IP reputation, per-account
quotas, rate limits, or the timing of your actions, and it does not claim to. Those
you supply: a clean residential proxy, human pacing, one account doing one plausible
amount of work. The fingerprint is the part that is hard to get right by hand, and it
is the part this tool owns; the rest of the session is still yours.
## Conclusion
Color-gamut, dynamic-range and video-dynamic-range are a display fingerprint that
lives in CSS, readable with no JavaScript, and they have to agree with the
`screen.colorDepth` a page reads from script through a completely separate code path.
A page-level override touches one path and leaves the other reporting the real
environment, which is a contradiction a real browser never produces. invisible_playwright
presents a single coherent Windows sRGB display across both paths because it is patched
below JavaScript, and it keeps that display stable across runs when you pin the seed.
That is worth exactly what it is worth: a browser that looks real, on top of an exit
and a rhythm you still have to get right yourself.
## Short answers to the questions that lead here
**Can a website read my display's color gamut without JavaScript?** Yes. The
`color-gamut` media feature is resolved by the CSS engine, so a stylesheet can branch
on it and observe the result before any script runs.
**What is the trap with color-gamut and screen.colorDepth?** They describe the same
physical display but are read through different code paths. If a spoof patches one and
not the other, they disagree, which a real browser never does.
**Can I fix this by overriding matchMedia?** No. Redefining a built-in is itself a
loud tell, and it still does not touch the pure-CSS path that applies a
`@media (color-gamut: ...)` rule without calling script.
**What does invisible_playwright report for these features?** A plausible, consistent
Windows sRGB display: `color-gamut: srgb`, `dynamic-range: standard`, and a matching
24-bit `screen.colorDepth`, the same as the real Firefox it is built from.
**Does matching these features make me undetectable?** No. It makes your display
self-consistent. It does nothing for your IP reputation, your rate limits or your
behaviour, which you still have to handle with a clean proxy and human pacing.
**Will the same seed give the same color-gamut every run?** Yes. The display is derived
from the seed, so `seed=42` reports the same values every session, which is what lets
you assert on them in a test.
## Sources
- The [Media Queries Level 5 specification](https://www.w3.org/TR/mediaqueries-5/),
which defines `color-gamut`, `dynamic-range` and `video-dynamic-range` and their
resolution from the output device.
- This project's fingerprint gates, which cross-check the CSS-resolved display
features against `screen.colorDepth` and the canvas and WebGL persona for the same
seed.
**See also:** [CSS media features as a fingerprint surface](css-media-query-fingerprinting.md),
[keeping navigator.platform and oscpu consistent](navigator-platform-oscpu-consistency.md),
and [screen sizes that give a headless machine away](screen-size-headless-tells.md).
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The color-gamut and
colorDepth disagreement is one I would rather find in my own diff than have a page find
for me.*
@@ -0,0 +1,211 @@
---
title: "Combine invisible_playwright with httpx for speed"
description: "Clear the fingerprint-gated entry in a real browser, export storage_state, then hand the cookies to httpx for cheap high-volume follow-up requests - and the sharp limit."
parent: "Scraping with Playwright"
grand_parent: "Guides"
nav_order: 89
---
# Combine invisible_playwright with httpx for speed
A browser is expensive. It starts a process, renders a page, runs the site's
JavaScript, and holds memory the whole time. If you need one page a minute that is fine.
If you need a thousand JSON responses from an endpoint the site already exposes, paying
browser cost for each one is the slow way to do it.
The fast way is a split: use the browser for the part that needs a browser, and use a
bare HTTP client for the part that does not. This page shows the handoff concretely -
export the session the browser established, hand it to `httpx`, and let `httpx` do the
bulk - and it is equally clear about the one boundary where the trick stops working,
because that boundary is the whole skill.
## Why the browser clears the door and httpx does not
`invisible_playwright` is a Firefox patched at the C++ level and driven by stock
Playwright. It is built to look like a real browser driven by a real person: the
fingerprint, the TLS handshake and the driver layer all read as a genuine Firefox, which
is why it clears the checks that turn plain automation away at the door. That is the
part you cannot fake with a bare HTTP client. An endpoint that inspects the JavaScript
fingerprint, or reads the TLS handshake, expects a browser to be on the other end.
`httpx` is the opposite tool on purpose. It is a fast, async-capable Python HTTP client
with no JavaScript engine and no browser TLS stack. It sends a plain client handshake and
whatever headers you give it, and nothing else. That is exactly why it is cheap, and
exactly why it cannot pass a fingerprint check. It has no fingerprint to present.
So the division is not a hack, it is the honest shape of the problem. The browser is for
the fingerprint-gated fetches. `httpx` is for the unguarded bulk. Knowing which endpoint
is which is the entire exercise, and most of this page is about telling them apart.
## Establish the session in the browser
First, do the guarded part properly: launch the real browser, clear whatever gates the
entry (a login, a challenge page, a first navigation that sets a session cookie), and let
it settle. Switching from plain Playwright is two lines, and the object you get back is a
real Playwright `Browser`, so every method below is the stock API:
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42, proxy={
"server": "socks5://gate.example.com:1080",
"username": "u", "password": "p",
}) as browser:
page = browser.new_page()
page.goto("https://example.com/app")
# ... do whatever establishes the session: submit a form, pass an
# interactive check, land on the page that issues the session cookie ...
page.wait_for_load_state("networkidle")
```
The seed is not decoration here. It pins the identity, so the fingerprint that created
this session is reproducible - which matters the moment you reuse the session, because a
reused session is still tied to the machine that created it. That coupling is the subject
of [why reusing a session beats re-automating the login form](automating-login-vs-session-reuse.md).
## Export storage_state and hand it to httpx
Playwright already has the export you need.
[`context.storage_state()`](https://playwright.dev/python/docs/api/class-browsercontext#browser-context-storage-state)
returns the cookies and local storage the session accumulated, in a plain dict. Capture it
while the browser is still open:
```python
state = page.context.storage_state()
# state == {"cookies": [{"name": ..., "value": ..., "domain": ...}, ...],
# "origins": [{"origin": ..., "localStorage": [...]}, ...]}
```
Now the browser has done its job. Everything after this can happen in a cheap client. Map
the cookies into an `httpx.Client` and fire the follow-up requests concurrently:
```python
import httpx
cookies = httpx.Cookies()
for c in state["cookies"]:
cookies.set(c["name"], c["value"], domain=c["domain"], path=c.get("path", "/"))
# route httpx through the SAME exit the browser used, see the caveat below
proxy = "socks5://u:p@gate.example.com:1080"
with httpx.Client(cookies=cookies, proxy=proxy, http2=True,
headers={"User-Agent": page.evaluate("navigator.userAgent")}) as client:
for page_num in range(1, 200):
r = client.get(f"https://example.com/api/items?page={page_num}")
r.raise_for_status()
handle(r.json())
```
Two hundred JSON pages just came back without starting two hundred browsers. If the bulk
endpoint returns the same data the page renders, this is also the moment to stop parsing
HTML and read the response directly, the same idea covered in
[capturing XHR and API responses](how-to-capture-xhr-api-responses-playwright.md).
## The boundary: any endpoint that re-checks the fingerprint rejects the httpx leg
Here is the sharp edge, and it is not negotiable. `httpx` carries the cookies but sends
no browser fingerprint. It presents a plain TLS handshake and no JavaScript surface at
all. So the handoff works on exactly one kind of endpoint: one that trusts the cookie and
does not re-inspect the caller.
Plenty of endpoints are like that. A paginated data API behind a session cookie, a
download URL, an internal JSON route the page itself calls - these usually check that you
hold a valid session and nothing more. The `httpx` leg sails through.
But some endpoints re-run the check on every request. They read the TLS handshake, or
require a token that only the site's JavaScript can mint, or expect a browser-shaped
request signature alongside the cookie. Against those, the cookie is necessary but not
sufficient, and the bare client is refused - often with a `403` or a challenge page
where the browser got JSON. There is no client-side trick that gives `httpx` a browser
handshake; if the endpoint re-checks the fingerprint, that endpoint stays in the browser.
The way you find the boundary is empirical and cheap: send one `httpx` request to the
target endpoint with the exported cookies. If it returns the same body the browser got,
that endpoint is safe to bulk. If it returns a challenge, an error, or a suspiciously
short body, it is a re-checked endpoint and it belongs in the browser leg. Test one
before you loop over a thousand.
## What this speeds up, and what it does not touch
The split is a cost optimization, not a stealth upgrade. It makes a workload cheaper by
moving the unguarded requests off the browser. It does nothing for the four things that
block sessions independently of the fingerprint, and moving traffic to `httpx` can make
some of them worse if you are not careful:
- **IP reputation.** Route `httpx` through the same clean exit the browser used. If the
bulk requests go out from your datacenter host directly while the browser used a
residential proxy, you have split the session across two addresses, which is its own
signal. Same exit for both legs.
- **Rate limits and per-account quotas.** Two hundred requests in two seconds from one
session is a velocity signal no fingerprint hides. Pace the `httpx` loop. The browser
being invisible does not raise the account's quota.
- **Timezone and locale consistency.** The session was created with a browser identity
tied to the exit; keep the follow-up on the same exit so the story stays coherent, the
same failure mode described in [timezone and proxy mismatch](timezone-proxy-mismatch.md).
- **Behaviour on the guarded leg.** The browser still has to pass the guarded entry
convincingly. The speed trick only applies after that door is open.
`invisible_playwright` gives you the browser that looks real. You supply the clean exit,
the human pacing, and the judgement about which endpoints can leave the browser. The tool
does one job well and is honest about the rest.
## Conclusion
The hybrid pattern is simple once the boundary is clear. The browser establishes the
session because only a browser presents a real fingerprint and TLS handshake. You export
`storage_state`, hand the cookies to `httpx`, and let the cheap client do the
high-volume follow-up - but only against endpoints that trust the cookie and do not
re-inspect the caller. The moment an endpoint re-checks the fingerprint, that request
goes back into the browser, where the fingerprint lives. Test one request before you loop,
keep both legs on the same clean exit, and pace the bulk. That is the whole method.
## Short answers to the questions that lead here
**Can I do all my scraping with httpx and skip the browser?** Only for endpoints that do
not check a fingerprint. The browser exists to clear the ones that do; `httpx` has no
fingerprint to present, so anything that re-checks one will refuse it.
**How do I move a logged-in session from the browser to httpx?** Call
`page.context.storage_state()` while the browser is open, then set its cookies on an
`httpx.Client`. The cookies carry the session; the handshake does not.
**Why does httpx get a 403 where the browser got JSON?** That endpoint re-checks the
caller, not just the cookie. It reads the TLS handshake or wants a browser-minted token.
Keep that request in the browser.
**Do I need the same proxy for both legs?** Yes. Split the session across two exit
addresses and you have created a mismatch signal. Route `httpx` through the same exit the
browser used.
**Does this make me undetectable?** No, and nothing does. It is a speed optimization. It
does not fix IP reputation, account quotas, rate limits, or behaviour - you supply a
clean exit and human pacing for those.
**How do I know which endpoints are safe to bulk?** Send one `httpx` request with the
exported cookies and compare the body to what the browser got. Same body, safe to loop.
Challenge or short body, keep it in the browser.
## Sources
- The real `invisible_playwright` API as documented in
[Quickstart](quickstart.md) and [Configuration](configuration.md): the two-line launch,
the reproducible seed, and the proxy dict both legs must share.
- Playwright's own
[`context.storage_state()`](https://playwright.dev/python/docs/api/class-browsercontext#browser-context-storage-state),
which returns cookies and local storage as a plain dict, working exactly as documented
upstream because the object handed back is a real Playwright `Browser`.
- This project's own practice of testing one request against the boundary before looping,
the same empirical habit the rest of these notes are built on.
**See also:** [why reusing a session beats re-automating the login](automating-login-vs-session-reuse.md)
and [how to capture XHR and API responses](how-to-capture-xhr-api-responses-playwright.md)
for reading the JSON the page already fetches.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The browser is for the
fingerprint-gated fetches, httpx is for the unguarded bulk, and telling them apart is the
whole job.*
+102
View File
@@ -0,0 +1,102 @@
---
title: "Comparisons"
description: "invisible_playwright against the closest alternatives at each layer - Camoufox, Patchright, nodriver, playwright-stealth - plus the engine question underneath all of them: Firefox or Chromium."
has_children: true
nav_order: 4
---
# Comparisons
Most comparisons in this space put tools side by side that are not actually
comparable: a page-level script against a patched binary, a Chromium tool against a
Firefox one. These pages try not to do that. Each one names the layer the comparison
actually happens at, states plainly where the other tool covers more, and does not
claim an advantage it could not verify against the other project's own source or
documentation.
Start with [Three ways to make Playwright undetected](playwright-stealth-levels.md)
if you want the map before the individual matchups - it's the frame every comparison
below sits inside.
## The tools at a glance
Three columns decide most of the question: which browser the tool drives, which layer it
patches, and whether that layer is readable from inside the page. A page-level patch is a
script a detector can find. A driver-level patch is outside the page but still above the
browser. An engine-level patch changed the binary, so there is no lie left to read back.
| Tool | Browser | Patch layer | Language |
|---|---|---|---|
| invisible_playwright | Firefox | engine (C++) | Python |
| [Camoufox](vs-camoufox.md) | Firefox | engine (C++) | Python |
| [Patchright](vs-patchright.md) | Chromium | driver | Python, Node |
| [rebrowser-patches](vs-rebrowser-patches.md) | Chromium | driver (CDP `Runtime.enable`) | Node |
| [undetected-playwright](vs-undetected-playwright.md) | Chromium | driver | Python |
| [nodriver](vs-nodriver.md) | Chrome | driverless CDP | Python |
| [undetected-chromedriver](vs-undetected-chromedriver.md) | Chrome | driver | Python |
| [pydoll](vs-pydoll.md) | Chrome | driverless CDP | Python |
| [zendriver](vs-zendriver.md) | Chrome | driverless CDP | Python |
| [selenium-driverless](vs-selenium-driverless.md) | Chrome | raw CDP | Python |
| [playwright-stealth](vs-playwright-stealth.md) | any | page (injected JS) | Python |
| [playwright-extra stealth](vs-playwright-extra-stealth.md) | Chromium | page (injected JS) | Node |
| [fingerprint-suite](vs-fingerprint-suite.md) | any | page (injection) | Node |
| [curl-cffi](vs-curl-cffi.md) | none, HTTP client | TLS only | Python |
The layer is not a ranking. A driver-level patch on Chromium reaches things a Firefox
build cannot, because it is on the browser most of the web is tuned for, and an HTTP
client with a real TLS fingerprint beats every browser on cost when the page does not
need rendering. Each page below states where the other tool covers more.
## Concepts and the map
- [Three ways to make Playwright undetected](playwright-stealth-levels.md) - The three levels stealth tools work at - page, driver, engine - and what each reaches.
- [Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md) - No CDP surface and one identity, traded against Firefox's smaller traffic share.
- [Chromium is not Chrome, and detectors know the difference](chromium-is-not-chrome.md) - Chrome for Testing plays H.264 but fails a Widevine DRM check no patch closes.
- [WebDriver BiDi vs CDP: does the new protocol hide you](bidi-vs-cdp-detection.md) - BiDi standardizes the control wire, but automation leaks live in the page, not the protocol.
- [Do I need an anti-detect browser or just Playwright?](do-i-need-an-antidetect-browser.md) - What a paid anti-detect GUI adds over stock Playwright driving a patched Firefox.
- [Migrating from Puppeteer to Playwright for stealth](migrate-puppeteer-to-playwright-stealth.md) - The near one-to-one API mapping, and what changes for detection off the CDP stack.
- [Migrating from Selenium to Playwright for stealth](migrate-selenium-to-playwright-stealth.md) - Map driver.get and find_element to page.goto and locators, dropping the WebDriver server.
- [Why Playwright Locators Never Throw StaleElementReferenceException](playwright-vs-selenium-stale-element-reference.md) - Selenium's WebElement holds a live reference that goes stale; Playwright's Locator re-resolves on every action.
- [How to Read a Stealth-Browser Benchmark Without Being Misled](how-to-read-a-stealth-browser-benchmark.md) - What to check before trusting a comparison, including this project's own, since almost every published one ranks itself first.
- [Web Scraping Proxy Costs: Build vs. Buy Your Stealth Stack](web-scraping-proxy-costs-build-vs-buy.md) - Proxy spend, engineering maintenance time and vendor lock-in, without the invented totals most build-vs-buy pages lead with.
## Patched-engine, driver-patch and stealth-plugin tools
- [invisible_playwright vs Camoufox: two patched Firefoxes](vs-camoufox.md) - Both patch Firefox in C++; how each builds its fingerprint and whether a run replays.
- [invisible_playwright vs Patchright: driver vs engine](vs-patchright.md) - Patchright patches the Playwright driver on Chromium; this patches Firefox itself. Often you need both.
- [invisible_playwright vs rebrowser-patches: the same CDP fix](vs-rebrowser-patches.md) - Fixes the Runtime.enable CDP leak on Chromium; reaches neither Firefox nor fonts, GPU, canvas, audio.
- [undetected-playwright vs a patched Firefox binary](vs-undetected-playwright.md) - Hides Playwright's init-script and bindings tells; a patched Firefox closes the fingerprint layer.
- [invisible_playwright vs playwright-stealth: page vs engine](vs-playwright-stealth.md) - playwright-stealth patches the page in about four lines; this rebuilds the engine.
- [playwright-extra stealth plugins vs a patched browser](vs-playwright-extra-stealth.md) - Applies stealth plugins as injected JavaScript a detector reads back; a patched engine compiles them in.
- [invisible_playwright vs fingerprint-suite: injection vs engine](vs-fingerprint-suite.md) - fingerprint-suite injects a generated fingerprint into a page; this sets it in the engine.
- [invisible_playwright vs playwright-with-fingerprints](vs-playwright-with-fingerprints.md) - Injects remote-service fingerprints into a Windows-only, ageing Chromium build, and what that trade costs.
- [puppeteer-real-browser vs invisible_playwright](vs-puppeteer-real-browser.md) - Node plus real Chrome with runtime property patches vs Python plus Firefox with compiled spoofs.
## CDP and driverless Chrome tools
- [invisible_playwright vs nodriver and undetected-chromedriver](vs-nodriver.md) - Chrome-only tools, not Playwright forks; neither hides IP or fingerprint, by their own docs.
- [pydoll vs invisible_playwright: CDP without a driver](vs-pydoll.md) - pydoll drives Chrome over CDP with no chromedriver; this ships seed-consistent Firefox surfaces.
- [zendriver vs invisible_playwright: Chrome CDP vs Firefox](vs-zendriver.md) - zendriver drives Chrome over CDP; this drives a patched Firefox with cross-checked surfaces.
- [selenium-driverless vs invisible_playwright stealth](vs-selenium-driverless.md) - Drops chromedriver by driving Chrome over raw CDP but leaves rendering and TLS stock.
- [invisible_playwright vs SeleniumBase UC Mode](vs-seleniumbase-uc-mode.md) - UC Mode detaches chromedriver but never changes the engine, GPU, fonts, canvas or TLS.
- [undetected-chromedriver vs a patched Firefox browser](vs-undetected-chromedriver.md) - Strips the driver's cdc_ and webdriver leaks but ships a stock Chromium fingerprint.
- [invisible_playwright vs Ulixee Hero](vs-ulixee-hero.md) - Replayed emulation on stock Chromium vs a fingerprint decided natively in patched Firefox.
## Non-Playwright frameworks and HTTP-client libraries
- [botasaurus vs invisible_playwright: framework vs library](vs-botasaurus.md) - Batteries-included Chrome scraping framework vs a patched-Firefox engine driven with stock Playwright.
- [invisible_playwright vs Scrapling](vs-scrapling.md) - Scrapling is an adaptive parser, not a stealth engine; its ceiling is whichever browser it wraps.
- [scrapy-playwright vs a patched Firefox for stealth](vs-scrapy-playwright.md) - Runs stock Playwright inside Scrapy; point the handler at a patched Firefox and keep the scheduler.
- [invisible_playwright vs DrissionPage](vs-drission-page.md) - Fuses an HTTP session mode and a CDP browser mode, each failing a different check half.
- [curl_cffi vs invisible_playwright: TLS client vs browser](vs-curl-cffi.md) - Replays a browser's TLS and HTTP/2 at byte level but runs no JavaScript.
- [invisible_playwright vs hrequests](vs-hrequests.md) - A hybrid TLS-impersonating HTTP client plus a browser mode with injected fingerprints.
- [tls-client vs a real browser: when TLS is enough](vs-tls-client.md) - When JA3/HTTP2 socket spoofing suffices on JSON and HTML, and where JS forces a full browser.
- [invisible_playwright vs browser-use: different jobs](vs-browser-use.md) - An LLM-driven agent framework against an engine you drive yourself, and where each one fits.
## Unmaintained tools
- [puppeteer-extra-plugin-stealth: unmaintained since 2024](puppeteer-extra-stealth-unmaintained.md) - No real update since mid-2024; old patches still work but the checklist froze.
- [pyppeteer's own maintainer says to switch to Playwright](pyppeteer-unmaintained-playwright.md) - Its README calls it unmaintained and points to playwright-python; what switching does not fix.
- [selenium-stealth hasn't been updated since December 2021](selenium-stealth-unmaintained.md) - Last commit December 2021; what its property patches still do and what to check today.
- [Splash is unmaintained, and it was never a real browser](splash-unmaintained-qtwebkit.md) - A QtWebKit render service reporting an engine no real browser ships, which no spoof reaches.
@@ -0,0 +1,28 @@
---
title: "Computer-use agents and browser fingerprint detection"
description: "Clicking by pixel makes driver flags moot; the engine fingerprint and action rhythm stay checkable. This page moved to the AIHawk wiki."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 6
---
# Computer-use agents and browser fingerprint detection
This page moved to the AIHawk wiki, retargeted at the question people
actually search:
**[Claude computer use detected as a bot](https://github.com/feder-cr/AIHawk/wiki/claude-computer-use-detected-as-bot)**
The core of it, kept here in brief: a coordinate-clicking agent never
generates the DOM-automation tells, so `navigator.webdriver` advice mostly
does not apply to it. What remains checkable is the engine fingerprint of the
machine the click lands in, the address it arrives from, and the
screenshot-think-click rhythm.
The mechanism layer stays on this wiki:
[navigator.webdriver, explained](navigator-webdriver-explained.md),
[what a website can detect about a virtual machine](can-a-website-detect-a-virtual-machine.md),
and [the AI-agents integration pages](guides-ai-agents.md) for wiring a real
engine under a computer-use loop:
[back a computer-use agent with a real browser](back-computer-use-agent-real-browser.md).
+139
View File
@@ -0,0 +1,139 @@
---
title: "Configuration"
description: "Proxy schemes, DNS handling, and timezone auto-derived from egress IP. Every environment variable the wrapper reads, what each does, and when you need it."
parent: "Documentation"
nav_order: 3
---
# Configuration
Configuration covers three independent surfaces: proxy schemes and credentials, how
the browser's timezone is derived from the egress IP, and the environment variables
that change caching, binary selection and download behavior. None of it is required
for a first run - `InvisiblePlaywright()` works with defaults - but each setting below
exists because a specific situation needs it.
## Proxies
```python
proxy = {
"server": "socks5://gate.example.com:1080",
"username": "user",
"password": "pass",
}
with InvisiblePlaywright(proxy=proxy) as browser:
...
```
Schemes supported: `socks5`, `socks4`, `http`, `https`. DNS is routed through the
proxy by default, no local leak - the SOCKS5-authentication and DNS-resolution
details, including the parts most guides get wrong, are in
[Playwright SOCKS5 proxy with authentication](playwright-socks5-proxy-authentication.md).
The endpoint needs an explicit port. `socks5://gate.example.com` with no `:1080` is
refused with a `ValueError` rather than launched unproxied, which is what it used to
do silently. If you are driving `firefox.launch()` yourself instead of using this
class, pass the same dict to `get_default_stealth_prefs(proxy=...)` so the SOCKS
preferences are written.
Around 90% of proxies are public, so their IPs are already known and blocked before
you ever use them. A perfect browser on a known IP still loses. For the clean 10%,
residential IPs that aren't already known, we recommend
[sx.org](https://sx.org/?c=invisible_playwright), who filter for and serve only IPs
that aren't already on those lists.
## Timezone
The browser timezone follows `timezone=`:
```python
# default: timezone is auto-derived from the egress IP (proxy egress if a
# proxy is set, otherwise the host's own public IP)
with InvisiblePlaywright(proxy=proxy) as browser:
...
# explicit IANA zone always wins, the only way to force a specific zone
with InvisiblePlaywright(proxy=proxy, timezone="America/New_York") as browser:
...
```
Timezone is not one value - it is several surfaces that a detector cross-checks
against each other and against your exit IP, which is why
[setting `timezone_id` and still getting flagged for a mismatch](timezone-proxy-mismatch.md)
is common enough to have its own page.
## Environment variables
The engine downloads itself on first use, verifies a sha256 shipped inside
`invisible-core`, and caches it - the size is on the [installation](installation.md)
page and it happens once per engine version. None of these are a required step; each
row is for a specific situation.
| Variable | When you need it |
|---|---|
| `INVISIBLE_PLAYWRIGHT_CACHE_DIR` | Put the cached engine somewhere else - another drive, a shared location, a path your CI already caches |
| `INVPW_BINARY_PATH` | Point at a binary you already have, and skip the download |
| `STEALTHFOX_GITHUB_TOKEN` | A rate-limited or corporate network that refuses anonymous GitHub downloads |
| `INVISIBLE_PLAYWRIGHT_SKEW=allow` | Run a Playwright version outside the tested range anyway |
| `INVPW_CURSOR_ENGINE` | `python` (default), `binary`, or `off` |
| `INVISIBLE_DOWNLOAD_DEADLINE` | Seconds allowed for one engine download, default `1800`. Raise it on a very slow link; `0` removes the bound |
```bash
export INVISIBLE_PLAYWRIGHT_CACHE_DIR=/mnt/big/engines
```
### Why the download has a deadline at all
`requests` timeouts are per socket operation, not per transfer. A connection
that delivers one byte every 59 seconds satisfies a 60-second timeout forever,
so before `invisible-core` 18.13.0 the engine download had no upper limit: it
could sit there as long as whatever was above it allowed. A CI job did exactly
that for 39 minutes and was killed by its own limit; on a laptop the same thing
is a launch that never returns and writes nothing to a log.
The bound is checked between chunks and the refusal names the deadline, how long
it had been running and how many bytes arrived, so a genuinely slow link is
distinguishable from a stalled one. The engine archives are 217 to 238 MB
depending on platform, so the default finishes anything above roughly 140 KB/s.
If your connection is honestly slower than that, raise the number rather than
removing the bound - `0` is there for the case where you are downloading over
something too unusual to put a number on, and it restores the old behaviour of
waiting indefinitely.
## Short answers to the questions that lead here
**What proxy schemes does invisible_playwright support?** `socks5`, `socks4`, `http`
and `https`. DNS resolves through the proxy by default, and an endpoint given
without an explicit port raises a `ValueError` instead of launching unproxied.
**How is the browser's timezone chosen?** By default it is derived from the egress
IP - the proxy's exit if one is set, otherwise the host's own public IP. Pass an
explicit IANA zone such as `timezone="America/New_York"` to override it; an explicit
zone always wins.
**Do I need to set any environment variables to use invisible_playwright?** No. Every
one in the table above addresses a specific situation - moving the cache directory,
pointing at a binary you already have, a network that blocks anonymous downloads -
and the defaults work without touching any of them.
**Why does the engine download have a deadline, and can I remove it?** Because a
per-socket timeout does not bound a slow transfer: a connection delivering one byte
every 59 seconds satisfies a 60-second timeout forever. The default of 1800 seconds
covers any link above roughly 140 KB/s; set `INVISIBLE_DOWNLOAD_DEADLINE=0` to remove
the bound entirely if your connection is genuinely slower than that.
**What happens if I pass a proxy server with no port?** The constructor raises a
`ValueError` rather than launching the browser unproxied. That is a deliberate change
from older behavior, which used to launch silently without the proxy.
**See also:** [Installation](installation.md) for the one-time engine download these
environment variables configure, [Pinning fingerprint fields](pinning.md) for forcing
specific values like GPU or screen size, and
[Playwright SOCKS5 proxy with authentication](playwright-socks5-proxy-authentication.md)
for the full detail behind the proxy schemes above.
## Next
[Pinning fingerprint fields](pinning.md) covers forcing specific values - a GPU
model, a screen size, a hardware concurrency count - while leaving everything else
seed-derived, and what breaks if you pin one field without its correlated neighbours.
@@ -0,0 +1,196 @@
---
title: "Content-Security-Policy Blocks Playwright's Injected Scripts"
description: "A page's CSP header can refuse addInitScript and evaluate the same way it refuses any other unauthorized script. bypassCSP fixes it and changes what the page actually enforces while you test it."
parent: "Testing and Troubleshooting"
grand_parent: "Guides"
nav_order: 23
---
# Content-Security-Policy Blocks Playwright's Injected Scripts
A page that ships a
[`Content-Security-Policy`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy)
header restricting `script-src` does not treat Playwright's injected code as special. A
`page.add_init_script()` payload, or code passed to `page.evaluate()` in certain
injection paths, is just another script the page did not explicitly authorize, and a
strict `script-src` blocks unauthorized inline and dynamically-injected script
execution the same way it blocks a stray `<script>` tag or a compromised third-party
widget. The failure is silent in the way CSP failures usually are: no exception in your
Python code, a console warning in the browser you likely never read, and code that
simply never ran.
## What CSP actually restricts
By default, a policy that sets `default-src` or `script-src` blocks inline `<script>`
tags, inline event-handler attributes, `javascript:` URLs, and dynamic evaluation via
`eval()`, `Function()`, or a string passed to `setTimeout()`. A page can loosen this with
a `'nonce-<value>'` that has to match between the header and the script tag, or with
`'unsafe-inline'`, which defeats the point of having the policy at all and is
correspondingly rare on a page that bothered to set one.
None of these exceptions are things Playwright can produce on your behalf. Your injected
code did not ship with the page's nonce, because the nonce is generated server-side per
request specifically so a script that was not part of that response cannot forge it.
## Playwright's option, and what it actually does
`browser.new_context(bypass_csp=True)` (or the equivalent `bypassCSP` in JavaScript)
tells the browser context to skip CSP enforcement outright:
```python
context = browser.new_context(bypass_csp=True)
page = context.new_page()
page.goto("https://example.com")
# an init script that a strict CSP would otherwise have refused now runs
```
The option's own documented default is `False`, and what it does is exactly what the
name says: it toggles bypassing the page's Content-Security-Policy, entirely, for every
resource load in that context, not just for Playwright's own injections. It does not
repair a misconfigured policy, does not add your script's origin to an allowlist, and
does not tell you whether the same page would work for a real visitor whose browser
still enforces the header normally.
## The honest tradeoff
There are two different reasons you might reach for this flag, and only one of them
survives contact with what the flag actually does.
**Legitimate testing need: your own code, your own CSP.** If you are testing a page you
control and the point of the test is the page's functionality instead of its CSP
configuration, bypassing CSP to let your own instrumentation or a third-party testing
widget run is a reasonable, disclosed tradeoff. You know the header is there, you know
you are turning it off for the test, and the production page a real visitor loads still
enforces it normally. This is CSP getting in the way of your own test tooling, not CSP
doing its job against something adversarial.
**A deviation a real browser would never make.** If the target is not yours and the
question is "does my automated session look like a real visitor," bypassing CSP changes
what the page is allowed to do in ways a genuine visitor's browser never would. A real
person's browser enforces the header exactly as written; a session that quietly disables
it is not rendering the page the way the page's own operator configured it to render, and
that is a difference from a genuine session, not a neutral convenience. Whether a
specific target's own logic could ever observe that difference from inside the page is a
separate question this page cannot answer for you, but the premise underneath
"bypassing CSP is invisible" does not hold: it is a real change to how the page executes,
not a transparent workaround.
The practical rule: use `bypassCSP` when you are testing your own integration against
your own header and you know exactly why it is there. Treat it as a real behavioral
deviation, not a free pass, on anything else.
## Diagnosing it before reaching for the flag
**Confirm CSP is actually the cause.** Open the browser console (or read
`page.on("console")` events in your script) and look for a message naming
`Content-Security-Policy` and the specific directive it refused. This distinguishes CSP
from a plain script error, which is a different bug with a different fix.
```python
page.on("console", lambda msg: print(msg.type, msg.text))
page.goto("https://example.com")
```
**Read the actual header**, not just the console message, to see which directives are
restrictive:
```python
response = page.goto("https://example.com")
print(response.headers.get("content-security-policy"))
```
**Check whether the restriction is `script-src` specifically**, versus something CSP also
covers but unrelated to your failure, like `connect-src` blocking an XHR your page tries
to make, or `frame-ancestors` unrelated to injected code entirely. Bypassing CSP for a
`script-src` problem also bypasses every other directive on the same header, which is
broader than most cases need.
**Known limitation:** documented reports exist of `bypassCSP` not resolving every CSP or
CORS error depending on the specific directive and browser version, so confirm the
console warning is actually gone after setting the option instead of assuming the flag
is unconditionally comprehensive.
## Diagnostic checklist
1. Check the browser console for a `Content-Security-Policy` message naming the refused
directive before assuming your injection code is broken.
2. Read the response's `content-security-policy` header directly to see the actual
policy instead of guessing from the symptom.
3. Confirm the refusal is `script-src` (or `default-src` covering it), not an unrelated
directive that happens to also block something in your flow.
4. Decide whether this is your own page under test or a third-party target, and apply
the tradeoff above instead of reaching for `bypass_csp` reflexively.
5. After setting `bypass_csp=True`, re-check the console to confirm the specific warning
is gone; a version-specific gap means it is not always comprehensive.
## What invisible_playwright does and does not touch here
CSP enforcement is the browser's networking and script-execution security layer,
untouched by this project's fingerprint patching. `bypass_csp` is a standard Playwright
context option that behaves identically on a patched Firefox and a stock one; the engine
work here does not add, remove, or interact with CSP handling. The tradeoff above -
disclosed test convenience against a real behavioral deviation on someone else's page -
applies the same way regardless of which browser build enforces or bypasses the header.
## Conclusion
A CSP-restricted page refuses Playwright's injected scripts for the same reason it
refuses any other unauthorized code: that is precisely what the header is configured to
do. `bypass_csp=True` removes the restriction entirely rather than repairing it, which is
a fair trade when you are testing your own integration against your own policy and a real
deviation from how a genuine visitor's browser behaves everywhere else. Confirm CSP is
actually the cause before reaching for the flag, and know which of the two situations you
are actually in before you flip it.
## Short answers to the questions that lead here
**Why does my `addInitScript` silently not run?** A page's Content-Security-Policy header
can block unauthorized script execution, including injected init scripts, the same way it
blocks any other script it did not explicitly allow. Check the browser console for a CSP
message before assuming the injection failed for another reason.
**Does `bypassCSP` fix a broken CSP header?** No. It disables enforcement of the header
entirely for that context; it does not repair the policy, approve your script's origin,
or change what a real visitor's browser would do with the same page.
**Is bypassing CSP always safe to use for testing?** It is a reasonable, disclosed
tradeoff on your own page under your own policy. On a third-party target, it is a real
deviation from how a genuine browser renders the page, not a neutral workaround.
**Why doesn't a nonce fix my injected script?** Nonces are generated per-request and
embedded in the page's own script tags server-side; code Playwright injects afterward was
never part of that response and cannot carry a nonce it never received.
**Does bypassing CSP also disable CORS?** No. `bypassCSP` addresses Content-Security-Policy
enforcement specifically and does not disable cross-origin resource sharing checks, which
are a separate mechanism.
**Will bypassCSP always resolve the console warning?** Documented reports show it does not
always resolve every CSP or CORS error depending on the specific directive and browser
version, so confirm the warning is actually gone rather than assuming it is comprehensive.
## Sources
- Playwright's own API reference, [`browser.new_context()`](https://playwright.dev/python/docs/api/class-browser#browser-new-context-option-bypass-csp),
for the exact `bypass_csp` option description and its `false` default.
- Mozilla Developer Network, [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy),
for what `script-src` restricts by default and how nonces and `'strict-dynamic'` work.
- Microsoft Playwright issue [#20078](https://github.com/microsoft/playwright/issues/20078),
a report of CSP and `--disable-web-security` not behaving as expected in a specific
configuration, evidence for the "known limitation" section above.
- Microsoft Playwright issue [#27696](https://github.com/microsoft/playwright/issues/27696),
a feature request to set `bypassCSP` on an already-created context rather than only at
context-creation time.
**See also:** [Playwright TargetClosedError: the causes and the fixes](playwright-targetclosederror-causes.md),
for another case where the page's own defenses are the actual variable rather than
anything wrong with the browser, and [How to test bot detection without a false pass](how-to-test-bot-detection.md),
for the broader discipline of treating a bypassed restriction as a documented deviation
rather than a free pass.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. CSP enforcement is the
browser's own security layer, unaffected by fingerprint patching in either direction.*
+193
View File
@@ -0,0 +1,193 @@
---
title: "crawl4ai stealth mode and custom browser engines"
description: "crawl4ai accepts browser_type firefox but has no executable_path, so you get Playwright's managed build. Where the adapter seam is and what stealth misses."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 3
---
# crawl4ai stealth mode and custom browser engines
crawl4ai cannot launch a custom (patched) browser binary today, because its
`BrowserConfig` has no `executable_path` field, so `browser_type="firefox"` always gets
Playwright's own managed Firefox build. crawl4ai ships two anti-detection features and a
browser abstraction, which makes it look like a patched engine should drop straight in.
It does not, and the reason is that single missing field rather than an architectural one.
This page is what its configuration actually exposes, what its stealth mode reaches,
where the adapter seam is, the workaround that works today, and the part that no
configuration changes.
## What BrowserConfig exposes, and the field that is missing
`BrowserConfig` exposes the browser choice, headless mode, a user data directory, a proxy
and extra arguments, but not the path to a binary. Read from
`crawl4ai/async_configs.py`:
| Field | Default |
|---|---|
| `browser_type` | `"chromium"` |
| `chrome_channel` / `channel` | `"chromium"` |
| `headless` | `True` |
| `user_data_dir` | `None` |
| `proxy_config` | `None` |
| `extra_args` | `None` |
`browser_type` genuinely accepts `"firefox"`, and Firefox is referenced throughout the
project, so this is not a Chromium-only tool at the configuration level.
What is **not** there is `executable_path`. There is no field that says which binary to
launch, so `browser_type="firefox"` gets you Playwright's own managed Firefox build and
nothing else. A patched engine has no supported way in.
`extra_args` does not close the gap either: it passes command-line arguments to a browser
that has already been chosen, not the choice of browser.
## What crawl4ai's stealth mode actually reaches
crawl4ai's stealth mode reaches only page-level JavaScript, and on Firefox it is largely
inert because its evasion modules target Chromium APIs. There are two separate features
here, and it is worth knowing which is which.
**Stealth mode** applies `playwright-stealth`, which is the page-level approach: scripts
injected into the document that redefine properties before the page's own code runs.
crawl4ai's own documentation is straight about the limitation, and it is the same one
that library states itself: **the evasion modules target Chromium APIs and do not support
Firefox or WebKit.**
So on `browser_type="firefox"` the stealth layer is largely inert, which is a genuinely
important thing to know before choosing that combination.
**The undetected browser adapter** is the heavier option, aimed at sites that look at
more than `navigator.webdriver`.
Both operate above the browser.
[The three levels page](playwright-stealth-levels.md) explains what that layer can and
cannot reach; the short version is that everything the machine reports about itself is
untouched by either.
## Where the seam actually is
The extension point exists and it is not `BrowserConfig`. It is on the crawler strategy:
```python
undetected_adapter = UndetectedAdapter()
crawler_strategy = AsyncPlaywrightCrawlerStrategy(
browser_config=browser_config,
browser_adapter=undetected_adapter,
)
```
`browser_adapter` takes an adapter object, and the project ships `PlaywrightAdapter` and
`UndetectedAdapter`. The documentation describes the pattern as allowing switching
between browser implementations, and then gives no guidance on writing your own.
That is where a different engine would belong: an adapter that owns the launch and hands
back a browser, which is exactly the shape
[scrapy-playwright's browser provider takes](integrations/scrapy-playwright.md) and the
reason that integration is clean. Here the seam is present but undocumented, so anything
built on it is building against a private interface.
**The one-field change that would fix it properly** is `executable_path` on
`BrowserConfig`, passed through to `launch()`. That is a small, well-scoped upstream
change, and until it exists there is no supported route.
## The workaround that works today, with its cost
Playwright resolves its managed browsers from a directory, and that directory is
configurable through [`PLAYWRIGHT_BROWSERS_PATH`](https://playwright.dev/docs/browsers#managing-browser-binaries).
Put a build where Playwright expects to find one, and `p.firefox.launch()` uses it, with
no crawl4ai change at all.
Be clear-eyed about what that is:
- It depends on Playwright's internal directory layout, which is version-stamped and not
a public contract.
- It applies process-wide, so everything else in that process gets the substituted
browser too.
- It will break on a Playwright upgrade, silently, by falling back to the managed build.
It works, and it is a workaround rather than an integration. If you use it, pin your
Playwright version and check the engine at runtime rather than assuming.
```python
# after launch, confirm you got the engine you meant to get
ua = await page.evaluate("() => navigator.userAgent")
```
## What no configuration changes
Everything the machine reports, which on a server is a consistent set of answers all
saying the same thing:
- **No GPU**, so WebGL reports a software renderer.
[What those strings mean](webgl-renderer-strings.md).
- **A container font set** under whatever platform you claim.
[Why more fonts is not the fix](headless-fonts-differ.md).
- **No audio device**, and no speech voices.
[The audio values](audiocontext-fingerprinting.md) and
[the voice list](speech-synthesis-voices.md).
- **A screen with no taskbar.**
[The relationships that have to hold](screen-size-headless-tells.md).
- **The TLS handshake**, decided before any page-level layer exists.
[Which nothing in JavaScript can reach](ja3-ja4-tls-fingerprint.md).
If crawl4ai works on your laptop and fails in a container, this list is where to look
first, and no stealth setting in the library addresses any of it.
[The container walkthrough](playwright-docker-detection.md) goes through it in order.
## Conclusion
crawl4ai is closer to supporting a patched engine than most tools its size: it already
abstracts the browser behind an adapter and already accepts Firefox as a browser type.
What it lacks is the one field that says which binary to run.
Until that exists, the honest options are a private adapter, a process-wide directory
substitution with the caveats above, or accepting the managed build and spending the
effort on the machine instead, which is where most container-based failures actually
originate.
## Short answers to the questions that lead here
**Does crawl4ai support a custom browser binary?** Not through `BrowserConfig`. There is
no `executable_path` field.
**Can crawl4ai use Firefox?** Yes, `browser_type="firefox"`, with Playwright's own
managed build.
**Does crawl4ai's stealth mode work with Firefox?** Largely not. It applies
`playwright-stealth`, whose evasion modules target Chromium APIs.
**What is the undetected browser adapter?** A heavier built-in adapter aimed at stronger
detection, passed as `browser_adapter` to the crawler strategy. It still operates above
the browser.
**Why does crawl4ai work locally and fail in Docker?** Because the container answers
differently about the machine, and none of the library's settings change that.
**Is there any way to use a patched engine today?** A process-wide
`PLAYWRIGHT_BROWSERS_PATH` substitution, with the fragility described above, or a custom
adapter written against an undocumented interface.
**See also:** [three ways to make Playwright undetected](playwright-stealth-levels.md),
for what the page level can reach,
[scrapy-playwright](integrations/scrapy-playwright.md), for what a documented provider
seam looks like, and
[Playwright in Docker](playwright-docker-detection.md).
## Sources
- `crawl4ai/async_configs.py`, for the `BrowserConfig` fields listed above, read
2026-07-27.
- crawl4ai's own documentation for stealth mode and the undetected browser adapter,
including its statement that the underlying evasion modules do not support Firefox.
- Playwright's own [browser-management
documentation](https://playwright.dev/docs/browsers#managing-browser-binaries), for
the `PLAYWRIGHT_BROWSERS_PATH` behaviour the workaround depends on.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. We would rather document the missing field than
publish an integration guide for a seam that is not there.*
+173
View File
@@ -0,0 +1,173 @@
---
title: "How CreepJS decides you are lying"
description: "CreepJS asks whether a browser is telling the truth, not just what it reports. Read from its own source: how it detects a lie and why spoofing scores worse."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 2
---
# How CreepJS decides you are lying
Most fingerprinting tests ask what your browser reports. CreepJS mostly asks whether
your browser is *telling the truth*, which is a different question and a much harder
one to pass by spoofing.
Read from the source on 2026-07-27 ([`abrahamjuliot/creepjs`](https://github.com/abrahamjuliot/creepjs),
`src/lies/index.ts` and the module layout) and not from the rendered page, because
the interesting part is the method instead of the numbers it prints.
## The shape of it
The project is organised into modules that map onto surfaces: `canvas`, `webgl`,
`audio`, `fonts`, `screen`, `timezone`, `intl`, `media`, `speech`, `webrtc`,
`navigator`, `window`, `worker`, `css`, `cssmedia`, `svg`, `domrect`, `math`,
`engine`, `features`.
Then there are five that are not surfaces at all, and they are the point:
- **`lies`**, which detects tampering.
- **`trash`**, which collects values that are junk or impossible.
- **`errors`**, which records what threw when it should not have.
- **`resistance`**, which identifies privacy tooling, including Firefox's own
`resistFingerprinting` mode.
- **`headless`**, which turns the other modules' signals into the headless and
stealth percentages quoted later on this page.
A high score is not "your fingerprint is rare". It is "nothing here contradicts
anything else here, and nothing looks tampered with".
## How it finds tampering
Four techniques, all visible in `src/lies/index.ts` and [described in general
terms elsewhere](tostring-native-code-detection.md).
**A pristine reference.** It creates fresh iframes and reaches into
[`contentWindow`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow)
to get a copy of the built-ins that your page-level patches never
touched, because the patch ran in the parent document. Then it compares. This is the
single most effective move against injected stealth scripts, and it is about fifteen
lines of code.
**Stack-trace inspection.** It matches against `/at Function\.toString /` and
`/at Object\.toString/`. When you replace a native function and then patch
[`Function.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString)
to hide it, the way your replacement is called leaves a
different frame in the stack than a genuine native call would. The disguise is
detected by how the disguise itself behaves.
**Descriptor and prototype walking.** For each API it takes
[`Object.getOwnPropertyDescriptor(proto, name)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor),
checks whether `descriptor.value` is
unexpectedly `undefined`, pulls the getter out, and compares
[`Object.getPrototypeOf(apiFunction)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf)
against the native prototype. An override moved
from the prototype to the instance, or a getter that is a plain function rather than
a native one, shows up here without any cleverness.
**Blocking the probe is itself recorded.** Among the lie names in the source are
`client blocked phantom iframe` and `client blocked behemoth iframe`. If your
environment prevents CreepJS from creating its reference iframes, that prevention is
written down as a lie.
That last one is the principle worth taking away, and it generalises far beyond this
tool: **suppressing a signal is a signal**. A browser that refuses to answer is not
quieter than one that answers plainly, it is louder, because refusing is rare and
answering is universal.
## Why uniform spoofing scores badly
Consider the two ways people try to pass this.
**Override everything from JavaScript.** Every override is a candidate for all four
techniques above. The more surfaces you patch, the more lie records you generate, and
a page with many detected lies scores worse than one with an unusual but honest
fingerprint. Effort spent hiding actively hurts.
**Turn on maximum privacy protection.** The `resistance` module exists precisely to
identify this. Firefox's `resistFingerprinting` produces a recognisable pattern, and
being identified as a privacy-tool user is its own classification.
[There is a longer page on why that is the wrong tool for automation](resist-fingerprinting.md).
There is a third option that scores well and is much more work: do not lie in
JavaScript at all. If a value is decided below the JavaScript layer, in the engine,
then there is no override to find, no prototype moved, no `toString` to hide, and no
difference between what the page sees and what a fresh iframe sees. The lie detector
finds nothing because nothing lied.
That is not a claim about any particular tool being undetectable. It is a claim about
where the detection pressure lands: on the seam between the patch and the runtime.
Remove the seam and this whole category of check has nothing to bite on. Everything
else, the plausibility of your GPU, your fonts, your timezone against your IP,
remains exactly as hard as it was.
## What one real, unmodified session actually scored
Run directly against a live Playwright-driven Chromium session with no stealth
layer of any kind applied - no injected patches, no engine-level work, nothing
this project or any comparable tool does. CreepJS's own headless module returned
0% headless and 0% stealth, with a 25% "like headless" partial-similarity score
alongside them.
Worth stating plainly what that does and does not mean: it says
this one specific, directly-checked session did not trip CreepJS's headless
heuristics that day, not that headless or automation detection in general is
solved, and not that every Playwright launch configuration scores the same way.
The rest of the report - the parts covered throughout this page, the lie
detection, the consistency checks, the machine-level surfaces - is where the
actual work happens regardless of what this one narrow module reports.
## Reading your own report
Two things worth doing when you open it:
1. **Read the lies section before the score.** A number tells you where you landed.
The lie list tells you what to fix, and it names the API.
2. **Compare the same session twice, and two sessions with the same configuration.**
Consistency across a reload and across a fresh launch is what a real browser has.
If your fingerprint moves between reloads, something is adding noise per call
rather than per identity, and that is its own signature.
## Short answers to the questions that lead here
**What does the CreepJS score actually mean?** Not "your fingerprint is rare". It means
nothing here contradicts anything else here, and nothing looks tampered with.
**Why does it detect my stealth plugin?** Four ways, and each is cheap: a pristine copy
of the built-ins from a fresh iframe, stack-trace inspection, descriptor and prototype
walking, and recording a blocked probe as a lie.
**Should I block CreepJS from creating its iframes?** No. Blocking is written down as a
lie, by name, in its source. Suppressing a signal is a signal.
**Why does more patching score worse?** Because every override is another candidate for
those four techniques. A page with many detected lies scores worse than one with an
unusual but honest fingerprint.
**What passes it?** Not lying in JavaScript at all. If the value is decided below the
JavaScript layer there is no override to find and no seam to detect.
## Sources
- CreepJS's own GitHub repository, [`abrahamjuliot/creepjs`](https://github.com/abrahamjuliot/creepjs),
`src/lies/index.ts` and the module layout, read 2026-07-27, for the four
tampering-detection techniques and the lie names quoted throughout.
- MDN Web Docs, [`HTMLIFrameElement.contentWindow`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow),
[`Function.prototype.toString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString),
[`Object.getOwnPropertyDescriptor()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor),
and [`Object.getPrototypeOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf),
retrieved 2026-08-28, for the four native APIs CreepJS's tampering checks are built on.
- Mozilla's own [Fingerprinting wiki page](https://wiki.mozilla.org/Security/Fingerprinting),
retrieved 2026-08-28, for Firefox's `resistFingerprinting` mode, which CreepJS's own
`resistance` module identifies.
- This project's own testing: a live, unmodified Playwright-driven Chromium session run
directly against CreepJS's headless module, for the 0% headless / 0% stealth scores
quoted above.
**See also:** [what sannysoft checks](sannysoft-explained.md), whose canvas-in-iframe test is the same idea in miniature, [the three levels](playwright-stealth-levels.md), and [AudioContext fingerprinting](audiocontext-fingerprinting.md), where its silent-buffer check is worked through in detail.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright).
CreepJS is a release gate here. The lie names above are quoted from its source and
not paraphrased, because the exact strings are what you will see in a report.*
+144
View File
@@ -0,0 +1,144 @@
---
title: "Why content_frame() returns None for a cross-origin iframe"
description: "content_frame() returns None on a cross-origin iframe, frame.evaluate() throws, frame_locator times out - one shared cause: process isolation, not a permissions bug."
parent: "The Automation Layer"
grand_parent: "Guides"
nav_order: 9
---
# Why content_frame() returns None for a cross-origin iframe
`content_frame()` returns `None` for a cross-origin iframe when Firefox's
site-isolation feature puts that iframe in a separate OS process: the automation
driver's frame tree holds only an empty placeholder for it, so there is no real frame
reference to hand back. It is not a permissions bug, and the same single cause is why
`frame.evaluate()` throws and `frame_locator` times out on the same iframe.
That cluster of symptoms all lands on the same page, all against the same cross-origin
iframe: [`element_handle.content_frame()`](https://playwright.dev/python/docs/api/class-elementhandle)
returns `None`, [`frame.evaluate()`](https://playwright.dev/python/docs/api/class-frame)
throws a permission error naming a cross-origin object, and
[`frame_locator(...).click()`](https://playwright.dev/python/docs/api/class-framelocator)
times out with `force=True` changing nothing. Disabling JavaScript works around it and
defeats the point of automating the page at all.
These read like three unrelated bugs. They are one bug, and it isn't a permissions
problem. If the iframe you are after is same-origin instead, none of this applies and
[scraping it is a short job with `frame_locator`](how-to-scrape-iframe-content-playwright.md).
## What's actually different about that iframe
The common thread is that the iframe is cross-origin from the page embedding it -
the shape a third-party widget almost always has: a consent banner, a payment form, a
support chat, anything served from a different domain than the page around it.
Firefox's site-isolation feature can put a cross-origin iframe in an entirely
separate OS process from the page that embeds it, as a security boundary between
origins. That boundary is exactly right for security and exactly wrong for an
automation driver that assumed it could reach into every frame from one process.
## Why the driver's own frame tracking breaks
The frame tracking breaks because it is built from a single process while the iframe
lives in another. Playwright drives Firefox through
[Juggler, an internal automation protocol](playwright-protocol-drift.md), which keeps
a tree of every frame on the page so `page.frames`, `content_frame()` and friends can
find them. That tree is built and maintained from the parent process.
When the iframe's browsing context lives in a different, isolated process, the
parent-side frame tree registers a placeholder for it instead of the real thing: no
URL, no docShell reference, no execution context that actually wraps the iframe's
global object. Every one of the three failing operations needs exactly the piece
that placeholder doesn't have, which is why fixing one never fixed the others - they
were never three separate problems to fix.
## Why this is easy to misdiagnose the first time
The first fix attempt targeted the wrong layer entirely, and it's worth walking
through why, because the failure mode generalises.
The instinct was to wrap the suspect property read in a try/catch, on the theory that
a security exception was firing and needed handling. It wasn't. The property in
question simply isn't exposed to page-level script at all, so reading it from that
scope returns `undefined` rather than throwing - there was never an exception to
catch, and the code silently did nothing.
A second attempt tried comparing two identifiers to detect the isolated case
directly. Both sides of that comparison turned out to be unreachable from the
context the check ran in, so the comparison was comparing two things that were
always going to be equal (or always going to be absent) regardless of whether the
real bug was present.
Neither fix was tested against a reproduction that failed on the broken binary and
passed on a fixed one - both were committed on the strength of a plausible-sounding
theory. [The general version of that mistake, and the discipline that catches it,](how-to-test-bot-detection.md)
is worth reading before trusting your own first hypothesis on a bug like this one.
## The actual fix, and why it's a single preference
The fix is a single preference forcing the non-isolating strategy, so every
cross-origin iframe loads into the same process as the page around it instead of a
separate one. That is a real trade: the security boundary the isolating strategy adds
is gone, in exchange for an automation driver whose frame tree actually reaches every
frame on the page. For a stealth-automation engine that already assumes a fully
trusted, single-purpose session, that trade is the right one; it would not be for a
general-purpose browser handling untrusted content by default.
Once the site-isolation strategy was identified as the actual variable, confirming it
took one controlled comparison: the same URL, loaded once with the isolating strategy
active and once with it set to keep same-process handling for every origin. Four
frame-tree entries with empty URLs and no reachable content frame in the first case;
five entries with full URLs and a working `content_frame()` in the second. The
strategy setting was the only thing that differed between the two runs.
## What to check in your own setup
```python
frames = page.frames
for f in frames:
print(f.url or "(empty - possibly isolated)", f.name)
```
An entry with an empty URL and no name, sitting where a real iframe should be, is the
shape of this exact problem. Confirm it by toggling Firefox's site-isolation strategy
preference and re-running the same check: if the empty entry gains a real URL, that
preference is the cause, not a permissions or timing issue anywhere in your own code.
## Short answers to the questions that lead here
**Why does `content_frame()` return `None` for an iframe that clearly has content?**
The iframe's browsing context is very likely running in a separate, isolated process,
and the driver's frame tree only has a placeholder for it rather than the real
reference.
**Why does `frame.evaluate()` throw a cross-origin permission error here specifically?**
Same root cause. The evaluation target the driver is trying to reach isn't actually
wired to the real execution context.
**Does `force=True` fix a `frame_locator` timeout on a cross-origin iframe?** No,
because the element genuinely isn't reachable through the frame tree the driver is
using; forcing the click doesn't change what frame tree exists.
**Is this a permissions bug?** No. Nothing was denied in the security sense; the
property being read simply isn't exposed to the scope trying to read it, and the
underlying frame reference the driver needs was never populated in the first place.
**See also:** [why an attached debugger makes automation detectable](debugger-timing-detection.md),
for another case where the automation layer itself was the actual surface; and
[how to test whether your setup is actually working](how-to-test-bot-detection.md),
for the reproduction discipline that caught the two wrong fixes here.
## Sources
- This project's own patch history for the root-cause diagnosis, the two earlier
incorrect fixes and why each one failed to address anything, the single-preference
fix, and the regression test suite that locks the fixed behaviour in.
- Playwright's own API reference for the three calls involved: [`ElementHandle.content_frame`](https://playwright.dev/python/docs/api/class-elementhandle),
[`Frame.evaluate`](https://playwright.dev/python/docs/api/class-frame), and
[`FrameLocator`](https://playwright.dev/python/docs/api/class-framelocator).
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level, on a bug that took two wrong committed fixes before
the actual cause was reproduced.*
+228
View File
@@ -0,0 +1,228 @@
---
title: "CSS fingerprinting: what media queries reveal"
description: "Media queries and CSS system colours fingerprint a machine with no JavaScript, beyond page-level stealth. What they expose, and the two consistency traps."
parent: "Browser Identity"
grand_parent: "Guides"
nav_order: 9
---
# CSS fingerprinting: what media queries reveal
**CSS fingerprinting identifies a machine using only stylesheet media queries and system
colours, with no JavaScript at all.** Media queries reveal the pointer type, the
operating-system dark-mode setting, display resolution and colour gamut, the screen size,
and accessibility preferences; CSS system colours reveal the operating system itself. Each
is read by loading a different resource per branch, so the server learns the answer from
which request arrives.
Almost everything written about [what a browser fingerprint is](what-is-a-browser-fingerprint.md)
assumes JavaScript. Disable it, block it, patch it, and the discussion is about what a
script can read.
CSS does not need a script. A stylesheet can ask what kind of pointer you have, whether
your system is in dark mode, how many colours your display shows, and how large it is,
and it can report the answer by loading a different background image per branch. No
JavaScript runs, so **no page-level stealth layer is involved at all**.
This page covers what the features expose, the two places where CSS and JavaScript can
disagree about the same machine, the system-colour surface almost nobody knows about,
and what a consistent answer looks like.
## How a stylesheet exfiltrates without a script
**A stylesheet exfiltrates data with no JavaScript at all by loading a different image
per media-query branch, so the browser that requests one image rather than another has
answered the query.** The pattern is a few lines of CSS and has been known for years:
```css
@media (pointer: fine) { body { background-image: url("/p?fine"); } }
@media (pointer: coarse) { body { background-image: url("/p?coarse"); } }
@media (prefers-color-scheme: dark) { body { border-image: url("/c?dark"); } }
```
Only the matching branch loads its image, so the server learns the answer from which
request arrives. Repeat across a dozen features and you have a fingerprint assembled
entirely from network requests.
Two consequences worth being explicit about:
- **Blocking or patching JavaScript does nothing here.** There is no function to
override and no object to inspect.
- **It works on the first paint**, before any script you inject has a chance to run,
which sidesteps the timing problem that
[page-level patches have anyway](navigator-webdriver-explained.md).
Estimates of how much entropy this reaches vary, and the useful number is not the total.
It is that these values are *free* to collect and are rarely part of anyone's checklist.
## The media features that actually carry information
Not every media feature carries useful entropy. The ones that identify a machine fall into
five groups: pointer and hover capabilities, colour scheme, display characteristics,
accessibility preferences, and size.
| Media feature | What it reveals |
|---|---|
| `pointer`, `any-pointer`, `hover`, `any-hover` | Input devices: mouse vs touch, and whether the device has both |
| `prefers-color-scheme` | OS dark-mode setting, close to a coin flip across real users |
| `resolution`, `color-gamut` | Display panel class (`p3` marks a modern, wide-gamut display) |
| `prefers-reduced-motion`, `prefers-contrast`, `forced-colors`, `inverted-colors` | Accessibility preferences; a non-default value is rare and identifying |
| `width`, `height`, `device-width`, `device-height` | Screen and viewport size, and the CSS/JavaScript consistency trap below |
**Pointer and hover.**
[`pointer`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pointer),
`any-pointer`, `hover`, `any-hover`. A desktop with a
mouse reports `fine` and `hover`. A phone reports `coarse` and `none`. A touchscreen
laptop reports both, through the `any-` variants, which is how a device with two input
methods is distinguished from one with a single method.
**Colour scheme.**
[`prefers-color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
is the operating system's dark mode setting,
and it is close to a coin flip across real users, so it is a genuine bit rather than a
constant.
**Display characteristics.** `resolution` and `color-gamut` describe the panel.
`color-gamut: p3` says a modern, better-than-average display; see
[color-gamut as a display fingerprint](color-gamut-hdr-media-query-fingerprint.md) for how
that one media query alone narrows the field.
**Accessibility preferences.** `prefers-reduced-motion`, `prefers-contrast`,
`forced-colors`, `inverted-colors`. Almost everyone leaves these at the default, which
is exactly why a non-default value is informative: it is rare.
**Size.** `width`, `height`, `device-width`, `device-height`, and the interaction with
`resolution`. Which brings us to the trap.
## Trap one: CSS and JavaScript can disagree about the screen
**In Firefox, the size a media query resolves against and the size `screen.width`
reports come from different code inside the browser** - two separate paths to the same
physical fact. Patch only the JavaScript side and the two disagree about the same
machine; this is a mistake specific to spoofing, and it is invisible unless you look
for it directly.
Concretely, spoofing only the JavaScript side produces a browser where:
```js
screen.width // 1920
matchMedia('(device-width: 1920px)').matches // false, the real panel is something else
```
One line of CSS and one line of JavaScript, and they disagree about the machine they are
running on. That is not an unusual value, it is a contradiction, and contradictions are
what the checks in this whole subject are built on.
The same applies to the pointer capabilities: a touchscreen laptop reporting `coarse` to
CSS while the JavaScript side claims a desktop persona is the same class of mismatch.
This project handles both in the browser's own media-feature code, so the CSS device
size comes from the same profile as `screen`, and the pointer capabilities report a
mouse rather than whatever hardware the host happens to have.
### How to check it yourself
```js
console.log(screen.width, screen.height);
console.log(matchMedia(`(device-width: ${screen.width}px)`).matches); // want true
console.log(matchMedia('(pointer: fine)').matches,
matchMedia('(any-pointer: coarse)').matches);
```
If the second line is `false`, something is spoofing one side only.
## Trap two: CSS system colours give away the operating system
**[CSS system colour keywords](https://developer.mozilla.org/en-US/docs/Web/CSS/system-color) -
`ButtonFace`, `ButtonText`, `Canvas`, `CanvasText`, `Highlight`, `HighlightText`,
`Menu`, `Field`, and a few dozen more - resolve to the operating system's own interface
palette, readable with no permission and one function call.** This surface is
genuinely obscure, and it is checked in production:
```js
const d = document.createElement('div');
d.style.color = 'ButtonText';
d.style.backgroundColor = 'ButtonFace';
document.body.appendChild(d);
getComputedStyle(d).color; // an RGB triple from the OS theme
```
Those values are the actual theme colours. On Windows they come from the Win32 palette.
On Linux they resolve through the desktop theme, and the RGB values are different, even
when the user agent says Windows.
So a browser claiming Windows and returning a Linux theme's palette has answered the
platform question twice with two different answers, from a surface most people have
never enumerated. A commercial fingerprinting service hashes exactly this set.
This project pins the full palette to the Windows default so it matches the claimed
platform, with one exception worth knowing: when the persona is a dark-theme user, the
palette is skipped and the dark-mode preference is set instead, because pinning a light
palette onto a dark-mode profile would create the contradiction it exists to prevent.
## What a consistent CSS answer looks like
Working from all of the above:
- **Pointer and hover describe one plausible input device**, and agree between the
`any-` variants and the plain ones.
- **The CSS device size matches `screen`**, exactly.
- **`prefers-color-scheme` matches the system-colour palette.** Dark mode with a light
palette is a contradiction.
- **Accessibility preferences are at their defaults** unless you have a reason, because
non-default values are rare and therefore identifying.
- **`color-gamut` and `resolution` suit the display you claim.**
- **Everything is stable for the session.** A colour scheme that flips mid-session is a
browser nobody has.
## Conclusion
CSS fingerprinting matters not because it is the strongest signal but because it is the
one that operates below every layer people normally work at. There is no script to
patch, so the values have to be right at the source or not at all.
The two traps are the practical takeaway. CSS and JavaScript reach the screen size by
different routes inside the browser, and the system-colour palette is a platform tell
sitting in plain sight, readable with one `getComputedStyle` call.
## Short answers to the questions that lead here
**Can a website fingerprint me with CSS alone?** Yes. Media queries can load different
resources per branch, so the server learns the answer without any script running.
**Does blocking JavaScript stop CSS fingerprinting?** No. That is the point of it.
**What is `prefers-color-scheme` worth to a tracker?** Roughly one bit, and a reliable
one, because real users are split between the two settings.
**Why would CSS and `screen.width` disagree?** Because the browser resolves them through
different code, so spoofing one and not the other leaves them inconsistent.
**Are CSS system colours really used for fingerprinting?** Yes, by hashing the resolved
values of the system keywords. They also reveal the operating system independently of
the user agent.
**Should I set unusual accessibility preferences?** No. Almost everyone is at the
default, so anything else narrows you down rather than hiding you.
**See also:** [screen size and viewport tells](screen-size-headless-tells.md), which is
the JavaScript half of the size question,
[why headless browsers render different fonts](headless-fonts-differ.md), another
platform tell that no script controls, and
[the checklist for being detected on one site](playwright-detected-as-bot.md).
## Sources
- MDN's [reference for the `@media` at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/@media)
and the individual media features named above.
- Published work on CSS-based fingerprinting, which is where the load-an-image-per-branch
technique is described.
- This project's own media-feature and system-colour handling, and the reason the palette
is skipped for dark-theme personas.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The system-colour palette is pinned here because a
commercial detector was hashing it and catching the host operating system through it.*
+305
View File
@@ -0,0 +1,305 @@
---
title: "How DataDome's bot detection actually works"
description: "DataDome scores a request on three layers before the page finishes loading: TLS and HTTP fingerprint, a JavaScript device and behavior collector, and a cookie that remembers the verdict. Read from DataDome's own docs and confirmed reverse engineering."
parent: "Detectors, Explained"
grand_parent: "Guides"
nav_order: 24
---
# How DataDome's bot detection actually works
DataDome is not a library you install and read the source of. It is a paid
service run partly on its own servers, so most of what circulates about it
online is reverse-engineered from the outside rather than read from a
repository. That is a real gap in a corpus like this one: DataDome sits in
front of a large share of retail, travel and ticketing traffic, and "datadome
bypass" and "datadome cookie playwright" are two of the most consistently
searched anti-bot terms there are.
This page separates what DataDome documents about its own product from what
independent reverse engineering has confirmed, and says which is which. The
short version: a request is scored on three layers before the page finishes
loading, the TLS/HTTP handshake, a JavaScript collector that checks the
device and, over the session, your behavior, and a cookie that remembers the
verdict so the first two do not run again. None of the three are secret in
outline. The scoring model behind them is.
Read from DataDome's own documentation on 2026-08-30
([`docs.datadome.co`](https://docs.datadome.co/docs/device-check), the
Device Check, JavaScript Tag, cookie and pre-activation checklist pages) and
from practitioner reverse engineering also read 2026-08-30 (Scrapfly,
ZenRows, and a public GitHub tool built to talk to DataDome's own challenge).
Anything sourced only to the second group is marked as such below.
## Three layers, in the order a request meets them
| Layer | What it checks | Runs where |
|---|---|---|
| Network | TLS handshake (JA3/JA4-class fingerprint), HTTP/2 frame order, IP and ASN reputation | On the wire, before any page content is served |
| Device and behavior | Canvas, WebGL, audio and font signals, automation-framework tells, then mouse, scroll, click and typing patterns over the session | An in-page JavaScript tag |
| Session memory | An encrypted `datadome` cookie holding the last verdict | Your cookie jar, read on every subsequent request |
A request that fails the network layer badly enough never needs the other
two. A request that looks fine on the network but has no cookie, or an
expired one, gets the JavaScript layer. A request with a valid cookie mostly
skips straight through: DataDome says plainly that once a device or visitor
has been verified, "DataDome remembers the outcome and does not repeat the
verification."
## The network layer: before your JavaScript even runs
The TLS `ClientHello`, sent before either side has exchanged a single
application byte, encodes which cipher suites, TLS version and extensions
the client supports, and it differs by TLS library in ways JavaScript cannot
touch, because JavaScript has not started running yet. DataDome's own
engineering blog (read via its Security Boulevard reprint, since the
original page on `datadome.co` blocked direct retrieval this session) states
the fingerprint is "quite stable and unique for a device type, browser, and
OS," and that the same model catches two patterns: bots whose TLS stack has
a fingerprint nothing else shares, and clients claiming to be one thing
(Chrome 102, say) while their handshake belongs to something else. [How JA3
and JA4 actually work, and why neither can be patched from inside the
browser](ja3-ja4-tls-fingerprint.md); [the HTTP/2 SETTINGS frame and header
order sit one layer above it, and DataDome reads that too](http2-fingerprint-detection.md).
Same source: DataDome states its engine processes on the order of three
trillion signals a day (2022 figure). A separate 2026 write-up from
Scrapfly, a scraping infrastructure vendor, cites five trillion a day and
"over 85,000 customer-specific and use-case-specific models," one set per
protected site instead of one global model. Four years apart and not
necessarily in tension, but neither figure is audited, so treat both as
vendor reporting, not something this page verified independently.
IP and ASN sit in the same layer conceptually: whether the address is
residential, mobile or datacenter, its distance from the claimed timezone,
how many recent requests share it. [What ASN and IP reputation actually
score, and how fast it decays, is covered separately](asn-and-ip-reputation-in-bot-detection.md);
DataDome's docs do not detail IP scoring, so this leans on the practitioner
writeups, not DataDome's own pages.
## The device check: what the JavaScript tag actually collects
DataDome's own JavaScript Tag documentation describes an inline script meant
to sit at the very start of `<head>`, before any other resource loads, so it
can intercept `XMLHttpRequest` and `fetch` calls and show a challenge before
the page's own requests go out:
```html
<script>
window.ddjskey = 'YOUR_DATADOME_JS_KEY';
window.ddoptions = {};
</script>
<script src="https://js.datadome.co/tags.js" async></script>
```
`ddjskey` is the site's own public key, set by whoever integrates DataDome,
not something generated per visitor. According to DataDome's own docs, the
tag collects two kinds of data: "behavioral data from the client... such as
mouse movements or key strokes," and "generic information about the OS, the
browser itself, the GPU, etc." It also runs, in DataDome's own words,
consistency checks aimed specifically at Headless Chrome, Puppeteer,
Puppeteer Extra Stealth and modified Selenium builds. The payload is POSTed
to `api-js.datadome.co/js/`.
DataDome does not publish the individual checks inside that collector, so
the specifics here come from reverse engineering, not `docs.datadome.co`.
ZenRows' own deobfuscation of a live DataDome bundle reports "over 35
functions" prefixed `dd_`, gathering canvas, WebGL and font signals alongside
the automation-framework checks DataDome's docs already name. Scrapfly's
breakdown, published as part of its own bypass product, adds more: dual-
probing 19 MIME types twice, checking WebGL parameter coherence, reading
`navigator.keyboard.getLayoutMap()`, battery status, `speechSynthesis` voice
lists, camera/microphone permission state, and two separate sets of
User-Agent Client Hints. A vendor selling a bypass product has an obvious
incentive to make its own reverse engineering sound thorough, so read this
list as corroborated in outline, two unrelated writeups converge on canvas,
WebGL, fonts and automation-framework checks, not verified line by
line.
DataDome's own **Device Check** feature is the name for the invisible
version of this: it fires, per DataDome's docs, "when a bot is detected...
but the evidence of bot activity is not strong enough to block it," or when
the requested resource looks sensitive on its own. It is enabled by default,
"collect[s] hundreds of signals and perform[s] several checkpoints on the
device and environment," and returns one of three outcomes: block, allow, or
escalate to a visible challenge. DataDome states plainly that "no personal
information is collected" by this step.
## The cookie, and what happens when it is missing
DataDome's own cookie documentation is specific: named `datadome`,
documented at roughly 128 bytes, expiring after about a year, its value
encrypted and, per DataDome, holding no personally identifying information.
The same page instructs site owners never to mark it `HttpOnly` or move its
`Domain`/`Path`, because DataDome's own JavaScript needs to read and write it
directly, the opposite of how a typical session-security cookie is usually
configured. DataDome describes the cookie's job as enabling "both
server-side and client-side detection to assess the legitimacy of a
request." [Reading and setting cookies through a Playwright context, and why
a hand-set cookie can look unearned next to one a real visit produced, has
its own page](read-set-cookies-playwright-context.md).
For what happens when that cookie is missing, expired, or fails validation,
DataDome's pre-activation docs name two default challenge types per
protected endpoint: **Slider**, the primary one, and **Device Check** as the
automatic fallback if Slider is turned off for that endpoint. If an operator
disables both for an endpoint, requests there are simply allowed through,
per DataDome's own docs, a genuine gap and not a weakness anyone has to
guess at.
The page a browser sees when neither a valid cookie nor a passing Device
Check is present is what people who reverse-engineer DataDome call the
"interstitial" or the "5-second challenge", terms from that community, not
DataDome's own published vocabulary in what this page could retrieve. A
concrete example of that reverse engineering: a public GitHub project,
`Datadome-Interstital-Encryptor`, builds exactly the encrypted payload this
challenge expects. Its README shows the inputs, a `datadome` cookie, a
per-site hash, and named "signals" added one at a time before the tool
encrypts them into a payload submitted back in exchange for a fresh
`datadome` cookie that lets the next request through. The tool proves the
shape of the exchange is real; it does not reveal what DataDome's server
does with the signals, because that part is not public from either side.
## Behavior does not stop being scored once you are past the door
A passing Device Check or a valid cookie is not a permanent pass. Per
Scrapfly's description, DataDome keeps scoring mouse trajectories, scroll
velocity, click coordinates, typing cadence and dwell time across the whole
session, comparing that behavioral signature against models trained on that
specific site's own legitimate traffic, which is what the per-customer-model
figure above describes. [What mouse-dynamics behavioral biometrics actually
score, distribution by distribution rather than field by field, is covered
separately](mouse-dynamics-behavioural-biometrics.md). This is also where an
automation *script* creates its own signal, independent of the engine it
drives: a click that always lands dead-center, a scroll that jumps to the
same offset on a fixed interval, or fields filled at an inhumanly constant
rhythm all read as machine regularity, no matter how faithfully the engine
underneath renders canvas or answers TLS.
## What an engine answers honestly, and what sits outside its reach
This is the honest boundary, and it matters more here than almost anywhere
else in this corpus, because DataDome checks span from the TLS library up
through months of session history.
**What a genuinely real Firefox engine answers correctly, by construction,
with nothing spoofed at the JavaScript layer:** the TLS handshake and the
HTTP/2 frame order, because they come from a real Firefox stack rather than
an impersonation of one; canvas, WebGL and AudioContext output, because they
come out of the real rendering and audio paths instead of a patched return
value; native function `toString()` output, `navigator.webdriver` and the
rest of the automation-framework tells DataDome's own docs name, because
there is no CDP-driven Chromium underneath pretending; and font enumeration
and OS-backed values like `navigator.keyboard.getLayoutMap()`, because they
come from a real OS-facing path instead of a JavaScript-level override. That
is a claim about which category of check has nothing to find, not a claim
that any specific vendor's model is defeated.
**What sits entirely outside what any browser engine, real or patched, can
answer:** IP reputation and ASN, a property of the network path rather than
the browser; DataDome's server-side ML score and its per-site models, which
run on DataDome's own infrastructure and are not observable from the client
at all; and account or session history, since the `datadome` cookie's own
roughly year-long lifetime exists specifically to reward continuity a single
fresh session cannot have. Behavioral scoring sits in a third category: it
is produced by whatever is driving the browser, not the browser itself, a
property of the automation code and its pacing, [which has its own, separate
discussion](ai-agent-timing-signal.md), not of engine realness.
And the interactive **Slider** challenge specifically is a puzzle a visitor
solves, not a fingerprint a browser answers. `invisible_playwright` is
engine-level work: a patched Firefox that answers the device and consistency
checks in the table above the way a real Firefox would. It does not include,
and does not sell, a captcha or puzzle-solving service, and nothing here
should be read as a claim that it clears DataDome's slider, its behavioral
scoring, or its server-side risk model. Those are different problems from
the one an honest engine solves, and no amount of engine fidelity
substitutes for a clean, reputable IP or human-paced interaction.
One 2026 wrinkle worth noting: DataDome's own pre-activation checklist now
lists **MCP** (Model Context Protocol) alongside Web Browsers, Mobile Apps
and APIs as a "Traffic Source," with a separate "Agentic Trust" setting for
scoring AI-agent traffic. It is the same three-layer model applied to a
newer client, not a new mechanism: an LLM-driven agent still opens a TLS
connection, still runs (or fails to run) the collector, and still produces a
behavioral trace, [which has a signature of its own that no fingerprint
fixes](ai-agent-timing-signal.md).
## Short answers to the questions that lead here
**What is DataDome?** A commercial anti-bot and WAF-adjacent service that
protects a site's traffic by scoring the TLS/HTTP handshake, an in-page
JavaScript device and behavior collector, and a session cookie, then
blocking, challenging or allowing each request.
**What triggers DataDome's challenge?** A missing or invalid `datadome`
cookie, a network-layer signal that looks wrong (an inconsistent TLS
fingerprint, a flagged IP), or a JavaScript-layer signal that looks wrong
(an automation-framework tell, an inconsistent device fingerprint). Any one
of the three can be enough on its own.
**What is the difference between Device Check and the Slider challenge?**
Per DataDome's own docs, Slider is the default, primary interactive
challenge; Device Check is the automatic, invisible fallback if Slider is
turned off for that endpoint, and can also run on its own when evidence
against a request is present but not strong enough to block outright.
**Does a real, unpatched browser engine beat DataDome?** It correctly
answers the device and consistency layer, the one an engine can honestly
answer. It says nothing about IP reputation, DataDome's server-side ML score,
session history, or the Slider puzzle itself, which are separate problems.
**Does invisible_playwright solve DataDome's captcha for me?** No. It is
engine-level realness, a patched Firefox that answers device checks
honestly. It does not include a puzzle-solving or captcha-solving service of
any kind.
**Why would a request still get challenged with a clean fingerprint?**
Because the fingerprint is one of three layers. A datacenter IP, a session
with no history, or a behavioral pattern that reads as machine-regular can
each trigger a challenge on their own, independent of whether the device
fingerprint was clean.
**See also:** [JA3 and JA4: why a TLS fingerprint cannot be patched](ja3-ja4-tls-fingerprint.md),
[what ASN and IP reputation score, and how fast it decays](asn-and-ip-reputation-in-bot-detection.md),
[what mouse-dynamics behavioral biometrics actually measure](mouse-dynamics-behavioural-biometrics.md),
and [the checklist for when one site detects you](playwright-detected-as-bot.md).
## Sources
- DataDome's own documentation, read 2026-08-30: [Device Check](https://docs.datadome.co/docs/device-check),
[JavaScript Tag](https://docs.datadome.co/docs/javascript-tag),
[cookie and stored data](https://docs.datadome.co/docs/cookie-session-storage), and the
[pre-activation checklist](https://docs.datadome.co/docs/checklist-before-activating-protection),
for trigger conditions, JS Tag behavior, cookie name/size/expiry, and the
Slider/Device Check pairing including the MCP/Agentic Trust category.
- DataDome's own engineering blog on TLS fingerprinting, read via its
[Security Boulevard reprint](https://securityboulevard.com/2022/10/how-tls-fingerprinting-reinforces-datadomes-protection/)
(the original `datadome.co` page returned a 403 to this session's fetch
tool), read 2026-08-30, for the "three trillion signals a day" figure and
the two TLS-mismatch patterns it detects.
- Press coverage of the Device Check launch, [Help Net Security, 2023-12-12](https://www.helpnetsecurity.com/2023/12/12/datadome-device-check/),
read 2026-08-30, for the company's self-reported accuracy and
SDK-deployment figures at launch.
- Scrapfly, read 2026-08-30: its [DataDome bypass product page](https://scrapfly.io/bypass/datadome)
for the detection-layer chain and collector checks (codec dual-probe,
keyboard layout map, WebGL coherence), and its [blog post on bypassing
DataDome](https://scrapfly.io/blog/posts/how-to-bypass-datadome-anti-scraping)
for the 85,000-model and five-trillion-signal figures, both self-reported
by a vendor selling a competing bypass product.
- ZenRows' [DataDome bypass writeup](https://www.zenrows.com/blog/datadome-bypass),
read 2026-08-30, for its own deobfuscation results (the `dd_`-prefixed
function count) and its TLS/header check description.
- [`glizzykingdreko/Datadome-Interstital-Encryptor`](https://github.com/glizzykingdreko/Datadome-Interstital-Encryptor)
on GitHub, read 2026-08-30, a real public reverse-engineering project, for
the concrete shape of the interstitial payload (cookie, site hash, named
signals) practitioners have independently worked out.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright).
DataDome does not publish its scoring model or the full list of what its
collector checks, so this page draws a line between DataDome's own
documentation and outside reverse engineering everywhere that line exists,
rather than presenting both as equally certain.*
Loaded 100 of 746 files, more files were not shown because too many files have changed in this diff. Show more