Compare commits

..
Author SHA1 Message Date
feder-cr 681776e163 counters: 2026-12-05, browser launches at 8510415 2026-12-05 07:37:17 +00:00
feder-cr 61e5cf77a5 counters: 2026-12-04, browser launches at 8336564 2026-12-04 01:02:24 +00:00
feder-cr 49198e564b counters: 2026-12-02, browser launches at 8177972 2026-12-02 21:29:37 +00:00
feder-cr 2f4cb2b849 counters: 2026-12-01, browser launches at 8008454 2026-12-01 15:58:45 +00:00
feder-cr 386c5b2a43 counters: 2026-11-30, browser launches at 7827502 2026-11-30 08:06:53 +00:00
feder-cr 88b1e368ee counters: 2026-11-29, browser launches at 7681637 2026-11-29 07:17:25 +00:00
feder-cr b66b48c1b3 counters: 2026-11-27, browser launches at 7493097 2026-11-27 08:14:31 +00:00
feder-cr 7df642ef80 counters: 2026-11-26, browser launches at 7346381 2026-11-26 08:05:37 +00:00
feder-cr 11a55e6bdd counters: 2026-11-25, browser launches at 7203749 2026-11-25 08:20:22 +00:00
feder-cr 43c700f844 counters: 2026-11-24, browser launches at 7066091 2026-11-24 09:45:02 +00:00
feder-cr 9a3934b71e counters: 2026-11-23, browser launches at 6907410 2026-11-23 07:25:11 +00:00
feder-cr 0e9fc1c4c9 counters: 2026-11-22, browser launches at 6767847 2026-11-22 06:36:35 +00:00
feder-cr 95be78e9af counters: 2026-11-21, browser launches at 6635258 2026-11-21 06:56:50 +00:00
feder-cr 1fc5e27e2b counters: 2026-11-20, browser launches at 6502061 2026-11-20 07:02:16 +00:00
feder-cr 96ac32a38e counters: 2026-11-19, browser launches at 6369762 2026-11-19 07:14:39 +00:00
feder-cr 8a7cf03b63 counters: 2026-11-18, browser launches at 6237372 2026-11-18 07:15:00 +00:00
feder-cr fa22d481af counters: 2026-11-17, browser launches at 6108715 2026-11-17 07:47:13 +00:00
feder-cr a77c3f4e9a counters: 2026-11-16, browser launches at 5971842 2026-11-16 06:15:45 +00:00
feder-cr 16c1190755 counters: 2026-11-15, browser launches at 5844148 2026-11-15 06:16:47 +00:00
feder-cr eb9a62b5cc counters: 2026-11-14, browser launches at 5717979 2026-11-14 06:09:45 +00:00
feder-cr c27dbe4600 counters: 2026-11-13, browser launches at 5585186 2026-11-13 06:31:12 +00:00
feder-cr 707515a3f1 counters: 2026-11-12, browser launches at 5454808 2026-11-12 07:02:19 +00:00
feder-cr 1c827f3da7 counters: 2026-11-11, browser launches at 5319939 2026-11-11 14:15:28 +00:00
feder-cr a9320111dc counters: 2026-11-11, browser launches at 5319939 2026-11-11 06:00:19 +00:00
feder-cr b32e8167ed counters: 2026-11-10, browser launches at 5196828 2026-11-10 07:08:31 +00:00
feder-cr a23b972e7f counters: 2026-11-09, browser launches at 5067495 2026-11-09 06:10:55 +00:00
feder-cr 9fe8ce3b66 counters: 2026-11-08, browser launches at 4962048 2026-11-08 09:17:30 +00:00
feder-cr 6232574f3d counters: the launch history, so the daily snapshot can run on GitHub Actions 2026-11-08 07:00:24 +01:00
feder-cr 835e93f4f9 badge: Stars at 2.55k 2026-11-04 23:10:06 +01:00
feder-cr c3e48b6e6e badge: browser launches at 4.61M 2026-11-04 23:10:05 +01:00
feder-cr 6e87c964f1 badge: browser launches at 4.49M 2026-11-03 05:10:06 +07:00
feder-cr 32f2af8808 badge: browser launches at 4.42M 2026-11-02 05:10:06 +07:00
feder-cr 8178a2a330 badge: Stars at 2.54k 2026-11-01 05:10:07 +07:00
feder-cr 068db0f9bf badge: browser launches at 4.36M 2026-11-01 05:10:06 +07:00
feder-cr 37bc5abdc7 badge: browser launches at 4.3M 2026-10-31 05:10:05 +07:00
feder-cr eba6ced288 badge: Stars at 2.53k 2026-10-30 05:10:07 +07:00
feder-cr e3c2b9871c badge: browser launches at 4.24M 2026-10-30 05:10:05 +07:00
feder-cr c6aee91109 badge: browser launches at 4.17M 2026-10-29 05:10:05 +07:00
feder-cr 6763c03418 badge: browser launches at 4.11M 2026-10-28 05:10:05 +07:00
feder-cr 563b9ba53f badge: Stars at 2.52k 2026-10-27 05:10:06 +07:00
feder-cr eef4916c97 badge: browser launches at 4.05M 2026-10-27 05:10:05 +07:00
feder-cr e9a2a1e13f badge: Stars at 2.51k 2026-10-25 05:10:08 +07:00
feder-cr fa37048123 badge: browser launches at 3.92M 2026-10-25 05:10:06 +07:00
feder-cr 795e1f60c1 badge: browser launches at 3.86M 2026-10-24 05:10:05 +07:00
feder-cr 79e6ea98e5 badge: browser launches at 3.8M 2026-10-23 05:10:05 +07:00
feder-cr 40e9540ed9 badge: Stars at 2.5k 2026-10-21 15:10:14 -07:00
feder-cr 2e8e8d9d7e badge: browser launches at 3.74M 2026-10-21 15:10:11 -07:00
feder-cr dae2dfd6df badge: Stars at 2.64k 2026-10-20 15:10:10 -07:00
feder-cr 25c8fd2c79 badge: browser launches at 3.68M 2026-10-20 15:10:08 -07:00
feder-cr 680bb9dd28 badge: Stars at 3.18k 2026-10-19 15:10:07 -07:00
feder-cr 736aa2c7b1 badge: browser launches at 3.62M 2026-10-19 15:10:05 -07:00
feder-cr f213884d25 badge: Stars at 3.17k 2026-10-18 15:10:07 -07:00
feder-cr d8a7e90cfe badge: browser launches at 3.56M 2026-10-18 15:10:06 -07:00
feder-cr f02bacfbe1 badge: Stars at 3.16k 2026-10-17 15:10:09 -07:00
feder-cr fa4ffee15e badge: browser launches at 3.5M 2026-10-17 15:10:07 -07:00
feder-cr b86e18a719 badge: browser launches at 3.45M 2026-10-16 15:10:05 -07:00
feder-cr 50e283486a badge: Stars at 3.15k 2026-10-15 15:10:09 -07:00
feder-cr ea9c8368c2 badge: browser launches at 3.39M 2026-10-15 15:10:07 -07:00
feder-cr 8dd44bd779 badge: browser launches at 3.34M 2026-10-14 15:10:08 -07:00
feder-cr e3f36fd57f badge: Stars at 3.14k 2026-10-13 15:10:11 -07:00
feder-cr d7b1c2aa5c badge: browser launches at 3.29M 2026-10-13 15:10:08 -07:00
feder-cr f948ef6dcd badge: Stars at 3.12k 2026-10-12 15:10:09 -07:00
feder-cr 7cfbd7e37a badge: browser launches at 3.24M 2026-10-12 15:10:07 -07:00
feder-cr f35bed21a2 badge: Stars at 3.09k 2026-10-12 00:10:06 +02:00
feder-cr d53800aca7 badge: browser launches at 3.19M 2026-10-12 00:10:05 +02:00
feder-cr 9a7b26b643 badge: Stars at 3.05k 2026-10-11 00:10:11 +02:00
feder-cr d259c26510 badge: browser launches at 3.15M 2026-10-11 00:10:09 +02:00
feder-cr 7c70d68be4 badge: Stars at 3.04k 2026-10-10 00:10:10 +02:00
feder-cr 41a91068b0 badge: browser launches at 3.11M 2026-10-10 00:10:07 +02:00
feder-cr d63f68557f badge: browser launches at 3.08M 2026-10-09 00:10:04 +02:00
feder-cr a6cd40696b badge: Stars at 3.03k 2026-10-08 00:10:09 +02:00
feder-cr f799d015b1 badge: browser launches at 3.04M 2026-10-08 00:10:07 +02:00
feder-cr ab4065dd69 badge: Stars at 3.02k 2026-10-07 00:10:08 +02:00
feder-cr c2d4839865 badge: browser launches at 3.01M 2026-10-07 00:10:06 +02:00
feder-cr d2f7111267 badge: Stars at 3.01k 2026-10-06 00:25:59 +02:00
feder-cr db991ff770 badge: browser launches at 2.98M 2026-10-06 00:25:58 +02:00
feder-cr 3f524c834c badge: browser launches at 2.95M 2026-10-05 00:10:07 +02:00
feder-cr 25d5d2d2d5 badge: Stars at 3k 2026-10-04 00:10:11 +02:00
feder-cr 73d1f013c3 badge: browser launches at 2.93M 2026-10-04 00:10:09 +02:00
feder-cr b453c6b274 badge: Stars at 2.99k 2026-10-03 00:10:09 +02:00
feder-cr ad2ec1943b badge: browser launches at 2.9M 2026-10-03 00:10:07 +02:00
feder-cr 4a565b7ef9 badge: browser launches at 2.87M 2026-10-02 00:10:09 +02:00
feder-cr ae28582691 badge: browser launches at 2.84M 2026-10-01 00:10:07 +02:00
feder-cr 177e85952a badge: browser launches at 2.81M 2026-09-30 00:10:12 +02:00
feder-cr 6a9f7e83f4 badge: Stars at 2.98k 2026-09-29 00:10:09 +02:00
feder-cr f3a45c0dc8 badge: browser launches at 2.79M 2026-09-29 00:10:07 +02:00
feder-cr e9a457aace badge: Stars at 2.97k 2026-09-27 02:26:01 +02:00
feder-cr b5eb96f7ee badge: browser launches at 2.74M 2026-09-27 02:26:00 +02:00
feder-cr 8cb8699b3a badge: browser launches at 2.72M 2026-09-26 05:25:57 +02:00
feder-cr 036ac35034 badge: browser launches at 2.69M 2026-09-25 00:10:03 +02:00
feder-cr f4600827af badge: Stars at 2.96k 2026-09-24 00:10:06 +02:00
feder-cr cd5866f4f6 badge: browser launches at 2.67M 2026-09-24 00:10:04 +02:00
feder-cr b38998014b badge: browser launches at 2.64M 2026-09-23 00:10:04 +02:00
feder-cr 14e746585f badge: Stars at 2.95k 2026-09-22 00:10:09 +02:00
feder-cr 0d57abbfb2 badge: browser launches at 2.62M 2026-09-22 00:10:07 +02:00
feder-cr 9832f4e3d3 badge: Stars at 2.94k 2026-09-21 00:10:05 +02:00
feder-cr e1f954a59f badge: browser launches at 2.59M 2026-09-21 00:10:04 +02:00
feder-cr 7d0fbebe88 badge: Stars at 2.79k 2026-09-20 00:10:06 +02:00
feder-cr 72547a1930 badge: browser launches at 2.57M 2026-09-20 00:10:05 +02:00
feder-cr fd5137e38a badge: Stars at 2.05k 2026-09-19 00:10:06 +02:00
feder-cr 20f7e7f488 badge: browser launches at 2.55M 2026-09-19 00:10:05 +02:00
feder-cr f601e6a8d8 badge: Stars at 2.04k 2026-09-18 01:06:11 +02:00
feder-cr 60a1a10e50 badge: browser launches at 2.53M 2026-09-18 01:06:10 +02:00
feder-cr 58e93cfcbf badge: Stars at 2.03k 2026-09-17 00:10:10 +02:00
feder-cr fd2eb6d7d6 badge: browser launches at 2.51M 2026-09-17 00:10:08 +02:00
feder-cr e4995a2432 badge: browser launches at 2.48M 2026-09-16 00:10:06 +02:00
feder-cr 65d49c1754 badge: Stars at 2.02k 2026-09-15 00:10:10 +02:00
feder-cr c5b6377fb3 badge: browser launches at 2.46M 2026-09-15 00:10:08 +02:00
feder-cr d30cad79e9 badge: browser launches at 2.44M 2026-09-14 00:10:08 +02:00
feder-cr 7c0ad0115e badge: browser launches at 2.42M 2026-09-13 00:10:08 +02:00
feder-cr 6554774bf7 badge: Stars at 2.01k 2026-09-12 00:10:10 +02:00
feder-cr 1643d2fa0e badge: browser launches at 2.4M 2026-09-12 00:10:08 +02:00
feder-cr fa838b95c4 badge: browser launches at 2.36M 2026-09-11 00:10:04 +02:00
feder-cr d97b8ee595 badge: Stars at 2k 2026-09-10 00:10:09 +02:00
feder-cr 9b38311d0b badge: browser launches at 2.33M 2026-09-10 00:10:06 +02:00
feder-cr 25168cbe05 badge: browser launches at 2.29M 2026-09-09 00:10:07 +02:00
feder-cr 4051e4aa02 badge: browser launches at 2.26M 2026-09-08 00:10:07 +02:00
feder-cr 28dafca0b8 badge: Stars at 1.99k 2026-09-07 00:10:06 +02:00
feder-cr af3ed66d9d badge: browser launches at 2.23M 2026-09-07 00:10:05 +02:00
feder-cr 2d65a40048 badge: Stars at 1.98k 2026-09-06 00:10:05 +02:00
feder-cr d9bb4d978d badge: browser launches at 2.2M 2026-09-06 00:10:04 +02:00
feder-cr 374966e634 badge: Stars at 1.97k 2026-09-05 09:00:06 +02:00
feder-cr 3037dce9f0 badge: browser launches at 2.19M 2026-09-05 09:00:05 +02:00
feder-cr 020c3ad603 badge: browser launches at 2.16M 2026-09-04 09:00:10 +02:00
feder-cr c7211e4749 badge: browser launches at 2.14M 2026-09-03 09:00:09 +02:00
feder-cr 58470ca190 badge: Stars at 1.96k 2026-09-02 09:00:10 +02:00
feder-cr c2e888475d badge: browser launches at 2.12M 2026-09-02 09:00:08 +02:00
feder-cr f6a077d269 badge: browser launches at 2.1M 2026-09-01 09:00:07 +02:00
feder-cr 0c4b876412 badge: Stars at 1.95k 2026-08-30 09:00:10 +02:00
feder-cr bcb33508fc badge: browser launches at 2.09M 2026-08-30 09:00:08 +02:00
feder-cr 70e315bf8d badge: Stars at 1.94k 2026-08-27 09:00:07 +02:00
feder-cr d10bc9727b badge: Stars at 1.93k 2026-08-26 09:00:07 +02:00
feder-cr 657d681dfc badge: Stars at 1.92k 2026-08-22 09:00:07 +02:00
feder-cr a620db46c1 badge: Stars at 1.91k 2026-08-20 00:14:13 +02:00
feder-cr 0d6bb4e061 badge: browser launches at 2.08M 2026-08-17 09:00:07 +02:00
feder-cr d0133127db badge: browser launches at 1.99M 2026-08-16 09:00:07 +02:00
feder-cr e237925246 badge: Stars at 1.89k 2026-08-15 09:00:09 +02:00
feder-cr b9bae06477 badge: browser launches at 1.9M 2026-08-15 09:00:07 +02:00
feder-cr 1086814414 badge: Stars at 1.88k 2026-08-14 03:00:52 +02:00
feder-cr 4f5f709ce6 badge: Stars at 38 2026-08-14 02:59:34 +02:00
feder-cr 1ad0264c87 badge: browser launches at 1.78M 2026-08-14 02:27:31 +02:00
874 changed files with 16202 additions and 221522 deletions

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ body:
id: install_cmd
attributes:
label: How you installed
placeholder: uv add invisible-playwright
placeholder: pip install invisible_playwright
validations:
required: true
+1 -2
View File
@@ -13,8 +13,7 @@
# 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
# FIRST, the two consumers after it. 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.
-78
View File
@@ -1,78 +0,0 @@
# ─────────────────────────────────────────────────────────────────────────────
# counters.yml - the daily snapshot of the launch counter, and the README badges.
#
# GitHub keeps only the running total of a release asset's downloads, so the
# launches of a day exist only if someone records the total every day. This is
# that someone: no machine and no personal token, just the scheduler and the
# built-in GITHUB_TOKEN. A run that fails sends GitHub's failure mail, and the
# run's log warns when a day between two snapshots is missing.
#
# Everything it writes lives on the `badges` branch, which is not protected:
# counters/history.csv date,key,value - every counter, once a day
# counters/launches_daily.csv day_utc,launches - one row per measured day
# docs/badges/launches.svg, docs/badges/stars.svg
# docs/badges/launches.json, docs/badges/downloads.json - read by shields.io
# for the big row at the top of the README
#
# 00:10 UTC, so the snapshot dated D closes calendar day D-1.
name: counters
on:
schedule:
- cron: "10 0 * * *"
workflow_dispatch: {}
permissions:
contents: write
concurrency:
group: counters
cancel-in-progress: false
jobs:
snapshot:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out the script (main)
uses: actions/checkout@v4
with:
path: main
- name: Check out the badges branch
uses: actions/checkout@v4
with:
ref: badges
path: badges
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Self-test
run: python main/scripts/launch_counters.py --selftest
- name: Record today's counters and redraw the badges
env:
GITHUB_TOKEN: ${{ github.token }}
run: >
python main/scripts/launch_counters.py
--history badges/counters/history.csv
--daily badges/counters/launches_daily.csv
--badges badges/docs/badges
- name: Commit to the badges branch
working-directory: badges
run: |
set -euo pipefail
git config user.name "feder-cr"
git config user.email "85809106+feder-cr@users.noreply.github.com"
git add counters docs/badges
if git diff --cached --quiet; then
echo "nothing changed"
exit 0
fi
total=$(awk -F, '$2=="launches_total"{v=$3} END{print v}' counters/history.csv)
git commit -q -m "counters: $(date -u +%F), browser launches at ${total}"
git push origin HEAD:badges
+61 -73
View File
@@ -1,41 +1,39 @@
# ─────────────────────────────────────────────────────────────────────────────
# e2e-hunt.yml - runs the e2e suite in a LOOP until it catches a hang.
# e2e-hunt.yml - gira la suite e2e in CICLO finche' non cattura un impiccamento.
#
# 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.
# Perche' esiste. Il job e2e si impicca nel 12% delle corse (4 su 33 fra il
# 2026-08-01 e il 08-13) e uccide il job al tetto dei 40 minuti. Al 12% una corsa
# verde non dimostra niente e servono ~18 giri per avere il 90% di probabilita' di
# vederne uno: aspettare che succeda da solo su una PR significa aspettare giorni
# e bruciare il tempo di qualcun altro ogni volta.
#
# And why HERE and not locally, for TWO different reasons depending on the
# `os` input.
# E perche' QUI e non in locale, per DUE ragioni diverse a seconda dell'input `os`.
#
# 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.
# ubuntu-24.04 - l'impiccamento del job viveva li'. CHIUSO il 2026-08-13 con 36
# giri (due cacce da 18): zero impiccamenti, zero ritentativi. Resta come
# controllo di non-regressione.
#
# 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.
# windows-latest - una domanda diversa e ancora aperta: sulla macchina di
# sviluppo i test di interazione producono ritentativi (41 su 17 giri) e su
# Linux nemmeno uno in 36. Ma quella macchina non era ferma - chi misurava ci
# girava sopra, e piu' tardi ci e' tornato il proprietario - quindi il confronto
# e' CONFUSO fra piattaforma e contesa. Un runner Windows dedicato separa le due
# cose senza chiedere a nessuno di stare fermo sei ore.
#
# 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.
# Non parte da solo: solo `workflow_dispatch`. Non e' un cancello, e' uno
# strumento di indagine, e non deve entrare fra i contesti richiesti.
# ─────────────────────────────────────────────────────────────────────────────
name: e2e hunt
on:
workflow_dispatch:
inputs:
runs:
description: "How many runs at most (at 12% it takes ~18 for a 90% chance)"
giri:
description: "Quanti giri al massimo (al 12% ne servono ~18 per il 90%)"
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?"
description: "Dove cacciare. windows-latest risponde a una domanda DIVERSA: i ritentativi dell'interazione visti sulla macchina di sviluppo sono il prodotto o la contesa?"
required: false
default: "ubuntu-24.04"
type: choice
@@ -50,28 +48,20 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Engine and GeoIP downloads go through the release API with this token.
# Anonymous requests share a 60-an-hour limit per runner address and are the
# ones GitHub drops first when it is degraded (2026-11-08: timeouts for
# unauthenticated users failed the gates three times). user-install.yml stays
# anonymous on purpose: it is the user's path.
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
hunt:
name: hunt (${{ inputs.os }})
name: caccia (${{ 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.
# 18 giri da ~6 minuti piu' l'installazione. Generoso di proposito: il tetto
# qui non deve MAI essere la cosa che ferma la caccia, altrimenti torniamo a
# un job ucciso che non spiega niente, che e' il difetto di partenza.
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.
# Su Windows GitHub esegue i blocchi `run:` con POWERSHELL, non con bash, e
# il primo lancio su windows-latest e' morto in 5 minuti con un ParserError
# sulla riga `if [ "$RUNNER_OS" = "Linux" ]`. Il blocco era stato eseguito
# prima di spedirlo, come vuole la regola - ma in bash, sulla macchina di chi
# scriveva, cioe' con un interprete diverso da quello del bersaglio.
# Eseguire il blocco non basta: va eseguito con la SHELL del runner.
defaults:
run:
shell: bash
@@ -85,9 +75,8 @@ jobs:
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.
# Solo Linux: su Windows il browser si lancia sul desktop del runner, e
# `firefox-launch-matrix.yml` dimostra da mesi che li' parte davvero.
- name: System deps (xvfb + Firefox runtime libs)
if: runner.os == 'Linux'
run: |
@@ -97,58 +86,57 @@ jobs:
- name: Fetch the published firefox binary
run: echo "FF=$(python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
- name: Loop until it catches one
- name: Ciclo finche' non cattura
env:
PYTHONUNBUFFERED: "1"
INVPW_TEST_WATCHDOG_FILE: evidence/e2e-watchdog.log
INVPW_TEST_WATCHDOG_FILE: prove/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.
giri="${{ inputs.giri }}"
mkdir -p prove/giri
# `prove/` dentro lo spazio di lavoro, non RUNNER_TEMP: su Windows quella
# variabile contiene backslash e non attraversa bash in modo affidabile.
# xvfb solo dove esiste; su Windows il browser va sul desktop del runner.
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"
catturato=0
for n in $(seq 1 "$giri"); do
log="prove/giri/giro_$(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.
# Un impiccamento adesso NON e' piu' un job ucciso: la scadenza per
# test lo trasforma in un fallimento, e il banner lo nomina.
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 ---"
echo "::error::giro $n: IMPICCAMENTO CATTURATO dopo ${dur}s"
echo "--- l'ultimo test che ha parlato ---"
grep -aE "::.*(PASSED|SKIPPED|FAILED)" "$log" | tail -3
echo "--- the stack ---"
echo "--- lo stack ---"
sed -n '/Timeout/,$p' "$log" | head -60
captured=1
catturato=1
break
fi
echo "run $n/$runs: exit=$code, ${dur}s"
echo "giro $n/$giri: 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."
if [ "$catturato" = "0" ]; then
echo "::warning::$giri giri, nessun impiccamento catturato."
echo "Se il tasso qui e' lo stesso del 12%, la probabilita' di questo"
echo "esito e' $(python -c "print(round(100*0.88**$giri))")%, quindi non e' una prova"
echo "che il difetto non ci sia: e' una misura del tasso con questo campione."
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"
# Il passo fallisce SOLO se ha catturato: cosi' il rosso significa
# "trovato", non "rotto", ed e' il rosso che si va a leggere.
exit "$catturato"
- name: Upload all the evidence
- name: Portare fuori tutte le prove
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
prove/giri
prove/e2e-watchdog.log
if-no-files-found: warn
retention-days: 14
+37 -114
View File
@@ -34,43 +34,18 @@ on:
- 'docs/**'
- 'LICENSE'
workflow_dispatch:
inputs:
only:
description: "Which job. `windows-control-a` runs only the Windows job of the keyboard shortcut (after the core of a release is on the index and its engine is published); `all` runs the whole workflow."
required: false
default: "all"
type: choice
options:
- all
- windows-control-a
permissions:
contents: read
# A newer push to a pull request cancels the older in-flight run of THIS
# workflow on that pull request 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 + pull request number,
# so tests and e2e never cancel each other.
#
# NEVER on main. The release gate (scripts/e2e_is_green.py) asks for the e2e
# check-run of the commit being tagged, and a cancelled one refuses the release:
# with the group keyed by ref, the next push to main cancelled the run of the
# commit before it. Outside a pull request the group is unique to the run
# (`github.run_id`), so every commit of main keeps its own finished run, and a
# pending run is not replaced by a newer one either (a group with a fixed name
# drops the older pending run, cancel or not).
# 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.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Engine and GeoIP downloads go through the release API with this token.
# Anonymous requests share a 60-an-hour limit per runner address and are the
# ones GitHub drops first when it is degraded (2026-11-08: timeouts for
# unauthenticated users failed the gates three times). user-install.yml stays
# anonymous on purpose: it is the user's path.
env:
GITHUB_TOKEN: ${{ github.token }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# The install below resolves `invisible-core==N.M.0` from the package index,
@@ -84,7 +59,7 @@ jobs:
e2e:
name: e2e (linux, xvfb)
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true' && inputs.only != 'windows-control-a'
if: needs.core-on-index.outputs.available == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
@@ -92,21 +67,10 @@ jobs:
with: { fetch-depth: 1 }
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with: { python-version: '3.11' }
- name: Install wrapper + test deps (+ Playwright ONLY as a system tool)
- name: Install wrapper + test deps (+ pinned Playwright)
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: |
@@ -115,16 +79,6 @@ jobs:
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: The protocol mirror agrees with the engine it is pinned to
# `invisible_core.juggler.protocol` is generated from the Protocol.js INSIDE the
# shipped binary, and nothing used to tie the two together after a pin
# bump: the mirror sat at 71 commands while the pinned engine declared
# 75, with the unit test that fixes the count green the whole time,
# because a count checks the mirror against itself. This is the only
# job that has the binary, so this is where the comparison belongs.
# The generator moved into the core with the module it writes (0.30.0),
# so the check runs against the core this package installs.
run: python -m invisible_core.juggler._gen_protocol --check --binary "$(dirname "$FF")"
- name: Run the full e2e suite under a virtual display
# 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
@@ -134,45 +88,45 @@ jobs:
# 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.
# Il cane da guardia di tests/conftest.py: a 150s dentro UN test scrive
# QUI lo stack di ogni thread, e lo ripete. Due stack identici dicono
# bloccato, due diversi dicono lento - diagnosi opposte che nessun altro
# strumento distingue. Su FILE e non su stderr perche' pytest redirige i
# descrittori a livello di sistema: cio' che e' catturato si perde
# quando il processo viene ucciso, cioe' nel caso per cui esiste.
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?
# Gira SOLO se il passo sopra fallisce, e prima del 2026-08-13 non poteva
# esistere: l'impiccamento veniva ucciso dal tetto dei 40 minuti, quindi il
# job risultava `cancelled` e i passi successivi non partivano affatto. Con
# `--timeout 420 --timeout-method thread` il processo muore a 7 minuti e il
# passo fallisce NORMALMENTE, quindi da qui le prove escono.
# Uno strumento che non si vede e' indistinguibile da uno che non c'e'.
# L'annuncio che il cane da guardia stampa all'apertura del file finisce
# dentro `pytest_runtest_setup`, che pytest CATTURA: nel log del job non
# compare, quindi da qui non si poteva distinguere "armato" da "inerte".
# Questo passo glielo chiede al file, che e' l'unica prova che esista.
- name: Il cane da guardia era armato?
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)
# `|| true` e non e' cosmetico: `grep -c` che conta ZERO esce 1, e
# GitHub lancia i blocchi `run:` con `bash -e`. Senza, questo passo
# moriva esattamente sulle corse SANE - quelle con zero stack - cioe'
# avrebbe fatto fallire ogni e2e verde. Trovato eseguendo il blocco
# estratto dallo YAML nei quattro stati, non rileggendolo.
sorvegliati=$(grep -ac '^---' "$f" || true)
stack=$(grep -ac 'Timeout' "$f" || true)
echo "armed: ${watched} tests watched, ${stack} stacks written"
echo "armato: ${sorvegliati} test sorvegliati, ${stack} stack scritti"
else
echo "::warning::the watchdog file is missing or empty: the tool was NOT armed, and a hang would leave nothing"
echo "::warning::il file del cane da guardia e' assente o vuoto: lo strumento NON era armato, e un impiccamento non lascerebbe niente"
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
# `always()` e non `failure()`: il file serve anche quando la corsa e'
# verde, perche' e' l'unica prova che lo strumento funzioni.
- name: Portare fuori le prove dell'impiccamento
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
@@ -180,34 +134,3 @@ jobs:
path: ${{ runner.temp }}/e2e-watchdog.log
if-no-files-found: warn
retention-days: 14
# ``Control+A`` selects all in a field, on the PUBLISHED engine and the core this package pins, on Windows, where the keyboard of a real
# user is: the shortcut letter used to reach the browser as Control+Shift+A (invisible-core 63.66.0 fixes it). The e2e is red on the
# keyboard that held Shift for the capital A (tests/test_control_a_selects_all_in_a_field_e2e.py: 5 ways to press it x an <input> and a
# <textarea>, in-process and served to the stock Playwright client). Same gate as the Linux job: it is SKIPPED, with the reason in the
# summary, until the core is on the index, and it runs unchanged after; `workflow_dispatch` with `only: windows-control-a` runs it alone.
e2e-windows-control-a:
name: e2e (windows, Control+A)
needs: core-on-index
if: needs.core-on-index.outputs.available == 'true'
runs-on: windows-latest
timeout-minutes: 20
# `run:` blocks are PowerShell on Windows unless said otherwise (e2e-hunt.yml had a ParserError on its first launch there).
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 (the stock client is in the dev extra)
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
- name: Fetch the published firefox binary
run: echo "FF=$(python -m invisible_playwright fetch | tail -1)" >> "$GITHUB_ENV"
- name: The keyboard shortcut selects all (the browser opens on the runner's desktop, as in e2e-hunt.yml)
env:
PYTHONUNBUFFERED: "1"
run: INVPW_BINARY_PATH="$FF" python -u -m pytest -m e2e -p no:cacheprovider -v tests/test_control_a_selects_all_in_a_field_e2e.py
+10 -31
View File
@@ -13,7 +13,7 @@ name: firefox-launch-matrix
# 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.
# from `python -m invisible_playwright path`, the only thing that knows it.
on:
workflow_dispatch:
@@ -28,14 +28,6 @@ on:
permissions:
contents: read
# Engine and GeoIP downloads go through the release API with this token.
# Anonymous requests share a 60-an-hour limit per runner address and are the
# ones GitHub drops first when it is degraded (2026-11-08: timeouts for
# unauthenticated users failed the gates three times). user-install.yml stays
# anonymous on purpose: it is the user's path.
env:
GITHUB_TOKEN: ${{ github.token }}
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
@@ -90,36 +82,23 @@ jobs:
pip install .
- name: Fetch the sealed binary
shell: pwsh
run: |
$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
run: python -m invisible_playwright fetch
- 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
# ASK for the path, 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, which is indistinguishable from the
# launch bug this job exists to detect.
$ffPath = (python -m invisible_playwright path).Trim()
Write-Host "Package reports: $ffPath"
if (-not $ffPath -or -not (Test-Path $ffPath)) {
Write-Error "firefox.exe NOT FOUND at '$ffPath' (reported by fetch)"
Write-Error "firefox.exe NOT FOUND at '$ffPath' (reported by the package)"
exit 1
}
"FF_PATH=$ffPath" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
Write-Host "Launching: $ffPath --version"
# NOTE: firefox.exe --version on Windows prints the version but may
# return non-zero exit code (sub-process fork quirk). Check stdout.
+2 -47
View File
@@ -7,23 +7,6 @@
# 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.
#
# ⛔ THE RELEASE TRIGGER DOES NOT FIRE FOR THE RELEASES THIS REPOSITORY MAKES.
# GitHub does not start a workflow from an event created with the built-in
# GITHUB_TOKEN, and publish.yml creates the release - which is why every recent
# release here is authored by github-actions[bot]. Measured 2026-09-15 across
# 43 runs: all but a couple were manual dispatches, and the two `release` events
# are old enough to predate the automation. The sibling package AIHawk had the
# identical defect and the identical false sentence in this comment.
#
# The cost is the same too: since the last dispatch on 2026-09-14 the docs have
# moved by 37 insertions and 15 deletions with a release in between, and the
# published wiki was showing neither.
#
# So it also runs on a PUSH to main that touches what the wiki is made of - the
# pages, the converter, and this file - which is an event that actually happens
# here. The release trigger stays: it costs nothing and works for a release a
# person publishes. It is simply no longer what this depends on.
#
# 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
@@ -37,13 +20,6 @@
name: publish-wiki
on:
push:
branches: [main]
paths:
- "docs/**"
- "scripts/build_wiki.py"
- "scripts/sync_article_pixels.py"
- ".github/workflows/publish-wiki.yml"
release:
types: [published]
workflow_dispatch: {}
@@ -51,12 +27,9 @@ on:
permissions:
contents: write
# A publishing workflow is never cancelled half-way: the second run waits for
# the first (a newer pending run replaces an older pending one, which is
# harmless: the wiki is rebuilt in full from the repository each time).
concurrency:
group: publish-wiki
cancel-in-progress: false
cancel-in-progress: true
jobs:
publish-wiki:
@@ -71,25 +44,7 @@ jobs:
python-version: "3.12"
- name: Render docs/ into a wiki build directory
run: python scripts/build_wiki.py docs wiki_build --pixels "${{ github.repository }}"
# The view counters. Upload BEFORE the push, never after: a page that
# reaches the wiki without its asset serves a 404 for its own pixel and
# counts nothing until the next release. Uploading only what is missing
# makes this a no-op on a run that adds no pages.
- name: Give every new page its view pixel
env:
GITHUB_TOKEN: ${{ github.token }}
run: python scripts/sync_article_pixels.py --repo "${{ github.repository }}" wiki_build
# And the gate. `build_wiki.py` writes no pixel when it is not told which
# repository it is building for, which is the right default for a local
# preview and a silent disaster here: the wiki would publish, look
# perfectly normal, and count nothing. This is the step that notices.
- name: Check every page carries its own pixel
run: |
python scripts/sync_article_pixels.py --selftest
python scripts/sync_article_pixels.py --repo "${{ github.repository }}" --check wiki_build
run: python scripts/build_wiki.py docs wiki_build
- name: Publish to the wiki
env:
+10 -167
View File
@@ -30,26 +30,6 @@ on:
permissions:
contents: read
# One publish at a time per repository, whatever started it and on whatever
# ref. Two runs of one tag (a delayed delivery, or a dispatch plus the push)
# would both pass the already-published check before either had uploaded, and
# both would upload. Keyed on the ref, a dispatch on a branch and a push of the
# tag would not wait for each other, so the group is the workflow alone.
# Serialised, the second run waits for the first and then finds the version on
# the index, so it ends as a no-op. Never cancelled in progress: an upload that
# has started must be allowed to finish.
concurrency:
group: publish
cancel-in-progress: false
# Engine and GeoIP downloads go through the release API with this token.
# Anonymous requests share a 60-an-hour limit per runner address and are the
# ones GitHub drops first when it is degraded (2026-11-08: timeouts for
# unauthenticated users failed the gates three times). user-install.yml stays
# anonymous on purpose: it is the user's path.
env:
GITHUB_TOKEN: ${{ github.token }}
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
@@ -82,11 +62,6 @@ jobs:
needs: already-published
if: needs.already-published.outputs.present != 'yes'
runs-on: ubuntu-latest
# `checks: read` for the step below, which asks what the e2e concluded on
# this commit. Job level rather than workflow level: no other job needs it.
permissions:
contents: read
checks: read
steps:
- uses: actions/checkout@v4
with:
@@ -109,29 +84,6 @@ jobs:
exit 1
fi
- name: the e2e is GREEN on the commit being tagged
# ⛔ THE SUITE BELOW IS THE DEFAULT SELECTION, WHICH DESELECTS `e2e`. So
# until this step existed, the job that decides whether a release goes
# out had never looked at the suite that drives a browser: a red there
# stopped neither a merge nor a tag. 0.22.1 was tagged from a main whose
# e2e was red, and nothing said so because nothing was looking.
#
# It ASKS rather than re-runs. The e2e has already run on this commit;
# running it again here would cost five minutes to learn what one API
# call answers. What was missing was not a second measurement, it was
# somebody reading the first one.
#
# The selftest runs first, because a gate that has only ever printed
# PASS is not a gate - and this one's verdict is a pure function, so its
# ten known-bad cases cost nothing and need no network.
if: github.event_name == 'push'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/e2e_is_green.py --selftest
python scripts/e2e_is_green.py --repo "$GITHUB_REPOSITORY" --sha "$GITHUB_SHA"
- 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
@@ -173,19 +125,6 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: version gate
# The version and the ledger against what the index serves, as the
# pre-push hook checks them: in layers, not as alternatives, because the
# hook is per clone and can be missing or skipped, and this cannot
# ([B353]). Exit codes: 0 pass, 1 refused, 2 gate broken, 4 no usable
# ledger; only 0 continues. The check builds the package to compare
# it, without isolation, so the build backend is installed here: the
# dev extra carries `build` and not `hatchling`, and without it the
# check stopped as "gate broken" on the first tag (v0.40.0).
run: |
python -m pip install build hatchling
python -m invisible_core.release check --verify-index
- 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
@@ -244,61 +183,25 @@ jobs:
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.
# not exist yet, and this token has no bypass where a maintainer
# push does. 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.
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
# `record` also realigns this version's CHANGELOG heading to the upload
# date the index reports, and this is the repository that keeps a
# changelog, so this is where it matters. A file rewritten on the
# runner's disk that nobody stages is a change that never happened, and
# the whole point is that the date stops being written by hand: 0.16.2
# shipped dated a day ahead because the heading is typed at bump time,
# hours before the upload it claims to describe, in whatever timezone
# the author is in. Conditional to match the release notes step below,
# and because `git add` on a missing path fails under `bash -e`.
if [ -f CHANGELOG.md ]; then
git add CHANGELOG.md
fi
git commit -m "record $VERSION as published"
BRANCH="${{ github.event.repository.default_branch }}"
if git push origin "HEAD:refs/heads/$BRANCH"; then
if git push origin "HEAD:$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"
echo "the direct push was declined; falling back to 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"
git push -f origin "HEAD:$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" \
@@ -306,67 +209,7 @@ jobs:
-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."
echo "::error::the ledger entry for $VERSION could not be pushed OR turned into a pull request (HTTP $CODE). It exists only in this run. Back-fill it by hand from the artifacts the index serves."
exit 1
+23 -259
View File
@@ -15,139 +15,11 @@ permissions:
# 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.
# A newer push to a pull request cancels the run it supersedes. Never on main:
# outside a pull request the group is unique to the run (`github.run_id`), so
# every commit of main keeps its own finished run (see e2e.yml for why).
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Engine and GeoIP downloads go through the release API with this token.
# Anonymous requests share a 60-an-hour limit per runner address and are the
# ones GitHub drops first when it is degraded (2026-11-08: timeouts for
# unauthenticated users failed the gates three times). user-install.yml stays
# anonymous on purpose: it is the user's path.
env:
GITHUB_TOKEN: ${{ github.token }}
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
# ⛔ The gate is `invisible_core.english` since core 30.23.0, not a script of
# this repository: the script was a COPY, one here and one in AIHawk, and the
# copies drifted - this one never gained the `.js/.css/.html` coverage the
# other did. So this job needs the pinned core on the index, like `unit`.
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
run: |
python -m pip install --upgrade pip
pip install -e .
- 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. What this repository exempts is declared in
# `[tool.invisible.english]` in pyproject.toml, and an exclusion that
# names nothing is refused.
run: |
python -m invisible_core.english --selftest
python -m invisible_core.english
# A README that promises to beat everything was live here on 2026-09-22 ("it
# passes every bot detection test"), and the check that found it ran by hand,
# from outside the repository, after the text was public. The logic is
# `invisible_core.claims` since core 34.29.0, shared with the MCP server's
# repository; what this one reads is declared in `[tool.invisible.claims]`,
# and without a declaration it is the README, which is also what PyPI shows.
claims:
name: the README promises nothing it cannot support
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
run: |
python -m pip install --upgrade pip
pip install -e .
- name: check the claims
# --selftest first, for the same reason as the language gate: a check
# that has only ever printed "clean" may have gone blind.
run: |
python -m invisible_core.claims --selftest
python -m invisible_core.claims
# The way in is uv (the owner, 2026-09-06 and "uv everywhere" on 2026-10-17),
# and on that day this repository still taught pip in its README, its
# CONTRIBUTING, its docs and the messages its code prints, with nothing
# comparing any of them with the decision. `invisible_core.way_in` since core
# 49.45.0 refuses an install instruction that is not uv, in the tracked
# Markdown, the issue templates and the string literals of src/.
way-in:
name: every install instruction is uv
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
run: |
python -m pip install --upgrade pip
pip install -e .
- name: check the way in
# --selftest first: a check that has only ever printed "clean" may
# have gone blind.
run: |
python -m invisible_core.way_in --selftest
python -m invisible_core.way_in
# The user-install job installs what was published, as a user would. It ran
# on `release: published`, which never fires: the Release is created with
# GITHUB_TOKEN, and an event that token causes starts no other workflow
# ([B347], core 50.48.0). `invisible_core.install_job` judges this tree: the
# job runs on the ledger pull request, its wait for the index is scoped to it
# and bounded, and every test file it runs keeps out, in a `_LEAKS`, every
# variable the pinned core's library reads.
install-job:
name: the user-install job runs on the ledger pull request
needs: core-on-index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install the pinned core, which carries the gate
run: |
python -m pip install --upgrade pip
pip install -e .
- name: check the install job
run: |
python -m invisible_core.install_job --selftest
python -m invisible_core.install_job
# `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
@@ -200,12 +72,10 @@ jobs:
- 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.
# three repos make the assertion now, 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
@@ -260,75 +130,26 @@ jobs:
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.
# UN SOLO CONTESTO PER LA BRANCH PROTECTION. Misurato 2026-08-13: la
# protezione di questo repo richiedeva `pytest (windows-latest, py3.11)`,
# che la matrice ESCLUDE esplicitamente qualche riga piu' su - un contesto
# che nessun job puo' produrre, quindi una protezione che non poteva mai
# essere soddisfatta. Con `enforce_admins` a false ogni push passava lo
# stesso e nessuno se ne accorgeva. Stessa forma nel core e nel 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.
# Un elenco di nomi di matrice va alla deriva ogni volta che la matrice
# cambia, ed e' esattamente cosi' che ci si e' arrivati. Questo job dipende
# dalla matrice intera e il suo nome non cambia mai.
#
# 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` is the ONLY context main requires, so a check this job does not wait
# for is a check the branch protection cannot see. It waited for three of the
# five, and the two it left out are not minor ones: `english` is the gate
# written FOR this repository after 549 lines of Italian shipped here in one
# subsystem, and `version` is what stands between a forgotten bump and a
# release that publishes nothing and reports success. Either could go red
# while this job went green and the push landed on main regardless - which is
# the decorative protection this project has already met once, on the branch
# rules that required job names no job produced any more.
#
# `skipped` is not a failure and must not be treated as one: `version` runs on
# pull requests only and is skipped on every push to main, and `unit` and
# `docs-api` are skipped during the window when the pinned core is not on the
# index yet. The case arms name failure and cancelled, so a skip passes on
# purpose. That is also why each arm carries its own sentence: a gate that
# exits 1 without saying which of five inputs went red is a gate somebody has
# to open five tabs to read.
# SKIPPED NON E' FAILED, ed e' la parte specifica di questo repo. `unit` e'
# saltato di proposito quando `core-on-index` dice che il pin non e' ancora
# sull'indice: durante quella finestra nessun install puo' riuscire, e il
# workflow ha scelto di SALTARE invece di fingere verde. Un gate che
# pretendesse `success` trasformerebbe quella scelta in un rosso e
# spingerebbe a togliere la protezione proprio nel giorno del rilascio.
# Quindi si rifiuta su `failure` e `cancelled`, non su `skipped`.
gate:
needs: [core-on-index, unit, docs-api, english, claims, version, way-in, install-job]
needs: [core-on-index, unit]
if: always()
runs-on: ubuntu-latest
steps:
@@ -336,67 +157,10 @@ jobs:
run: |
echo "core-on-index: ${{ needs.core-on-index.result }}"
echo "unit: ${{ needs.unit.result }}"
echo "docs-api: ${{ needs.docs-api.result }}"
echo "english: ${{ needs.english.result }}"
echo "claims: ${{ needs.claims.result }}"
echo "way-in: ${{ needs.way-in.result }}"
echo "version: ${{ needs.version.result }}"
echo "install-job: ${{ needs.install-job.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
case "${{ needs.english.result }}" in
failure|cancelled) echo "the repository is not English"; exit 1 ;;
esac
case "${{ needs.claims.result }}" in
failure|cancelled) echo "the README promises what no measurement supports"; exit 1 ;;
esac
case "${{ needs.way-in.result }}" in
failure|cancelled) echo "an install instruction is not uv"; exit 1 ;;
esac
case "${{ needs.version.result }}" in
failure|cancelled) echo "the version this change proposes is already taken"; exit 1 ;;
esac
case "${{ needs.install-job.result }}" in
failure|cancelled) echo "the user-install job would not run on a release, or leaks"; 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
+34 -55
View File
@@ -15,16 +15,12 @@
# * 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 the installer resolves from the declaration,
# and that is what has to be under test.
# 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.
# test_release_e2e.py runs the README's install block for the runner's system
# as written - uv from its own installer, `uv init`, `uv add
# invisible-playwright` from the index, `fetch` - and then drives the browser
# from the project it made, the way somebody's first script would.
# test_upgrade_e2e.py stays on pip on purpose: it is the path of the people who
# installed before the README said uv, and they are still there.
# 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
@@ -58,25 +54,15 @@ on:
# 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"
# ⛔ THE LEDGER PULL REQUEST, not `release: published` ([B347], core
# 50.48.0). The Release is created by the publish workflow with GITHUB_TOKEN,
# and an event that token causes starts no other workflow: on `release:` this
# job had never run at release time. The ledger PR exists only after the
# upload and `record`, and merging it waits for this run, so a release does
# not close before what it published installs. `python -m
# invisible_core.install_job` checks the wiring (tests.yml).
pull_request:
paths:
- PUBLISHED.json
release:
types: [published]
permissions:
contents: read
# Only a new push to a ledger pull request cancels the run it supersedes. The
# weekly schedule and a manual run (both on main) never cancel each other.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: user-install-${{ github.ref }}
cancel-in-progress: true
jobs:
install:
@@ -102,55 +88,48 @@ jobs:
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 the ledger pull request, which the publish run
# opens seconds after the upload (it ran on `release:`, just as soon).
# 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.
# MEASURED AGAIN 2026-11-12 (0.50.1, ledger #476): the per-version JSON endpoint
# of PyPI answered at once, `pip index versions` listed 0.50.1, and the
# `pip install --upgrade` of the Linux job still resolved 0.49.1 (the Windows job,
# started later, was green). Those are three different pages of the index, and
# the job only needs the one pip installs from.
#
# So the question asked here is pip's own: `pip download invisible-playwright==X`,
# the same client, the same index, no cache. Bounded at ten minutes: a forgotten
# publish still fails, and it fails HERE, saying that the index does not have the
# version, instead of three steps later as a test that compares two versions.
# 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 the ledger pull request. A scheduled or dispatched run is not
# racing anything, and a wait there would hide a real absence behind ten
# minutes of polling.
# 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 == 'pull_request'
if: github.event_name == 'release'
shell: bash
run: |
python - <<'PY'
import os, subprocess, sys, tempfile, time, tomllib
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"]
deadline = time.monotonic() + 600
deadline = min(deadline, time.monotonic() + float(os.environ.get("INDEX_WAIT_SECONDS", "600")))
poll = float(os.environ.get("INDEX_WAIT_POLL", "15"))
url = f"https://pypi.org/pypi/{dist}/{version}/json"
deadline = time.monotonic() + 300
n = 0
said = ""
while True:
n += 1
r = subprocess.run([sys.executable, "-m", "pip", "download", "--no-deps", "--no-cache-dir",
"--disable-pip-version-check", "--quiet", "-d", tempfile.mkdtemp(),
f"{dist}=={version}"], capture_output=True, text=True)
if r.returncode == 0:
print(f"::notice::pip downloads {dist} {version} from the index (attempt {n})")
sys.exit(0)
said = (r.stderr.strip().splitlines() or [""])[-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:
minutes = int(float(os.environ.get("INDEX_WAIT_SECONDS", "600")) // 60) or 1
print(f"::error::the index does not have {dist} {version} yet, after {minutes} minutes "
f"and {n} attempts (pip said: {said})")
sys.exit(1)
time.sleep(poll)
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
+9 -18
View File
@@ -6,11 +6,9 @@ name: webrtc-e2e
# 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".
# On this Linux runner an engine older than firefox-35 never gets the synthetic
# srflx behind a SOCKS proxy (the wildcard default-route probe, fixed in
# firefox-35): test_not_blocked_behind_tcp_only_socks skips on it, naming that
# defect, and the floor below turns the skip red. From firefox-35 on, a
# missing srflx fails the test itself.
# 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 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
@@ -22,14 +20,6 @@ on:
permissions:
contents: read
# Engine and GeoIP downloads go through the release API with this token.
# Anonymous requests share a 60-an-hour limit per runner address and are the
# ones GitHub drops first when it is degraded (2026-11-08: timeouts for
# unauthenticated users failed the gates three times). user-install.yml stays
# anonymous on purpose: it is the user's path.
env:
GITHUB_TOKEN: ${{ github.token }}
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
@@ -59,7 +49,10 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Fetch the patched Firefox binary and expose its path
- name: Fetch the patched Firefox binary
run: python -m invisible_playwright fetch
- name: Resolve binary path
shell: bash
run: |
# NOT `echo "VAR=$(cmd)" >> $GITHUB_ENV`. echo exits 0 whatever the
@@ -68,11 +61,9 @@ jobs:
# `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)"
BIN="$(python -m invisible_playwright path)"
if [ -z "$BIN" ] || [ ! -e "$BIN" ]; then
echo "invisible_playwright fetch returned '$BIN', which is not a" >&2
echo "invisible_playwright path returned '$BIN', which is not a" >&2
echo "file. Refusing to run a suite that would skip itself green." >&2
exit 1
fi
+2 -2651
View File
File diff suppressed because it is too large. Load diff
+13 -13
View File
@@ -4,20 +4,20 @@ Thanks for your interest in improving this project. Contributions are welcome vi
## Quick links
- **Bug or idea?** Open an [issue](https://github.com/feder-cr/invisible_playwright/issues/new/choose).
- **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/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch) (branch `stealth/151`). Bugs in fingerprint spoofing usually belong there.
- **The C++ patches** live in the companion repo [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch) (branch `stealth/150`). Bugs in fingerprint spoofing usually belong there.
## Scope
This repository ships the **Python wrapper** (`invisible_playwright`) around a pre-built patched Firefox. In scope:
- The `InvisiblePlaywright` sync and async API, and its Playwright compatibility layer
- The CLI (`invisible-playwright fetch`, `invisible-playwright version`)
- The `InvisiblePlaywright` sync/async API and launcher
- The fingerprint sampler (`_fpforge`)
- Binary download/caching, CLI, proxy plumbing
- Tests, docs, examples, packaging
The fingerprint, the engine download and the browser protocol client are shared by every wrapper and live in [invisible_core](https://github.com/feder-cr/invisible_core).
Out of scope (belongs in `firefox_antidetect_patch`):
- Changes to the Firefox C++ source
@@ -26,19 +26,19 @@ Out of scope (belongs in `firefox_antidetect_patch`):
## Development setup
To *use* the package you do not need any of this: see [Install](README.md#install) in the README.
The steps below are for working on the code, with [uv](https://docs.astral.sh/uv/).
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
uv venv
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
invisible-playwright fetch # download the patched Firefox binary
pip install -e ".[dev]"
python -m invisible_playwright fetch # download the patched Firefox binary
```
One of: Windows x86_64, Linux x86_64.
Requires Python 3.11+ and one of: Windows x86_64, Linux x86_64.
## Running tests
@@ -72,7 +72,7 @@ Before opening, please:
Include:
- OS and version, Python version, the output of `invisible-playwright version`
- OS and version, Python version, `invisible_playwright` version (`invisible_playwright version`)
- A minimal reproduction
- Expected vs actual behavior
- Relevant logs / stack traces
-35092
View File
File diff suppressed because it is too large. Load diff
+56 -176
View File
@@ -1,19 +1,20 @@
<p align="center">
<b>Trouble with captchas - reCAPTCHA, hCaptcha, Turnstile? With proxies? Is your headless browser detected every time?</b><br>
<sub>Join the group and ask. Someone in there has already solved it.</sub>
</p>
<p align="center">
<a href="https://t.me/scrapingtheweb"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/telegram.svg" alt="Join on Telegram" height="38"></a>
</p>
<h2></h2>
<div align="center">
<picture>
<source media="(max-width: 374px) and (prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-small-dark.gif">
<source media="(max-width: 374px)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-small-light.gif">
<source media="(max-width: 1239px) and (prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-phone-dark.gif">
<source media="(max-width: 1239px)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-phone-light.gif">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-dark.gif">
<img alt="invisible_playwright, Playwright on an anti-detect Firefox. An animation: the two-line switch from Playwright, the fingerprint set inside the engine, a mouse that moves like a hand, and the bot tests it passes." src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/banner-light.gif" width="100%">
<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>
<p align="center">
<a href="https://github.com/feder-cr/invisible_playwright/blob/badges/counters/launches_daily.csv"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffeder-cr%2Finvisible_playwright%2Fbadges%2Fdocs%2Fbadges%2Flaunches.json&style=for-the-badge" alt="browser launches"></a>
<a href="https://github.com/feder-cr/firefox_antidetect_patch/releases"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffeder-cr%2Finvisible_playwright%2Fbadges%2Fdocs%2Fbadges%2Fdownloads.json&style=for-the-badge" alt="engine downloads"></a>
<a href="https://github.com/feder-cr/invisible_playwright/stargazers"><img src="https://img.shields.io/github/stars/feder-cr/invisible_playwright?style=for-the-badge&logo=github&color=e8a317" alt="GitHub stars"></a>
</p>
<h3 align="center">Playwright gets caught by anti-bots and captchas.<br>
This one runs on an anti-detect Firefox with an undetected fingerprint, compatible with your existing Playwright code.</h3>
<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>
![invisible_playwright - 5/5 detection suites passed](https://raw.githubusercontent.com/feder-cr/invisible_playwright/7a8693c6b4386e9a84dd93bedc479ca8654482e1/docs/screenshots/hero.gif)
@@ -32,41 +33,29 @@ Anti-bots ask two questions, and reCAPTCHA, hCaptcha and Cloudflare Turnstile sc
- 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.
Driven by the standard Playwright API. Full breakdown: [feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch).
---
## 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
Windows, in PowerShell:
```powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
$env:Path = "$env:USERPROFILE\.local\bin;$env:Path"
uv init --python ">=3.11" my-project
cd my-project
uv add invisible-playwright
uv run invisible-playwright fetch # one-time download, sha256-verified: 240 MB, about 550 MB unpacked
```
Linux:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
uv init --python ">=3.11" my-project
cd my-project
uv add invisible-playwright
uv run invisible-playwright fetch # one-time download, sha256-verified: 262 MB, about 550 MB unpacked
pip install invisible-playwright
python -m invisible_playwright fetch # one-time ~238 MB download (~544 MB unpacked), sha256-verified
```
Supported platforms: **Windows x86_64**, **Linux x86_64**. Linux arm64 is no longer supported from firefox-56 (firefox-55 is the last engine built for it).
Then save one of the examples below as `main.py` in `my-project` and run it with `uv run main.py`.
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`.
---
## Usage
### Random fingerprint per session
**Playwright's API, sync and async, with no code changes.** The same objects, the same calls, the same return values. A few surfaces are out of scope - tracing, HAR, CDP, the API request context - and each one refuses with a sentence saying why rather than misbehaving quietly. If you already use Playwright, switching is two lines:
**100% Playwright-compatible** - sync and async, all methods, zero API changes. If you already use Playwright, switching is two lines:
```diff
- from playwright.sync_api import sync_playwright
@@ -130,50 +119,6 @@ with InvisiblePlaywright(proxy=proxy) as browser:
Schemes supported: `socks5`, `socks4`, `http`, `https`. DNS is routed through the proxy by default, no local leak.
### Serving one browser to many clients
`launch_server()` serves one browser on a WebSocket to any Playwright client. Install the
extra that carries the WebSocket library with `uv add "invisible-playwright[remote]"`.
```python
# server.py
from invisible_playwright import launch_server
with launch_server(seed=42, headless=True) as server:
print(server.ws_endpoint) # ws://127.0.0.1:<port>/<secret>
input("serving, press Enter to stop")
```
```python
# client.py: any Playwright client; this one is Playwright for Python (uv add playwright)
import sys
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.firefox.connect(sys.argv[1]) # the address the server printed
page = browser.new_page()
page.goto("https://example.com")
print(page.title())
browser.close() # ends this client; the server's browser keeps running
```
The server listens on `127.0.0.1` with a random secret path; `host=`, `port=` and `path=` choose
another address. A client in another language (Node, Java, .NET, Go) connects to the same
address with the `connect` call of its own Playwright. The browser belongs to the server and
ends with `server.close()` (or with the `with` block).
On Linux, set `MALLOC_ARENA_MAX=2` in the environment of the process that runs it (glibc keeps a memory
arena per thread otherwise); the server already hands freed memory back with `malloc_trim`
(`INVPW_MALLOC_TRIM=0` turns that off).
The server keeps its protocol objects in a registry and, like Playwright's own server,
collects the oldest ones when a type grows past a limit (`__dispose__` with reason `gc`).
Its limits are Playwright's, except `Request`, `Response` and `Route`, which are 2000
instead of 10000, and nothing younger than 10 seconds is ever collected. A client that
keeps more than 2000 requests or responses in hand for longer than that gets "Target
closed" on the oldest ones; one that uses them inside its callback is not affected. Set
`INVPW_GC_LIMITS="Request=10000,Response=10000,Route=10000"` to get Playwright's numbers.
### Timezone
The browser timezone follows `timezone=`:
@@ -197,8 +142,8 @@ By default everything comes from `seed`. To force specific values while the rest
with InvisiblePlaywright(
seed=42,
pin={
"gpu.renderer": "ANGLE (AMD, Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0, D3D11)",
"gpu.vendor": "Google Inc. (AMD)",
"gpu.renderer": "ANGLE (NVIDIA, NVIDIA GeForce RTX 4090 Direct3D11)",
"gpu.vendor": "Google Inc. (NVIDIA)",
"screen.width": 2560,
"screen.height": 1440,
"hardware.concurrency": 16,
@@ -207,18 +152,8 @@ with InvisiblePlaywright(
...
```
A GPU pin picks one of the validated personas rather than setting a free string,
because the ~81 `getParameter` values and the extension list travel with the
renderer name and a detector cross-checks them against it. A name the pool does
not carry raises, and the error lists the ones it does.
Full list of pinnable keys, how pinning interacts with the Bayesian sampler, and common patterns are in **[docs/pinning.md](docs/pinning.md)**.
### Launch counter
The engine counts launches with an anonymous GET to the `usage-counter` release of the engine's repository (`feder-cr/firefox_antidetect_patch`) on GitHub. This package's launcher and server refuse the two prefs that govern it, `invisible_firefox.usage_ping.enabled` and `invisible_firefox.usage_ping.url`, in `extra_prefs`.
---
## CLI
@@ -235,16 +170,6 @@ invisible-playwright version # wrapper, core and engine versions, and where the
## Documentation, guides and comparisons
**If you would rather prompt than script.** This page is the engine, as a Python
library. Two ways to use it without writing code, both one line: from an MCP client
you already have (Claude Code, Claude Desktop, Cursor),
`claude mcp add stealth -- uvx invisible-playwright-mcp`, see
[the MCP server page](https://github.com/feder-cr/invisible_playwright_mcp/wiki/mcp-server); or with an
interface and a model included, needing only an OpenRouter key,
`uvx invisible-playwright-mcp ui --openrouter-key sk-or-...`, see
[invisible_playwright_mcp](https://github.com/feder-cr/invisible_playwright_mcp). Same engine underneath, and the second
is a client of the first.
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:
@@ -268,90 +193,43 @@ is the map most other pages link back to, [Playwright detected as a bot on one s
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
**The other pieces of this one.** The engine is the middle of three, and the
two around it are how most people reach it:
- **[invisible_core](https://github.com/feder-cr/invisible_core)** - seed to
fingerprint to preferences, plus proxy and geolocation. This package pins it.
- **[invisible_playwright_mcp](https://github.com/feder-cr/invisible_playwright_mcp)** - this engine as an MCP
server (`uvx invisible-playwright-mcp`, 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.** Which one 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 reach, and [AI browser agents and stealth](docs/ai-browser-agents-stealth.md)
covers the frameworks that pick Chromium over CDP for you.
The open-source neighbours, and what each one is for.
**On the Firefox side**
- **[Camoufox](https://github.com/daijro/camoufox)** - patches C++ too, wider surface, ships a fingerprint database instead of deriving one from a seed. [Comparison](docs/vs-camoufox.md).
- **[LibreWolf](https://librewolf.net)** - a privacy-defaults Firefox to browse with, not to automate.
- **[arkenfox/user.js](https://github.com/arkenfox/user.js)** - hardening through preferences. Where a preference is enough, use it.
- **[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: the work lands in the driver, not the binary. [Comparison](docs/vs-patchright.md).
- **[nodriver](https://github.com/ultrafunkamsterdam/nodriver)** - successor to `undetected-chromedriver`, driving Chrome over CDP. [Comparison](docs/vs-nodriver.md).
- **[rebrowser-patches](https://github.com/rebrowser/rebrowser-patches)** - fixes the `Runtime.enable` CDP leak. [Comparison](docs/vs-rebrowser-patches.md).
- **[fingerprint-suite](https://github.com/apify/fingerprint-suite)** - a Bayesian fingerprint generator, then injected into the page. [Comparison](docs/vs-fingerprint-suite.md).
- **[playwright-with-fingerprints](https://github.com/bablosoft/playwright-with-fingerprints)** - values from a paid remote service, Windows-only. [Comparison](docs/vs-playwright-with-fingerprints.md).
- **[playwright-stealth](https://github.com/Mattwmaster58/playwright_stealth)** - an init-script patch; its maintainer calls it a proof-of-concept. [Comparison](docs/vs-playwright-stealth.md).
- **[puppeteer-extra-plugin-stealth](https://github.com/berstend/puppeteer-extra)** - the original of that lineage, last substantive commit mid-2024. [What that means](docs/puppeteer-extra-stealth-unmaintained.md).
- **[selenium-stealth](https://github.com/diprajpatra/selenium-stealth)** - the same approach on Selenium, last commit December 2021. [What that means](docs/selenium-stealth-unmaintained.md).
- **[pyppeteer](https://github.com/pyppeteer/pyppeteer)** - unmaintained by its own README, which points to `playwright-python`. [What that recommendation is about](docs/pyppeteer-unmaintained-playwright.md).
- **[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.
## What is patched in the engine
Two rules hold across everything below. Every value is decided **before a page can
ask**, inside the browser, so there is no JavaScript shim to find. And every value
comes from **one profile**, so no two surfaces contradict each other, which is how a
spoofed browser is usually caught. Source:
[feder-cr/firefox_antidetect_patch](https://github.com/feder-cr/firefox_antidetect_patch).
**Identity**
- `navigator`, the user agent and the client hints are derived together, so they cannot disagree: [does Playwright set navigator.webdriver](docs/does-playwright-set-navigator-webdriver.md), [client hints and Sec-Fetch](docs/client-hints-sec-fetch.md).
- `navigator.languages` and the `Accept-Language` header are the same declaration, sent and read: [Accept-Language and navigator.languages](docs/accept-language-navigator-languages.md).
- Screen geometry, `devicePixelRatio` and the media queries exposing it are declared, not read from the host: [devicePixelRatio and the Firefox pref](docs/devicepixelratio-firefox-pref.md), [CSS media query fingerprinting](docs/css-media-query-fingerprinting.md).
**Rendering**
- Canvas readback is deterministic per seed and keeps the real shape, rather than blocked or noised: [canvas fingerprint noise](docs/canvas-fingerprint-noise.md), [why a canvas fingerprint changes every run](docs/canvas-fingerprint-changes-every-run.md).
- WebGL reports a coherent GPU persona: vendor, renderer and the parameter limits are cross-checked, not set one at a time: [WebGL renderer strings](docs/webgl-renderer-strings.md), [WebGL parameters are identical](docs/webgl-parameters-are-identical.md).
- Fonts ship with the browser, so the same faces exist on every host and the platform font engine no longer chooses: [bundled fonts across platforms](docs/bundled-fonts-cross-platform.md), [why headless browsers render different fonts](docs/headless-fonts-differ.md), [detecting installed fonts from JavaScript](docs/detect-installed-fonts-javascript.md).
- Text metrics follow those fonts: `measureText` returns ten-plus numbers from one call, with no permission prompt: [measureText and TextMetrics](docs/measuretext-textmetrics-fingerprinting.md).
- Canvas and WebGL agree across operating systems for the same seed: [cross-platform consistency](docs/canvas-webgl-cross-platform-consistency.md), [canvas differs across operating systems](docs/canvas-differs-across-operating-systems.md).
**Audio and media**
- The audio stack answers from the profile rather than from the host device: [AudioContext fingerprinting](docs/audiocontext-fingerprinting.md), [sample rate and latency](docs/audiocontext-samplerate-latency-fingerprint.md).
- The codec table is declared, so a Linux host does not answer a Windows question with Linux support: [codec fingerprinting](docs/codec-fingerprinting.md).
**Network**
- WebRTC offers one synthetic candidate carrying the proxy exit, instead of leaking the real address or offering none, which is itself a tell: [WebRTC ICE candidate spoofing](docs/webrtc-ice-candidate-spoofing.md), [does the WebRTC IP match the proxy exit](docs/webrtc-ip-match-proxy-exit.md).
- DNS resolves through the proxy, including when the proxy is not in the preferences: [does a proxy leak DNS](docs/does-a-proxy-leak-dns-doh-explained.md), [how to check for a proxy IP leak](docs/how-to-check-proxy-ip-leak.md).
- The timezone comes from the egress IP, resolved offline, so it matches the exit: [timezone and proxy mismatch](docs/timezone-proxy-mismatch.md), [offline GeoIP timezone](docs/offline-geoip-timezone-proxy.md).
**The automation layer**
- Input events come from the real input path, so `isTrusted` is true because it is true: [Playwright clicks and isTrusted](docs/playwright-clicks-istrusted.md).
- The pointer follows a human path and timing, at a cadence a real device could produce: [human mouse movement](docs/human-mouse-movement.md), [mouse dynamics as behavioural biometrics](docs/mouse-dynamics-behavioural-biometrics.md).
- The debugger surface does not answer the timing questions that give a driven browser away: [debugger timing detection](docs/debugger-timing-detection.md).
- Closed-mode shadow roots are reachable, which stock Playwright cannot do in either engine, while the page still reads `null`: [closed shadow roots](docs/closed-shadow-root-playwright.md).
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).
---
@@ -376,5 +254,7 @@ This project is for educational purposes only. It is provided as-is, with no war
<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 159.0"></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>
<a href="https://github.com/feder-cr/invisible_playwright/stargazers"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/stars.svg" alt="GitHub stars"></a>
<a href="https://github.com/feder-cr/invisible_firefox/releases/tag/usage-counter"><img src="https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/badges/launches.svg" alt="browser launches"></a>
</p>
-11
View File
@@ -1,11 +0,0 @@
[
{"id": "wrapper.e2e.udp", "giro": "G2", "os": ["linux", "windows"], "min_tests": 43, "exact": true, "tests": ["tests/test_preload_newtab_turns_the_privileged_about_process_off_e2e.py", "tests/test_the_association_is_ready_when_the_peerconnection_is_born_e2e.py", "tests/test_turn_over_tcp_is_tried_for_real_e2e.py", "tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy", "tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_when_the_exit_of_the_lab_is_loopback", "tests/test_declared_host_network_e2e.py", "tests/test_a_page_over_ipv6_gathers_on_a_machine_declared_without_it_e2e.py", "tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_a_host_with_ipv6_addresses_gathers_through_an_ipv4_relay", "tests/test_webrtc_realness.py::test_a_gateway_that_is_far_away_still_gives_the_page_a_srflx_born_through_its_relay", "tests/test_webrtc_realness.py::test_the_first_candidate_of_a_gather_does_not_wait_for_a_gateway_that_is_far_away", "tests/test_webrtc_realness.py::test_a_gather_after_the_page_loaded_through_the_gateway_costs_only_the_road_to_the_server", "tests/test_webrtc_realness.py::test_two_contexts_with_two_proxies_each_gets_the_srflx_of_its_own", "tests/test_webrtc_realness.py::test_the_turn_over_tcp_of_a_context_goes_through_the_proxy_of_that_context", "tests/test_webrtc_realness.py::test_a_proxy_that_does_not_relay_udp_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_udp_leaves_from_another_address_gives_no_srflx_at_all", "tests/test_webrtc_realness.py::test_a_proxy_whose_relay_never_answers_gives_no_srflx_at_all"], "marker": "e2e", "needs_root": false, "note": "Needs the candidate binary (STEALTHFOX_E2E_BINARY) and the engine that carries the UDP line. 57 = 1+7+6+1+21 from the five files + 21 from the 10 UDP-line tests of test_webrtc_realness.py (parametrized). The chain by name is here in its variant with the lab's exit on loopback (127.0.0.2) and the pref `media.peerconnection.ice.loopback`, on Linux and Windows: the exit of the lab is loopback, and a loopback mapped address is thrown away by nICEr unless the ICE context allows it. The variant without the pref (an exit that is not loopback) is the suite wrapper.e2e.udp.exit, Linux only; the address added to the interface of the Windows runner is work of the release after firefox-63. The preload_newtab test (2) is here: seen green on Linux as root (Docker) and on Windows 10 runs of 10 (windows-2022, round 5 engine); it reads the engine's own process log."},
{"id": "wrapper.e2e.udp.exit", "giro": "G2", "os": ["linux"], "min_tests": 7, "exact": true, "tests": ["tests/test_the_whole_udp_chain_by_name_e2e.py::test_a_turn_srflx_by_name_arrives_through_the_relay_before_the_tick", "tests/test_a_proxy_that_cannot_carry_udp_leaks_nothing_direct_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Linux only, and not collected on Windows: the exit of the lab is a documentation address (198.51.100.9) added to lo with `ip addr add`, which needs root and iproute2; a mapped address in 127/8 would be thrown away by nICEr as bogus (stun_client_ctx.cpp nr_stun_transport_addr_check) and the pref that allows it is off in a product. The page reads a srflx equal to the gateway exit and the relay of the TURN server, the TURN name resolved by the DoH through the proxy, in the tick of 2 s. On the Windows runner of GitHub (administrator, the network of the runner) it could run too: not yet. A skipped test would turn the verdict red, hence a suite of its own. Its twin with the lab's exit on loopback and the pref stays in wrapper.e2e.udp on both systems, so that Windows keeps the walk of the chain by name."},
{"id": "wrapper.e2e.udp.sandbox", "giro": "G2", "os": ["linux"], "min_tests": 13, "exact": true, "tests": ["tests/test_the_socket_process_is_sandboxed_e2e.py", "tests/test_webrtc_realness.py::test_the_gather_is_real_without_a_proxy", "tests/test_webrtc_realness.py::test_a_gateway_with_coherent_udp_gives_the_page_a_srflx_born_through_its_relay", "tests/test_ice_names_by_the_context_proxy_e2e.py::test_a_gateway_without_udp_resolves_the_ice_name_then_ends_in_701"], "marker": "e2e", "needs_root": false, "note": "The browser WITH its sandbox, run by a normal user, as on any Linux that allows user namespaces. On the Ubuntu 24.04 runner AppArmor refuses them to a user, so every other non-root suite runs a browser WITHOUT the sandbox of its socket and content processes; the gate turns the restriction off for this leg (sysctl kernel.apparmor_restrict_unprivileged_userns=0) and the first test fails unless the socket and a tab process have a seccomp filter (Seccomp: 2). The three situations of the UDP line: A (a proxy that carries UDP: the srflx born through the relay), B (no proxy: the gather is real), C (a proxy with no UDP: the ICE server name goes by DoH through the proxy and the gather ends in 701). No root and no resolver trap needed."},
{"id": "wrapper.e2e.web", "giro": "G2", "os": ["linux", "windows"], "min_tests": 27, "exact": true, "tests": ["tests/test_networkidle_through_a_served_browser_with_routes_e2e.py", "tests/test_http3_through_the_proxy_e2e.py"], "marker": "e2e", "needs_root": false, "note": "The networkidle e2e with routes and the HTTP/3 e2e, split from wrapper.e2e.udp (about 260 s of 500 on Linux; the whole suite did not fit the 15 minutes of Windows)."},
{"id": "wrapper.e2e.doh", "giro": "G2", "os": ["linux", "windows"], "min_tests": 19, "exact": true, "tests": ["tests/test_the_hosts_file_of_the_host_is_never_read_e2e.py", "tests/test_resolver_race_e2e.py", "tests/test_doh_under_stress_e2e.py", "tests/test_context_proxy_only_resolves_by_doh_e2e.py", "tests/test_doh_through_the_proxy_e2e.py", "tests/test_ice_names_by_the_context_proxy_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "Linux needs root: the resolver trap of the file (ResolverTrap) points /etc/resolv.conf at a counting resolver on port 53. Su Windows il resolver trap non gira: l'asserzione sul resolver di sistema è l'unica omessa. Run it without xdist (port 53 is one per host). On the Linux leg the gate exports INVPW_REQUIRE_TRAP=1: a trap that cannot run or bind port 53 is a failure, not a skipped assertion."},
{"id": "wrapper.e2e.realness", "giro": "G2", "os": ["linux", "windows"], "min_tests": 32, "exact": true, "tests": ["tests/test_realness_behind_a_declared_exit_e2e.py"], "marker": "e2e", "needs_root": ["linux"], "note": "The realness check without a real proxy: six declared exits, the values a page reads, and the roads. Linux runs as root without xdist like the DoH suite (the resolver trap); on Windows the trap does not exist and the assertion on the system resolver is the only one omitted."},
{"id": "wrapper.unit.udp", "giro": "G1", "os": ["linux", "windows"], "min_tests": 221, "exact": true, "tests": ["tests/test_a_served_launch_cannot_turn_the_launch_counter_off.py", "tests/test_the_witness_picks_a_port_both_sockets_bind.py", "tests/test_preload_newtab_reaches_the_core_only_when_asked.py", "tests/test_the_resolver_trap_counts_its_own_users.py", "tests/test_the_doh_e2e_launch_on_a_virtual_display.py", "tests/test_the_realness_helpers.py", "tests/test_the_h3_line_helpers.py", "tests/test_the_fake_doh_delays_and_refuses.py", "tests/test_the_host_address_helper.py", "tests/test_the_udp_chain_helper.py", "tests/test_the_fake_doh_answers.py", "tests/test_doh_session_prefs_unit.py", "tests/test_the_leak_watcher_sees_a_direct_connection.py", "tests/test_the_http_proxy_helper_asks_for_credentials.py", "tests/test_every_route_command_is_answered_may_fail.py", "tests/test_the_network_declaration_reaches_the_engine.py", "tests/test_the_resolver_trap_is_required_by_the_gate.py", "tests/test_the_exit_of_a_context_is_discovered_through_its_own_gateway.py", "tests/test_the_witness_hears_a_direct_send.py"], "marker": "unit", "needs_root": false, "note": "92 = 6+32+21+7+8+3+9+6. The leak watcher file defines exactly one of its two resolver-trap tests per host (7 everywhere), so no test is skipped. `exact`: min_tests is raised by hand when a test is added."},
{"id": "wrapper.e2e.page", "giro": "G2", "os": ["linux", "windows"], "min_tests": 115, "exact": true, "tests": ["tests/test_a_tiny_download_on_a_served_browser_is_saved_e2e.py", "tests/test_a_page_that_moves_on_e2e.py", "tests/test_a_popup_is_reported_when_the_engine_says_it_is_ready_as_playwright_does_e2e.py", "tests/test_a_popup_of_a_link_reaches_the_client_e2e.py", "tests/test_popup_destinations_e2e.py", "tests/test_popups_reach_the_client_e2e.py", "tests/test_route_superseded_e2e.py"], "marker": "e2e", "needs_root": false, "note": "114 = 100 + the 14 of test_a_page_that_moves_on_e2e.py (a navigation the page overtook with location.replace ends; the engine fix 860ef8a6d9 is proved by it). 100 counted at the collection; was 96 = 10+32+16+34+4 before the popup tests of 6200bc2). A page is handed over when the engine says Page.ready; a popup reaches the client (link, noopener, window.open; own site and another; with and without a route; in-process and over launch_server) as Playwright's does; a superseded route. Needs the candidate binary, and the stock Playwright client of the dev extra."},
{"id": "wrapper.unit.page", "giro": "G1", "os": ["linux", "windows"], "min_tests": 44, "exact": true, "tests": ["tests/test_a_download_finished_before_it_was_announced_is_finished.py", "tests/test_every_order_of_the_events_of_a_popup_gives_one_page_event.py", "tests/test_ci_drive_gate_goes_through_the_core.py", "tests/test_a_page_is_handed_over_only_when_the_engine_says_it_is_ready.py", "tests/test_a_new_page_waits_for_the_engine.py", "tests/test_page_number_follows_the_call.py"], "marker": "unit", "needs_root": false, "note": "24 (counted at the collection; was 20 = 3+8+1+8 before 6200bc2). The page dispatcher's wait for Page.ready and what it hands over; the drive gate goes through the core (the engine waits for the session's road)."}
]
+3875
View File
File diff suppressed because it is too large. Load diff
+107
View File
@@ -0,0 +1,107 @@
day_utc,launches
2026-08-06,43902
2026-08-07,47483
2026-08-08,68985
2026-08-09,75299
2026-08-10,79120
2026-08-11,82291
2026-08-12,80847
2026-08-13,57613
2026-08-14,117227
2026-08-15,90144
2026-08-16,89517
2026-08-20,48
2026-08-21,72
2026-08-22,95
2026-08-23,144
2026-08-24,243
2026-08-25,118
2026-08-26,16
2026-08-27,754
2026-08-28,2617
2026-08-29,3373
2026-08-30,4837
2026-08-31,7659
2026-09-01,20643
2026-09-02,20388
2026-09-03,20897
2026-09-04,24253
2026-09-05,17769
2026-09-06,30024
2026-09-07,30598
2026-09-08,30627
2026-09-09,33608
2026-09-10,32708
2026-09-11,36429
2026-09-12,20820
2026-09-13,21215
2026-09-14,22865
2026-09-15,20973
2026-09-16,23391
2026-09-17,22358
2026-09-18,21594
2026-09-19,21910
2026-09-20,21781
2026-09-21,22973
2026-09-22,26919
2026-09-23,25595
2026-09-24,23369
2026-09-25,28670
2026-09-26,19867
2026-09-29,27963
2026-09-30,27972
2026-10-01,27639
2026-10-02,28570
2026-10-03,26792
2026-10-04,28722
2026-10-05,30100
2026-10-06,29412
2026-10-07,28235
2026-10-08,33668
2026-10-09,37187
2026-10-10,39522
2026-10-11,40271
2026-10-12,43620
2026-10-13,53059
2026-10-14,51631
2026-10-15,53094
2026-10-16,53945
2026-10-17,53686
2026-10-18,55090
2026-10-19,59207
2026-10-20,61199
2026-10-21,60832
2026-10-22,63064
2026-10-23,61741
2026-10-24,61546
2026-10-25,123954
2026-10-26,63404
2026-10-27,61405
2026-10-28,63297
2026-10-29,62917
2026-10-30,62435
2026-10-31,61738
2026-11-01,64895
2026-11-08,105447
2026-11-09,129333
2026-11-10,123111
2026-11-11,134869
2026-11-12,130378
2026-11-13,132793
2026-11-14,126169
2026-11-15,127694
2026-11-16,136873
2026-11-17,128657
2026-11-18,132390
2026-11-19,132299
2026-11-20,133197
2026-11-21,132589
2026-11-22,139563
2026-11-23,158681
2026-11-24,137658
2026-11-25,142632
2026-11-26,146716
2026-11-29,145865
2026-11-30,180952
2026-12-01,169518
2026-12-04,173851
1 day_utc launches
2 2026-08-06 43902
3 2026-08-07 47483
4 2026-08-08 68985
5 2026-08-09 75299
6 2026-08-10 79120
7 2026-08-11 82291
8 2026-08-12 80847
9 2026-08-13 57613
10 2026-08-14 117227
11 2026-08-15 90144
12 2026-08-16 89517
13 2026-08-20 48
14 2026-08-21 72
15 2026-08-22 95
16 2026-08-23 144
17 2026-08-24 243
18 2026-08-25 118
19 2026-08-26 16
20 2026-08-27 754
21 2026-08-28 2617
22 2026-08-29 3373
23 2026-08-30 4837
24 2026-08-31 7659
25 2026-09-01 20643
26 2026-09-02 20388
27 2026-09-03 20897
28 2026-09-04 24253
29 2026-09-05 17769
30 2026-09-06 30024
31 2026-09-07 30598
32 2026-09-08 30627
33 2026-09-09 33608
34 2026-09-10 32708
35 2026-09-11 36429
36 2026-09-12 20820
37 2026-09-13 21215
38 2026-09-14 22865
39 2026-09-15 20973
40 2026-09-16 23391
41 2026-09-17 22358
42 2026-09-18 21594
43 2026-09-19 21910
44 2026-09-20 21781
45 2026-09-21 22973
46 2026-09-22 26919
47 2026-09-23 25595
48 2026-09-24 23369
49 2026-09-25 28670
50 2026-09-26 19867
51 2026-09-29 27963
52 2026-09-30 27972
53 2026-10-01 27639
54 2026-10-02 28570
55 2026-10-03 26792
56 2026-10-04 28722
57 2026-10-05 30100
58 2026-10-06 29412
59 2026-10-07 28235
60 2026-10-08 33668
61 2026-10-09 37187
62 2026-10-10 39522
63 2026-10-11 40271
64 2026-10-12 43620
65 2026-10-13 53059
66 2026-10-14 51631
67 2026-10-15 53094
68 2026-10-16 53945
69 2026-10-17 53686
70 2026-10-18 55090
71 2026-10-19 59207
72 2026-10-20 61199
73 2026-10-21 60832
74 2026-10-22 63064
75 2026-10-23 61741
76 2026-10-24 61546
77 2026-10-25 123954
78 2026-10-26 63404
79 2026-10-27 61405
80 2026-10-28 63297
81 2026-10-29 62917
82 2026-10-30 62435
83 2026-10-31 61738
84 2026-11-01 64895
85 2026-11-08 105447
86 2026-11-09 129333
87 2026-11-10 123111
88 2026-11-11 134869
89 2026-11-12 130378
90 2026-11-13 132793
91 2026-11-14 126169
92 2026-11-15 127694
93 2026-11-16 136873
94 2026-11-17 128657
95 2026-11-18 132390
96 2026-11-19 132299
97 2026-11-20 133197
98 2026-11-21 132589
99 2026-11-22 139563
100 2026-11-23 158681
101 2026-11-24 137658
102 2026-11-25 142632
103 2026-11-26 146716
104 2026-11-29 145865
105 2026-11-30 180952
106 2026-12-01 169518
107 2026-12-04 173851
+7 -18
View File
@@ -54,8 +54,7 @@ gets a collapsible block; expand it and the two things worth reading are:
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
timeline looks like a browser talking to a STUN server rather than fabricating an
answer instantly.
## The three states a leak site collapses into one
@@ -85,8 +84,8 @@ host` line, WebRTC is handing out your internal network address. A stock browser
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:
**Correct host.** The same candidate with the address replaced by a per-session mDNS
name:
```text
candidate:0 1 UDP 2122252543 3f1c9a7e-....local 51894 typ host
@@ -146,16 +145,9 @@ PROXY = {"server": "socks5://gate.example.com:1080", "username": "u", "password"
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.
# A peer connection has to exist before about:webrtc has anything to show.
page.goto("https://example.com")
page.evaluate("""
async () => {
const pc = new RTCPeerConnection();
pc.createDataChannel('x');
await pc.setLocalDescription(await pc.createOffer());
}
""")
page.evaluate("new RTCPeerConnection().createDataChannel('x')")
inspector = browser.new_page()
inspector.goto("about:webrtc")
@@ -260,11 +252,8 @@ not neutral; it is a shape no ordinary browser has, so assert presence, not abse
## 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.
- Firefox's built-in `about:webrtc` and `about:config` pages, read directly rather
than through a third-party summary.
- 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
+17 -34
View File
@@ -12,9 +12,8 @@ nav_order: 32
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
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
@@ -63,9 +62,7 @@ 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
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.
@@ -74,9 +71,7 @@ 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
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,
@@ -91,9 +86,7 @@ correct. A mobile user agent with no motion sensor is the tell.
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
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
@@ -111,10 +104,9 @@ with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
report = page.evaluate("""async () => {
report = page.evaluate("""() => {
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',
@@ -149,10 +141,8 @@ 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
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).
@@ -171,14 +161,11 @@ 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** -
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).
@@ -193,9 +180,8 @@ 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
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.
@@ -227,19 +213,16 @@ 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.
- The generic Sensor APIs (`Accelerometer`, `Gyroscope` and family) as an
engine feature present in Chromium and not in Firefox, read from each engine's
own behaviour rather than from a summary.
- The DeviceOrientation and DeviceMotion event model, and its behaviour on
hardware with no motion sensor.
- 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
[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).
---
+3 -3
View File
@@ -72,7 +72,7 @@ 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
Because the fingerprint is applied at the browser level rather than 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
@@ -98,7 +98,7 @@ 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
The point of this page is a check you can run rather than 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
@@ -132,7 +132,7 @@ with InvisiblePlaywright(seed=42) as browser:
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
values are present and agree, rather than 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.
+208 -11
View File
@@ -1,6 +1,6 @@
---
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 invisible_playwright_mcp wiki."
description: "Why AI agent retry loops multiply requests into a volume signal that trips rate limits, and why throttling belongs in the agent loop, not the browser engine."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 17
@@ -9,16 +9,213 @@ nav_order: 17
# AI agent retry loops trip rate limits, not fingerprints
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
lives:
An agent that gets a browser to look like a real person will still get blocked if it
asks for a page thirty times in ten seconds. That block has nothing to do with the
fingerprint. It is a counter.
**[Agent retry loops trip rate limits, not fingerprints](https://github.com/feder-cr/invisible_playwright_mcp/wiki/agent-retry-loops-rate-limits)**
This page is about the failure mode that a perfect disguise does not touch: an agent
retries and re-plans on failure, every retry is another request, and a stack of retries
per second is a volume and behaviour signal that trips rate limits and quotas long
before any fingerprint check runs. The fix does not live in the browser. It lives in
the loop that drives it.
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.
## Why an agent makes more traffic than a scraper
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).
A hand-written scraper visits a known list of URLs once. An agent does not. It observes
a page, decides a next action, acts, and when the action fails it re-plans and tries
again. That control loop is the whole point of an agent, and it is also a request
multiplier.
Three things stack up:
- **Retries.** A transient error, a slow load, a missing element, and the agent tries
the same step again. One logical action becomes three or five HTTP requests.
- **Re-planning.** When a step fails the agent often re-reads the page, or reloads it,
or navigates back and forward to re-orient. Each of those is a fresh visit to a URL a
human would have loaded once.
- **Exploration.** An agent that does not know the site's layout probes it: opens a
page to see what is there, backs out, opens another. A person who knows what they want
does not.
The result is that a single high-level task ("find the price of item X") can produce
ten or twenty page loads, most of them to the same few URLs, in a burst measured in
seconds. That pattern is trivial to count, and counting is exactly what a rate limiter
does.
## Rate limits read volume, not the browser
A fingerprint check and a rate limit answer two different questions, and a convincing
disguise only answers one of them: one asks whether this browser is real, the other only
counts how many requests just arrived.
A fingerprint check reads properties of the browser: the GPU string, the canvas hash,
the font list, the TLS handshake. It asks "is this a real browser". invisible_playwright
is built to make that answer yes, which is why it passes most of that class of check:
the engine is a genuine Firefox patched at the C++ level, so the values are real rather
than spoofed on top of a headless build.
A rate limit reads something completely different: how many requests arrived from this
address, this account, or this session, in this window. It does not open the browser at
all. It increments a counter and compares it to a threshold. The request could come from
the most convincing browser ever built and the counter would go up by exactly one.
So the two defences are orthogonal:
| Signal | What it reads | Does a real-looking browser help |
|---|---|---|
| Fingerprint / driver / TLS | Properties of the client | Yes - this is what the engine is for |
| Rate limit / quota | Count of requests over time | No - N requests is N requests |
| Per-account quota | Actions tied to one identity | No - the account is the unit, not the browser |
| Behaviour / velocity | Timing and shape of the traffic | No - the loop decides the timing |
The bottom three rows are not something an engine can fix, because the engine only
controls what one request looks like, not how many of them you send or how fast. That is
a property of the loop.
## Put the budget in the loop, not the engine
The consequence is a design rule: **backoff, throttling and a request budget belong in
the agent loop.** No browser setting throttles an agent that has been told to retry
until it succeeds.
Three controls cover most of it:
- **Exponential backoff on retry.** When a step fails, wait, and wait longer each time,
instead of retrying immediately. A failed request answered by an instant identical
request is the clearest velocity signal there is.
- **A hard request budget.** Cap the number of requests per task and per unit of time.
When the budget is spent, stop and surface the failure rather than letting the loop
spend the site's patience for you.
- **A cap on re-plans.** Bound how many times the agent may re-read or reload the same
URL before it gives up. An unbounded re-plan loop is an accidental refresh storm.
The unit to think in is requests per minute from one address and one account, not
requests per browser. Ten agents behind one exit IP each politely pacing themselves are,
to the counter, one very busy client.
## A retry loop that backs off
Here is the two-line launch plus a retry wrapper that carries a budget and backs off.
The browser is a stealth Firefox; the throttling is plain Python, because that is where
it has to be.
```python
import time
from invisible_playwright import InvisiblePlaywright
def fetch_with_budget(page, url, *, max_attempts=4, budget):
"""Load url with exponential backoff. Raises when the budget is spent."""
for attempt in range(max_attempts):
if budget["spent"] >= budget["limit"]:
raise RuntimeError("request budget exhausted; stopping instead of retrying")
budget["spent"] += 1
try:
page.goto(url, wait_until="domcontentloaded")
return page
except Exception:
if attempt == max_attempts - 1:
raise
backoff = 2 ** attempt # 1s, 2s, 4s, ...
time.sleep(backoff)
return page
budget = {"spent": 0, "limit": 30} # hard cap for the whole task
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
fetch_with_budget(page, "https://example.com", budget=budget)
# ... agent observes, decides, acts; every navigation goes through the budget
```
The `browser` returned is a real Playwright
[`Browser`](https://playwright.dev/python/docs/api/class-browser), so every standard
method works unchanged - `new_page`, `goto`, `click`, `wait_for_selector`. The stealth is
in the engine; the pacing is in `fetch_with_budget`. Nothing about `seed=42` slows the loop
down, and nothing about the loop changes the fingerprint. They are separate jobs.
Pacing the actions themselves matters too, because uniform, machine-fast timing is its
own tell independent of volume. That is the subject of
[the pause shaped like model latency](ai-browser-agents-stealth.md), and it is worth
reading alongside this page: one is about how many requests, the other about their
shape.
## What invisible_playwright fixes, and what it does not
The honest split, because overclaiming here is both wrong and a way to get someone
blocked while they trust a promise that was never true.
**What the engine handles.** The fingerprint, driver and TLS layers read as a genuine
Firefox, so the class of check that asks "is this a real browser driven by a real
person" mostly answers yes. That is measurable: on the public tampering suites a session
comes back internally consistent rather than flagged, and the same seed produces the
same machine every run so a failure is reproducible.
**What you supply.** The engine does not change your IP's reputation, it does not create
per-account quota out of nothing, it does not slow your loop down, and it does not shape
your timing. Those are yours to bring:
- A clean exit, because a real-looking browser on a
[datacenter IP is still on a datacenter IP](can-websites-detect-a-datacenter-proxy-ip.md),
and a counter on the address does not care how good the browser is.
- Human pacing, from the loop, using the controls above.
- Respect for the account's own limits, which are counted against the identity and not
the browser.
Put plainly: invisible_playwright makes each request look like it came from a real
person. It does not make a thousand requests look like one. That second job is the
loop's, and no engine setting will do it for you. When a clean fingerprint still gets
blocked, volume and address are the usual reasons -
[which is a page of its own](why-blocked-with-a-clean-fingerprint.md).
## Conclusion
Retries and re-planning are what make an agent an agent, and they are also what turn one
task into a burst of requests. A burst is counted, and a counter is a different defence
from a fingerprint check: the most convincing browser in the world still increments it by
one per request. So the throttle cannot live in the engine. Give the loop a budget, back
off on failure, cap the re-plans, and put a clean exit under it. The browser's job is to
make each request real; keeping the requests few and well-spaced is yours.
## Short answers to the questions that lead here
**Will a stealth browser stop my agent from being rate limited?** No. Rate limits count
requests; they do not inspect the browser. A real-looking fingerprint helps with
detection, not with volume.
**Why does my agent get blocked when a manual visit works fine?** Almost always because
the agent sent many more requests, much faster, than the person did. Retries and reloads
multiply traffic that a human never generates.
**Where should backoff and throttling live?** In the agent loop, not the engine. No
browser setting paces an agent that was told to retry until it succeeds.
**Does the seed or fingerprint affect how fast I can go?** No. The seed controls the
identity, not the timing. Speed and request count are decided entirely by your loop.
**Is a per-account quota a fingerprint problem?** No. A quota is counted against the
identity or the account, not the browser, so a better fingerprint does nothing for it.
Budget the actions instead.
**How many requests per minute is safe?** There is no universal number; it depends on
the site. The safe habit is a hard budget per task and per window, plus backoff, so a
failing loop stops itself rather than accelerating.
## Sources
- This project's own velocity flag, raised against invisible_playwright during testing,
which turned out to be the test harness hammering one scoring endpoint from one
address - the same volume signal described here, produced by our own gate.
- The wrapper's documented API (`InvisiblePlaywright`, seed reproducibility, a real
[Playwright `Browser`](https://playwright.dev/python/docs/api/class-browser) return)
as shipped, used verbatim in the example above.
**See also:** [the pause shaped like model latency](ai-browser-agents-stealth.md) for
the timing side of the same problem, [how to rate limit your scraper](how-to-rate-limit-your-scraper-playwright.md)
for the pacing mechanics in detail, and [what actually detects an agent](browser-use-detection.md)
across the layers a fingerprint does not cover.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The velocity flag that
started this page was ours, and it belonged to the harness, not the browser.*
+216 -13
View File
@@ -1,6 +1,6 @@
---
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 invisible_playwright_mcp wiki."
description: "An LLM loop emits machine-regular action gaps and instant pointer jumps - a behavioral signal no fingerprint fixes. Where pacing and dwell time live in your code."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 10
@@ -9,18 +9,221 @@ nav_order: 10
# Why AI browser agents have their own timing signal
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
lives:
A stealth engine can make your browser read as a genuine Firefox down to the TLS
handshake, and an AI agent driving it can still stand out for a reason that has nothing
to do with the browser at all: the rhythm of the loop that controls it.
**[The timing signal AI agents give off](https://github.com/feder-cr/invisible_playwright_mcp/wiki/ai-agent-timing-signal)**
An LLM agent runs a think-act cycle. It looks at the page, decides on an action, emits
the action, waits for the result, and looks again. That cycle has a shape, and the shape
is measurable. The gaps between actions cluster around the model's latency, the actions
themselves land effectively instantly, and the pointer arrives at each target without a
human's approach, overshoot or correction. None of that is in the fingerprint. It is a
separate signal, orthogonal to every value a fingerprinting page reads, and a site can
check it on its own.
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.
This page is about that signal: what produces it, why a clean fingerprint does not
touch it, and where the fix has to live, which is in your code and not in the engine.
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).
## What the timing signal actually is
Behaviour is a fingerprint of a different kind. A fingerprinting page reads static
properties: the GPU string, the font list, the canvas hash. A behavioural check reads
the stream of events a session produces over time: when clicks happen relative to each
other, how a pointer travels between two points, how long a value takes to type, whether
anything is read before it is acted on.
A human session is full of small irregularities. There is a pause to read that varies
from a second to several. The pointer curves toward a target, arrives a little off, and
corrects. Typing has an uneven cadence with the occasional longer gap. Time is spent on
the page doing nothing measurable.
An agent loop, left to its own timing, produces almost none of that. The interesting
part is that this is true even when the engine underneath is perfect, which is what makes
it worth a page of its own.
## Why a perfect fingerprint does not touch it
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 engine fingerprint, the TLS handshake and
the driver layer all read as a genuine Firefox rather than an automated one. That is a real
result and it is most of what people are blocked for.
It is also not everything. The same honesty that makes the product worth using means being
clear about the edges: on its own it does not fix IP reputation, per-account quotas, rate
limits, or behaviour. Those are supplied by you, a clean exit and human pacing among them.
The timing signal is squarely in that last category. The engine controls what the browser
*is*; it does not control the cadence at which your loop decides to act, because that cadence
is produced above the browser, in the code that calls it.
Put differently: a fingerprint is a photograph and behaviour is a motion study. Making the
photograph perfect does nothing to the motion study, and the two are read by different parts
of a detection system. This is the same reason the [testing method that catches false
passes](how-to-test-bot-detection.md) lists behaviour among the things no in-page suite
covers.
## What the loop leaks: gaps and pointer jumps
Two specifics, because they are the ones an agent produces without meaning to.
**Inter-action gaps that cluster.** Between one action and the next sits a wait for the
model to respond. That wait is not random the way a human pause is; it clusters around
whatever the model's latency happens to be, run after run. A distribution of gaps that is
tight and repeatable, rather than the broad, ragged spread a person produces, is itself the
tell. It does not matter that the individual number looks plausible. The *shape* of the
distribution is the signal.
**Actions that land instantly, and pointers that jump.** When an agent decides to click a
coordinate, the naive path is to dispatch the click at that coordinate with no travel and
no dwell. The pointer teleports from wherever it was to the target, and the action fires
with zero read time in front of it. A form filled field by field with no gaps, a click on
an element the instant it appears, a pointer that never passes through the space between two
targets: each is a motion no hand produces. The [detected-on-one-site checklist](playwright-detected-as-bot.md)
reaches this at step five, after the machine and the automation tells, because it is what is
left once the browser itself is clean.
invisible_playwright does smooth one piece of this for you: a click arcs the pointer to the
target on a Bezier curve rather than teleporting, so an individual click's *path* is
human-shaped. What it cannot smooth is the *cadence* between your actions and the dwell time
in front of them, because your loop, not the browser, decides when the next action happens.
## Pacing and pointer motion live in your code, not the engine
The consequence is a division of labour, and it is a clean one.
The engine owns the browser identity: the fingerprint, the TLS layer, the driver surface.
You own the rhythm: how long to dwell before acting, how much to vary the gap between
actions, whether to read the page before touching it. No engine can supply the rhythm for
you, because the rhythm is produced by the loop calling the engine, and that loop is yours.
Concretely, that means adding pacing and dwell to the code between your actions rather than
expecting the browser to add it underneath. Here is the minimal shape, using the real
two-line launch and standard Playwright methods on the returned browser:
```python
import random
import time
from invisible_playwright import InvisiblePlaywright
def dwell(low=0.6, high=2.4):
"""A varied pause, the kind reading and deciding actually produces."""
time.sleep(random.uniform(low, high))
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
dwell(1.2, 3.0) # read before acting, not act on arrival
page.click("#open") # the engine arcs the pointer on a Bezier curve
dwell()
for ch in "a search phrase": # per-key rhythm, not one instant fill
page.keyboard.type(ch)
time.sleep(random.uniform(0.04, 0.19))
dwell()
page.click("#submit")
```
The `browser` returned by `InvisiblePlaywright` is a real Playwright `Browser`, so every
method is the one you already know; the `seed=42` makes the identity reproducible so a run
that gets flagged can be replayed exactly. The only thing added above the plain automation is
the pacing, and that is the point: it has to be added, because it is the part the engine
cannot produce for you.
A note on doing it well. Uniform delays are their own tell. `time.sleep(1.0)` between every
action just moves the cluster from "instant" to "exactly one second", and a tight cluster at
one second is as machine-regular as a tight cluster at zero. Vary the pauses, make them
depend on what the step is doing (a long read before a decision, a short gap between two
keystrokes), and avoid the same number twice. The goal is the ragged, context-dependent
spread a person produces, not a constant with a label on it.
## Measuring your own rhythm before a site does
You can read this signal off your own agent the same way a site would, which is the honest
way to know whether your pacing is doing anything. Record a timestamp at each action, then
look at the distribution of the gaps.
```python
import time
timestamps = []
def mark():
timestamps.append(time.monotonic())
# call mark() immediately before each page action, then afterward:
gaps = [b - a for a, b in zip(timestamps, timestamps[1:])]
print("count:", len(gaps))
print("min / max:", round(min(gaps), 3), round(max(gaps), 3))
print("mean:", round(sum(gaps) / len(gaps), 3))
```
If the min and max are close together, or the mean sits right on top of your model's
typical response time, your loop is emitting the clustered distribution described above and
the pacing is not varied enough yet. A human trace has a wide spread and a long tail. This is
the same instinct as reading the fingerprint report field by field rather than trusting a
verdict: measure the actual stream, do not assume the shape. For the related case of an agent
whose pauses line up with tool latency in a devtools context, see
[timing detection through the debugger](debugger-timing-detection.md).
## Conclusion
The engine fingerprint and the agent's rhythm are two different signals, read by two
different parts of a detection system, and a stealth browser addresses the first and not the
second. invisible_playwright makes the browser read as a genuine person's Firefox, which is
why it clears most checks; the cadence of your think-act loop is produced above the browser,
so pacing, dwell time and read-before-act have to live in your own code. Add them
deliberately, vary them so they are not merely a slower constant, and measure your own trace
the way a site would. That is the honest division of labour, and it is the one that holds up.
## Short answers to the questions that lead here
**Does a stealth browser hide that I am an AI agent?** It hides that the browser is
automated. It does not hide the rhythm of your control loop, which is a separate signal you
produce above the browser.
**What is the timing signal, exactly?** The gaps between your actions cluster around the
model's latency instead of spreading like a human's pauses, and actions land instantly with
pointers that jump straight to targets. Both are visible without reading any fingerprint.
**Can invisible_playwright fix my pacing for me?** No, and no engine can. It smooths an
individual click's pointer path on a Bezier curve, but the cadence between actions is decided
by your loop, so pacing and dwell have to live in your code.
**Do I just add a fixed sleep between actions?** That helps with "instant" but creates a new
tell: a tight cluster at one second is as regular as a tight cluster at zero. Vary the pauses
and make them depend on the step.
**Will fixing the timing get me past everything?** No. Behaviour is one signal among several.
A clean rhythm on a bad IP, over quota, or against a rate limit still fails; those are yours
to supply too, a clean exit and sane request volume among them.
**How do I know if my rhythm looks robotic?** Record a timestamp at each action and look at
the spread of the gaps. If min and max are close, or the mean sits on your model's response
time, the distribution is too tight.
## Sources
- This project's own testing notes, which list behaviour and the pause shaped like model
latency among the things no in-page suite covers.
- Standard Playwright's documented [`Browser`](https://playwright.dev/python/docs/api/class-browser),
[`Page`](https://playwright.dev/python/docs/api/class-page) and
[`Keyboard`](https://playwright.dev/python/docs/api/class-keyboard) methods, used unchanged
on the browser this wrapper returns.
- The behavioural step of this set's detected-on-one-site checklist, which reaches pointer
motion and typing cadence after the browser itself is clean.
**See also:** [what fits and what does not for AI browser agents](ai-browser-agents-stealth.md),
[why a CDP-driven agent has a tell of its own](browser-use-detection.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 engine makes the browser
real; the rhythm is yours to write, and this page is the part I keep having to add back into
my own agent loops.*
+28 -77
View File
@@ -62,31 +62,31 @@ 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
### 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
rather than 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
### 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.
schema and a client for someone else's API rather than in a launch path.
So the option exists and it expects a Chromium build.
## Skyvern
### Skyvern
CDP throughout. There is no exposed way to point at a different binary, and the protocol
would not match if there were.
## crawl4ai
### 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
@@ -94,10 +94,10 @@ Playwright's managed build. Its own stealth mode applies `playwright-stealth`, w
documentation notes does not support Firefox, so that combination is largely inert.
[The full version is here](crawl4ai-stealth-custom-browser.md).
## Maxun
### 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.
that is a coherent product decision rather than an oversight.
## What applies regardless of the engine
@@ -142,36 +142,26 @@ rhythm has a shape no person produces.
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.
mechanical half, and it is honest that the deliberation pattern is a different problem.
## 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.
building a dedicated signal for it. That changed this year. Fingerprint, the
commercial fingerprinting vendor behind FingerprintJS, shipped a product in early
2026 specifically aimed at classifying AI agent traffic - not bot detection in
general, agent detection as its own category, with its own signal set. Academic
research published in the same period has been measuring the same target directly:
building multi-layer fingerprints specifically to separate an LLM-driven browsing
session from a human one, using exactly the rhythm-based signals described above
plus whatever else the page surface gives away.
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 practical upshot for anyone running an agent against a real site: the timing
and pointer-behavior signal in the previous section is not a corner case anymore.
It is an active, funded area of detection work, aimed specifically at the traffic
pattern an agent loop produces, independent of whatever engine sits underneath it.
Fixing the browser's fingerprint and fixing the agent's behavior are now both live
requirements, not one obvious fix and one theoretical afterthought.
## The route that does accept a different engine
@@ -213,22 +203,11 @@ Chromium build.
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 invisible-playwright-mcp` 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.
**Is there any agent route to an engine-level fingerprint?** MCP, through Microsoft's own
Playwright MCP server, which takes a browser and an executable path.
**See also:** [browser-use in detail](browser-use-detection.md),
[crawl4ai in detail](crawl4ai-stealth-custom-browser.md),
@@ -237,39 +216,11 @@ identity.
## 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
- `browser_use/browser/profile.py` and `chrome.py`; Stagehand's
`packages/core/lib/v3/launch/local.ts` and its browser configuration docs; Skyvern's
CDP client; `crawl4ai/async_configs.py`; Maxun's package manifest. 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.
---
-253
View File
@@ -1,253 +0,0 @@
---
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.*
@@ -1,131 +0,0 @@
---
title: "Alternative Chromium browsers for automation: what differs"
description: "Brave, Edge, Opera, Vivaldi, Ungoogled: what actually changes between the forks, and why none of it touches the CDP tells that really decide detection."
parent: "Comparisons"
nav_order: 40
---
# Alternative Chromium browsers for automation, and the one question that matters
Brave, Microsoft Edge, Opera, Vivaldi, Ungoogled Chromium: all of them build on
the open-source Chromium project, and all of them are Chromium for automation
purposes in the way that matters most. This page is about what actually
changes between the forks, and the one thing that does not.
## What Chromium being the base actually means
Every fork above takes Chromium's rendering engine (Blink), its JavaScript
engine (V8), and most of its automation surface (CDP, the same protocol
Playwright and Puppeteer speak to Chrome) largely unchanged. What each fork
adds is UI chrome, some default settings, and in a couple of cases genuine
engine-level changes - which is the part that matters and the part most
comparisons skip.
## What actually differs
**Ungoogled Chromium** strips Google-service integration and telemetry calls.
The rendering and automation surface underneath is stock Chromium. For
detection purposes this changes almost nothing observable from a page; it
changes what phones home, not what the DOM reports.
**Brave** adds a built-in ad and tracker blocker and fingerprinting
countermeasures aimed at *passive, cross-site* tracking - randomizing certain
canvas and audio outputs per session by default. That is a genuine engine-level
difference, and it cuts both ways for automation: it can make canvas-based
fingerprint matching noisier, but a browser that randomizes its own canvas
output on every load is itself an unusual, identifiable behaviour to a detector
that checks for consistency across repeat visits.
**Edge, Opera, Vivaldi** are UI and feature layers - vertical tabs, built-in
VPNs, sidebar panels - on essentially stock Chromium/Blink underneath, with UA
strings that identify them as themselves rather than as Chrome.
## The one question that matters, and none of these answer it
**Is the browser being driven by an automation protocol, and does that show?**
Every fork above, driven by Playwright or Puppeteer over [CDP](bidi-vs-cdp-detection.md),
inherits the same automation surface Chrome does, because CDP is the layer
Playwright actually talks to - the browser skin on top is close to irrelevant
to what CDP exposes. [`navigator.webdriver`](navigator-webdriver-explained.md),
the CDP-specific runtime properties, the automation flags: present in
Brave-under-Playwright exactly as in Chrome-under-Playwright, because they
come from the driving protocol, not the fork.
Picking a different Chromium skin to solve a detection problem is picking a
different paint color to fix an engine problem. The tells that matter live in
the automation layer, not in whether the tab bar says Brave or Edge.
## Where the fork does matter
- **Feature availability for your test surface.** If you are testing behaviour
specific to Edge's rendering quirks or Brave's Shields, you need that
specific browser, automation-detectability aside.
- **A UA string that must say the right thing.** If a site branches logic on
the UA rather than on capability detection, the fork's declared identity
matters for that reason alone.
- **Brave's own fingerprint randomization**, if you specifically want noisier
canvas/audio output and are not worried about the randomization itself being
a signal.
## The actual alternative, if the browser is your problem
If what you are after is a Chromium-family browser that reads as a normal
consumer install rather than an automation-driven one, the fork choice is the
wrong lever - the automation layer is. [Patchright](vs-patchright.md) takes
this approach on Chromium specifically: patching Playwright's driver to
remove the most common CDP-level tells rather than switching which skin sits
on top.
This project takes the same idea on a different base entirely: a Firefox
patched at the C++ source, chosen over any Chromium fork because Firefox is
not driven over CDP at all - a different protocol with a different, smaller
set of shared tells, on an engine most anti-bot vendors have spent
proportionally less effort fingerprinting given Chromium's dominant share.
[Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md)
is the fuller argument for that choice, independent of which Chromium fork you
were comparing against.
## Short answers to the questions that lead here
**Is Brave harder to detect than Chrome for automation?** Not meaningfully,
when driven by the same protocol. Its fingerprint randomization changes canvas
and audio output but does not touch the automation-protocol signals a detector
checks first.
**Does using Edge instead of Chrome avoid bot detection?** No. Same Blink
engine, same CDP surface when automated, different UA and UI.
**Is there a Chromium fork built for automation stealth?** Not among the
consumer forks above. Patchright and undetected-chromedriver-style projects
patch the driver layer on stock Chromium/Chrome rather than relying on a
different skin.
**Does Ungoogled Chromium avoid fingerprinting?** It removes Google telemetry
calls, not fingerprintable page-level properties. A detection script reads the
same DOM and JS surface either way.
**Which non-Chromium browser is worth trying instead?** Firefox is the
structurally different option - different rendering engine, different
automation protocol - which is the actual axis that moves the needle rather
than a Chromium skin.
**See also:**
[Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md),
[patchright vs invisible_playwright](vs-patchright.md) for the driver-patching
approach on Chromium, and
[what navigator.webdriver really tells a site](navigator-webdriver-explained.md)
for the flag every CDP-driven fork inherits alike.
## Sources
- [The Chromium Project](https://www.chromium.org/chromium-projects/), retrieved 2026-09-10, for what the open-source base provides to every fork.
- [Brave's own documentation on fingerprinting protections](https://brave.com/privacy-features/), retrieved 2026-09-10, for the canvas/audio randomization behaviour described above.
- [Chrome DevTools Protocol documentation](https://chromedevtools.github.io/devtools-protocol/), retrieved 2026-09-10, for the automation surface every CDP-driven Chromium fork exposes identically.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level, precisely because a Chromium fork does not
change the automation protocol underneath it. The page recommends switching
engines rather than skins for that reason, and says so plainly rather than
implicitly.*
-83
View File
@@ -1,83 +0,0 @@
---
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 in [the survey of how websites detect bots](how-do-websites-detect-bots.md) 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, which in practice means the gate a visitor meets is more often [Turnstile](cloudflare-turnstile-explained.md) than this one.
## 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. The gates that do read [what a browser fingerprint is made of](what-is-a-browser-fingerprint.md) are a separate family, and knowing which of the two you are behind decides whether any of that work applies at all.
## 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
@@ -1,83 +0,0 @@
---
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.*
+6 -42
View File
@@ -63,7 +63,7 @@ same identity always produced the same audio.
Two things went wrong, and the second one is the interesting one.
## Silence is a trap
### 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
@@ -77,9 +77,9 @@ Nothing should come out of that. On real hardware nothing does. A tool adding no
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.
It also inspects the first 100 samples of a normal buffer and counts distinct values
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
@@ -90,7 +90,7 @@ claim that your sound card produces sound when it is off.
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 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
@@ -150,9 +150,7 @@ 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).
laptop latency is two devices in one answer.
- **[`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
@@ -161,21 +159,6 @@ ctx.close();
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
@@ -194,25 +177,6 @@ render that has to look like it came from the device the other six describe.
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)
@@ -1,287 +0,0 @@
---
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.*
@@ -1,273 +0,0 @@
---
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
@@ -1,95 +0,0 @@
---
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.*
+3 -3
View File
@@ -41,13 +41,13 @@ internally consistent identity per session - GPU, canvas, audio, fonts, screen,
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
browser whose fingerprint, TLS handshake and driver layer read as a genuine Firefox
rather than 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
and pointer motion between them follows a Bezier curve rather than teleporting from
point to point.
What it does not touch is equally important, and the next section is about that.
+9
View File
@@ -0,0 +1,9 @@
{
"schemaVersion": 1,
"label": "engine downloads",
"message": "394.76k",
"color": "2EA44F",
"namedLogo": "github",
"logoColor": "white",
"cacheSeconds": 3600
}
+4 -4
View File
@@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20" role="img" aria-label="Firefox: 159.0">
<title>Firefox: 159.0</title>
<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)">
@@ -10,7 +10,7 @@
<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">159.0</text>
<text x="77.5" y="14">159.0</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>

Before

Width:  |  Height:  |  Size: 855 B

After

Width:  |  Height:  |  Size: 855 B

+9
View File
@@ -0,0 +1,9 @@
{
"schemaVersion": 1,
"label": "browser launches",
"message": "8.51M",
"color": "FF7139",
"namedLogo": "firefoxbrowser",
"logoColor": "white",
"cacheSeconds": 3600
}
+4 -4
View File
@@ -1,5 +1,5 @@
<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>
<svg xmlns="http://www.w3.org/2000/svg" width="157" height="20" role="img" aria-label="browser launches: 8.51M">
<title>browser launches: 8.51M</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)">
@@ -10,7 +10,7 @@
<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>
<text x="136.5" y="15" fill="#010101" fill-opacity=".3">8.51M</text>
<text x="136.5" y="14">8.51M</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 898 B

After

Width:  |  Height:  |  Size: 898 B

+7 -7
View File
@@ -1,16 +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>
<svg xmlns="http://www.w3.org/2000/svg" width="73" height="20" role="img" aria-label="Stars: 2.6k">
<title>Stars: 2.6k</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>
<clipPath id="r"><rect width="73" 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)"/>
<rect x="43" width="30" height="20" fill="#e8a317"/>
<rect width="73" 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>
<text x="58.0" y="15" fill="#010101" fill-opacity=".3">2.6k</text>
<text x="58.0" y="14">2.6k</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

+1 -16
View File
@@ -20,7 +20,7 @@ That single fact turns the Battery API into a small but reliable consistency che
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
no Battery API rather than 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
@@ -89,21 +89,6 @@ as [what `navigator.vendor` and `navigator.productSub` report on Firefox](naviga
which are wrong on a Chromium base pretending to be Firefox and correct on an actual
Firefox build.
### The answer, read from a session
![One panel listing three values read from the patched engine, headless:
navigator.getBattery is undefined, navigator.vendor is an empty string, and
navigator.productSub is 20100101. A note says the bundled Firefox returned the same
values.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/battery-api-fingerprint-firefox-values.png)
`navigator.getBattery` is `undefined`, which is the answer to the title, and the bundled
Firefox returns the same thing.
The two Firefox constants sit next to it on purpose. A build that reports the empty
`vendor` and `20100101` for `productSub`, and then hands a page a battery object, has
contradicted itself with three property reads: the first two say Firefox and the third
says something that is not one.
## Check it yourself in two lines
Switching from stock Playwright is a two-line change, and after that every standard
@@ -1,211 +0,0 @@
---
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.*
+12 -14
View File
@@ -92,21 +92,20 @@ anyone who needs it.
The cost is real and you should know it before you enable this anywhere:
**`go_back()` used to time out here, and does not any more.** A bfcache restore does not
fire `load`, so code waiting for that event sat there until the deadline. The engine
reports the navigation from firefox-31, and the driver stopped caching the injected
script across a restore in 0.19.0, which was the second half of the same problem: the
page came back and the driver was still holding a handle into the world it had left.
**[`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
# fine now
page.go_back()
# 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 still more robust than waiting for a lifecycle
event on a restore, because the lifecycle events genuinely do not fire again.
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.
@@ -152,9 +151,8 @@ in Firefox explicitly and in Chromium effectively.
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.
**Does `go_back()` still hang?** No, since firefox-31 for the navigation and 0.19.0 for
the driver side. Wait for an element rather than for `load`, which does not fire again
on a restore.
**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.
@@ -176,7 +174,7 @@ for where behavioural signals sit in the wider picture.
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.
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
+25 -53
View File
@@ -1,6 +1,6 @@
---
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."
description: "What BotD's twenty 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
@@ -11,14 +11,14 @@ nav_order: 3
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.
its twenty 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/`).
Read from source on 2026-07-27 (`fingerprintjs/BotD`, `src/detectors/`).
## The nineteen detectors
## The twenty detectors
```
app_version distinctive_properties document_element_keys
@@ -37,24 +37,20 @@ 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` |
| Engine identity | Does the browser behave like the engine its user agent claims? | `eval_length`, `product_sub`, `error_trace`, `window_external` |
| Internal consistency | Do two views of the same fact agree, and does a real machine and window exist? | `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.
JavaScript without being obvious. BotD reads them, works out which engine you must
be, and compares that against what your user agent claims.
**`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.
The check is literally: if the length is 37 and the engine kind is not WebKit or Gecko,
that is a bot. A Chromium build claiming to be Firefox fails here 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)
@@ -62,30 +58,23 @@ 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.
the detector matches the string for known tool signatures, PhantomJS among them.
**`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.
**`function_bind`**, **`window_external`**, **`app_version`**: the same idea on other
surfaces. `window_external` matches `window.external.toString()` against a known
commercial crawler's signature.
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.
This group never asks whether a value is unusual. It asks whether two values that
must agree actually do, and whether a real machine and window are behind them.
**`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.
**`languages_inconsistency`**, **`mime_types_consistence`**,
**`plugins_inconsistency`**: the same fact asked in two ways, with the answers
compared. Not "is this value unusual" but "do these two agree".
**`rtt`**, **`window_size`**: values a real machine and a real window have, and a
container often does not.
@@ -112,7 +101,7 @@ Firefox reporting Firefox has the right `productSub`, the right `eval` length, t
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
**The remaining risk moves elsewhere.** Passing every one of these twenty 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.
@@ -123,10 +112,9 @@ BotD is on npm and takes about four lines to run. Do it on the machine that will
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.
If any of the engine-identity group fires, stop and fix that first: it means the
browser you are presenting is not the browser you are running, and no amount of work
on the other surfaces compensates for that.
## Short answers to the questions that lead here
@@ -142,28 +130,12 @@ browser engine you really are, by testing behaviours that differ between engines
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).
[one detector out of roughly twenty](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.
-124
View File
@@ -1,124 +0,0 @@
---
title: "Browser automation testing tools: where each one fits"
description: "Playwright, Selenium, Cypress and Puppeteer by what each one was built to test, not by feature count, plus the axis none of the four was designed around."
parent: "Comparisons"
nav_order: 41
---
# Browser automation testing tools, and where each one actually fits
Four names come up constantly and get compared as if they were interchangeable:
Playwright, Selenium, Cypress and Puppeteer. They overlap enough to confuse
and differ enough that picking by feature-list length is how people end up
fighting the wrong tool for a year.
## The four, by what they are actually built for
**Playwright.** General-purpose, cross-browser (Chromium, Firefox, WebKit),
built by Microsoft with auto-waiting and multi-language support (JS/TS,
Python, Java, .NET). The current default recommendation for new
browser-automation projects that need real cross-browser coverage.
**Selenium.** The oldest and most widely deployed, via the W3C WebDriver
standard. Broadest language support, largest historical ecosystem, and the
one that can drive an actual retail browser install rather than a
framework-maintained build - relevant if you specifically need to test
against exactly what your users have installed.
**Cypress.** Built specifically for testing web applications from inside the
browser, running in the same run-loop as your app rather than driving it from
outside. Excellent developer experience and debugging for single-page apps,
historically Chromium-only in practice (with newer versions adding limited
Firefox and WebKit support), and architecturally not built for the kind of
cross-origin, multi-tab scraping work Playwright and Selenium both handle
natively.
**Puppeteer.** Chromium/Chrome only, Node.js only, maintained by the Chrome
team. If your target is specifically Chrome and your stack is Node, it is a
direct, well-supported option; it does not cover Firefox or WebKit at all.
## Choosing by what you are actually testing
| Your situation | Reach for |
|---|---|
| Cross-browser regression suite, multiple languages on the team | Playwright |
| Testing a Chrome-only internal app, Node stack already in place | Puppeteer |
| Fast-feedback testing of a single-page app you are actively developing | Cypress |
| Must drive an actual retail-installed browser, not a framework build | Selenium |
| Large legacy Selenium suite that works | Selenium, don't rewrite for its own sake |
| Real-world scraping across multiple sites, need Firefox specifically | Playwright |
## The axis none of these four are built around
All four of these are testing tools, built to verify that **your own
application** behaves correctly under known, cooperative conditions. None of
them was designed against a page actively trying to distinguish automation
from a human - because for their primary use case, the page being tested is
yours, and it has no reason to fight you.
That changes completely when the target is someone else's site and it is
actively fingerprinting. Every one of these four, used with its default
browser build, presents recognizable automation signals: `navigator.webdriver`
under WebDriver-based tools, CDP-visible properties under CDP-driven ones,
and browser builds that differ from a retail install in ways a determined
detector checks for. Picking Playwright over Selenium, or Puppeteer over
Cypress, does not change this axis at all - it is orthogonal to which testing
tool you picked.
## Where this project sits
[invisible_playwright](https://github.com/feder-cr/invisible_playwright) is
not a fifth entry on the list above competing for the same job. It answers a
different question: given that you have already picked Playwright's API
(unchanged, same code you would write against any Playwright browser), what
if the Firefox underneath it was patched at the C++ source rather than
Playwright's stock automation build? It is the engine layer beneath a testing
tool, not a replacement for one.
[Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md)
covers why Firefox was the base worth patching, and
[patchright vs invisible_playwright](vs-patchright.md) covers the equivalent
idea applied to Chromium instead.
## Short answers to the questions that lead here
**Is Playwright better than Selenium?** For new cross-browser projects,
usually yes - faster, auto-waiting, fewer moving parts. Selenium's breadth of
language support and ability to drive a real retail browser remain real
advantages in specific cases.
**Is Cypress a replacement for Selenium or Playwright?** Not a direct one.
Cypress is purpose-built for testing an application you control from inside
the browser's run-loop, and is a weaker fit for cross-origin scraping or
multi-tab flows that Selenium and Playwright handle natively.
**Does Puppeteer support Firefox?** Puppeteer has had experimental Firefox
support at various points; it is not the primary, well-maintained target the
way Chrome is. If Firefox specifically matters, Playwright is the
better-supported cross-browser option.
**Which tool is hardest to detect?** None of the four is built with detection
resistance as a design goal, and the default automation build under any of
them is recognizable. That is a separate axis from which testing tool fits
your testing needs.
**Can I use these for scraping instead of testing?** Yes, and Playwright and
Selenium in particular are commonly used this way - but recognize that you
have moved outside each tool's primary design intent, onto an axis (adversarial
detection) none of them was built to address.
**See also:**
[Selenium vs Playwright: the actual differences](difference-between-selenium-and-playwright.md),
[Migrating from Puppeteer to Playwright for stealth](migrate-puppeteer-to-playwright-stealth.md),
and [Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md).
## Sources
- [Playwright's own documentation](https://playwright.dev/), [Selenium's documentation](https://www.selenium.dev/documentation/), [Cypress's documentation](https://docs.cypress.io/), and [Puppeteer's documentation](https://pptr.dev/), all retrieved 2026-09-10, for each project's stated scope and browser support.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
which is not a competitor to any of the four tools above - it sits underneath
one of them. The page is organized around picking the right testing tool
first, because that decision is independent of the engine question it exists
to answer.*
+3 -28
View File
@@ -109,11 +109,9 @@ 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'));
// does a known resource resolve?
fetch('moz-extension://<id>/manifest.json').then(r => console.log('present', r.status))
.catch(() => console.log('not found'));
// did something remove my bait element?
const bait = document.createElement('div');
@@ -126,16 +124,6 @@ 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,
@@ -159,19 +147,6 @@ each launch unless you pass a persistent one.
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
+19 -22
View File
@@ -35,7 +35,7 @@ look. Line them up and the confusion evaporates:
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.
behaviour and reputation rather than from what the DOM reports at all.
| Number | The question it answers | What it reads | What moves it |
|---|---|---|---|
@@ -97,9 +97,10 @@ DOM property you did or did not spoof. Perfecting your canvas hash does not move
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.
non-lying fingerprint is necessary and not sufficient here. It removes the reasons to
distrust you; 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
@@ -114,7 +115,7 @@ other two. Put them side by side and the independence is obvious:
- 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)
They cross-cut. Each of the [four 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
@@ -122,10 +123,9 @@ 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.
One instinct makes all 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.
Every one of those is counted against you, not for you:
@@ -140,12 +140,12 @@ seed-derived identity, where every surface is drawn from one seed and stays put,
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
## Measure all 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:
Playwright `Browser` and every method is the one you already know:
```python
from invisible_playwright import InvisiblePlaywright
@@ -160,8 +160,7 @@ def read_canvas(page):
return c.toDataURL();
}""")
sf = InvisiblePlaywright(seed=42)
with sf as browser:
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
first = read_canvas(page)
@@ -208,10 +207,10 @@ matter how clean the fingerprint is.
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.
passing another, suppressing a signal lowers all three rather than hiding from any of
them, 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
@@ -226,7 +225,7 @@ 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.
fingerprint removes reasons to distrust you; it does not supply a past.
**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
@@ -244,10 +243,8 @@ 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.
own source rather than from a rendered verdict: CreepJS on tampering, FingerprintJS on
the hashed visitor ID and its confidence, and reCAPTCHA v3 on the behavioural score.
- 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.
+177 -14
View File
@@ -1,6 +1,6 @@
---
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 invisible_playwright_mcp wiki."
description: "browser-use drives Chrome over CDP. What BrowserProfile lets you change, what stays out of reach on a server, and the timing tell specific to AI agents."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 2
@@ -9,19 +9,182 @@ nav_order: 2
# browser-use gets detected: what you can and cannot change
This page moved to the invisible_playwright_mcp wiki, where the agent-experience content now
lives:
If your browser-use agent works locally and gets challenge pages on a server, the
problem is usually not the agent and not the prompt. It is the browser it drives and the
machine it runs on, and only some of that is reachable from configuration.
**[browser-use getting blocked: what you can and cannot change](https://github.com/feder-cr/invisible_playwright_mcp/wiki/browser-use-getting-blocked)**
This page is what `BrowserProfile` actually exposes, what those settings fix, what stays
out of reach, the signal that is specific to agent-driven sessions, and the honest answer
about swapping in a different engine.
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.
## What browser-use gives you to change
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).
browser-use's `BrowserProfile` lets you change six things: which browser binary
launches, its channel, a persistent profile directory, proxy, headless mode, and extra
command-line arguments. Everything else about the browser and the machine it runs on is
out of its reach. These fields are read from `browser_use/browser/profile.py`, the
configuration surface:
| Field | What it does |
|---|---|
| `executable_path` | which browser binary to launch |
| `channel` | a Chromium channel |
| `user_data_dir` | a persistent profile directory |
| `proxy` | proxy settings for the session |
| `headless` | headless or headed |
| `args` | extra command-line arguments |
That is a real set of levers, and three of them matter more than people use them for.
### executable_path, and what it expects
`executable_path` exists, and it expects a **Chromium-family** browser. The surrounding
code in `browser_use/browser/chrome.py` is entirely Chrome logic: finding a Chrome
executable, deriving the Chrome user-data directory from it, enumerating Chrome profiles.
The channel type is a Chromium channel.
The practical use of that field is pointing at your **real installed Chrome** rather
than the bundled Chromium. [Those are not the same browser](chromium-is-not-chrome.md):
the codec set differs, the branding differs, and a real Chrome install is a far more
common thing to be than a bundled test build.
### user_data_dir, which is underused
Pointing this at a profile that has genuinely been used is the single highest-value
change available in the configuration, because it is the only one that addresses history
rather than hardware.
An agent session starting from an empty profile is a browser that has never been
anywhere, which is
[most of why a fresh browser scores badly](recaptcha-v3-score.md). The traps that come
with persistent profiles are covered separately in
[what a persistent profile fixes and breaks](persistent-profiles.md), and the pairing
rule there applies here too.
## What configuration cannot reach
Everything about the machine. None of the fields above changes any of these, and on a
server all of them are true at once:
- **No GPU**, so WebGL reports a software renderer.
[What those strings mean](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**, so the audio values fall back to defaults.
[The seven values](audiocontext-fingerprinting.md).
- **A screen with no taskbar** and a default resolution.
[The relationships that have to hold](screen-size-headless-tells.md).
- **Codec support** that describes a slim build rather than a desktop install, including
whether decoding is hardware accelerated.
[Three surfaces in one API](codec-fingerprinting.md).
- **A TLS handshake** decided before any of this by the network stack.
[Which no page-level layer can touch](ja3-ja4-tls-fingerprint.md).
This is why "it works on my laptop and not in Docker" is the most common shape of the
problem. The agent is identical; the machine is not.
[The container version of this list](playwright-docker-detection.md) goes through it in
order.
## The tell that is specific to agent-driven sessions
The tell specific to agent-driven sessions is timing, not fingerprint: an agent pauses to
think between actions, and those pauses cluster around model latency in a shape that human
reading never produces. This part does not apply to ordinary scraping and does apply to
browser-use.
An agent thinks between actions. It reads the page, calls a model, waits for a response,
then acts. That produces
[an interaction rhythm with a very particular shape](ai-agent-timing-signal.md):
- **Long, similar pauses before each action**, clustered around model latency rather than
around reading speed.
- **No movement during the pause.** A person reading a page moves the pointer, scrolls
slightly, drifts. An agent's pointer is perfectly still for two seconds and then
arrives exactly on a button.
- **Actions that land dead centre** on their targets, because coordinates come from the
accessibility tree rather than from a hand.
- **No wasted actions.** People scroll past things, hover over what they do not click,
and change their minds.
None of that is fixed by a stealth setting, and it is worth knowing because it explains
blocks that arrive **after** a few interactions rather than at the first page load. That
timing is the diagnostic:
[a block at first load points at the fingerprint or the address, a block after an
interaction points at behaviour](playwright-detected-as-bot.md).
## Can I use a stealth-patched Firefox with browser-use?
No, and it is better to say so plainly than to publish a workaround that does not work.
browser-use drives its browser over the Chrome DevTools Protocol, with Chrome-specific
arguments and Chrome profile handling. A Firefox binary in `executable_path` is not a
drop-in: the driver would be speaking a protocol the browser does not implement.
If you specifically want an engine whose fingerprint is set in its own source, the route
that works for agents is a different driver. Microsoft's
[`playwright-mcp`](https://playwright.dev/docs/getting-started-mcp) accepts a browser
and an executable path and speaks MCP, so an agent framework that talks MCP can drive a
patched Firefox through it.
[That integration is written up here](integrations/playwright-mcp.md).
That is a genuine trade: you give up browser-use's agent loop and get an engine-level
fingerprint. Which one matters depends on whether your blocks are arriving because of the
browser or because of the behaviour, and the timing test above tells you which.
## Conclusion
browser-use exposes enough configuration to fix the two things configuration can fix:
which browser binary runs, and whether the profile has a past. Point it at a real Chrome
and at a profile that has been used, and you have taken the available wins.
Everything else divides into two piles. The machine-level tells are shared with every
other automation tool and are fixed by changing the machine or the engine, neither of
which is a browser-use setting. The agent-rhythm tells are specific to this class of tool
and are not fixed by any fingerprint work at all.
Knowing which pile you are in takes one experiment: note whether the block arrives at the
first request or after a few actions.
## Short answers to the questions that lead here
**Why does my browser-use agent get blocked on a server but not locally?** Because the
server has no GPU, few fonts, no audio device and a default screen, and the agent is
identical in both places.
**Can I set a custom browser in browser-use?** Yes, `executable_path` in
`BrowserProfile`, and it expects a Chromium-family browser. Pointing it at your real
Chrome rather than the bundled Chromium is worth doing.
**Can I use a stealth Firefox with browser-use?** No. It drives over CDP, which Firefox
does not implement in the way the driver expects.
**Does a persistent profile help?** Yes, more than most settings, because it is the only
one that addresses having no history. Read the traps first.
**Why do blocks arrive after a few actions rather than immediately?** That usually points
at behaviour rather than fingerprint, and agent pacing has a recognisable shape.
**Does adding a proxy fix it?** It changes where you come from. If the browser is
announcing a datacenter through its GPU and fonts, the address was not the problem.
**See also:** [the checklist for being detected on one site](playwright-detected-as-bot.md),
which is the order to work in,
[Playwright in Docker](playwright-docker-detection.md), for the server case, and
[Playwright MCP](integrations/playwright-mcp.md), for the agent route that does accept a
different engine.
## Sources
- `browser_use/browser/profile.py`, which defines the configuration fields listed above,
and `browser_use/browser/chrome.py`, which is the Chrome executable and profile
handling. Read 2026-07-27.
- [Playwright's own MCP documentation](https://playwright.dev/docs/getting-started-mcp),
which lists `firefox` among the supported `--browser` values, confirming that route
(unlike browser-use) is not Chromium-only. Read 2026-08-06.
- 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 says our engine does not fit browser-use,
because it does not, and a guide claiming otherwise would waste your afternoon.*
+10 -21
View File
@@ -12,7 +12,7 @@ nav_order: 7
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.
ClientRects geometry - each on its own page, roughly fifteen of them.
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
@@ -41,7 +41,7 @@ renderer that no Windows machine ships on another, side by side, both green, and
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
## The fifteen pages, surface by surface
Each page answers one narrow question. Using them as if they were interchangeable is
most of why people get confused.
@@ -65,7 +65,7 @@ most of why people get confused.
- **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.
rendering stack, so it is a fingerprint rather than 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
@@ -149,19 +149,19 @@ with InvisiblePlaywright(seed=42) as browser:
# 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()
first = page.locator("#crc").inner_text()
page.reload()
second = page.locator("#canvas-hash").inner_text()
second = page.locator("#crc").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()
renderer = page.locator("#webgl-unmasked-renderer").inner_text()
print("WebGL renderer:", renderer)
page.goto("https://browserleaks.com/fonts")
print("fonts detected:", page.locator("#fonts-metrics-report").inner_text())
print("fonts detected:", page.locator("#font-count").inner_text())
```
Two rules turn that from a screenshot into a test.
@@ -221,23 +221,12 @@ 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.
- The BrowserLeaks surfaces named above, 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.
- 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
+9 -9
View File
@@ -71,13 +71,13 @@ something isn't in its bundle-only list, and each of those defaults quietly reac
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
empty list rather than 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.
every result rather than 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
@@ -89,7 +89,7 @@ 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
**Layer one, found by reading the code rather than 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
@@ -108,7 +108,7 @@ built in. A hook that is correct and a build that never includes it produce the
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
other two backends do. The reason this is worth telling as one story rather than 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
@@ -122,18 +122,18 @@ 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
CI rather than 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
The cost is real and worth naming rather than glossing over. The binary is
meaningfully larger, because it now carries real font files rather than 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
## Where it still leaks, named rather than hidden
Consistent with treating a suppressed signal as a fail instead of a pass, the honest
Consistent with treating a suppressed signal as a fail rather than 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
+20 -34
View File
@@ -25,14 +25,13 @@ and the parts that a browser fingerprint does not and cannot touch.
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.
controller. Those are the classic VM tells, 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.
these questions differently, and a detector that has scored a few million real browsers
knows what the physical desktop looks like.
- The GPU vendor and renderer string.
- The number of logical CPU cores.
@@ -54,10 +53,8 @@ string](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_in
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
in the browser, because it is a string you can read directly rather than 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).
@@ -100,11 +97,9 @@ 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
the string), `hardwareConcurrency` and device memory take values a real desktop
reports, the `AudioContext` presents a real device's output characteristics, and the
screen metrics describe a physical display. Every field 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.
@@ -114,7 +109,7 @@ 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
# same seed -> same GPU, cores, memory, audio and screen every run
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
@@ -125,7 +120,7 @@ with InvisiblePlaywright(seed=42) as browser:
return {
renderer: dbg ? gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL) : null,
cores: navigator.hardwareConcurrency,
memory: navigator.deviceMemory, // undefined on Firefox; the API is Chromium-only
memory: navigator.deviceMemory,
sampleRate: new (window.AudioContext || window.webkitAudioContext)().sampleRate,
screen: [screen.width, screen.height, window.devicePixelRatio],
};
@@ -133,10 +128,9 @@ with InvisiblePlaywright(seed=42) as browser:
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
Run that inside the build and the renderer names a real GPU, the core and memory
counts sit in the range real desktops report, 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.
@@ -193,10 +187,9 @@ string. It is a value you can read in plain text rather than a statistic you hav
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.
browser-visible signals - GPU, cores, memory, audio, screen - to one coherent real
desktop persona. 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
@@ -212,16 +205,9 @@ 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.
- The public fingerprint suites this project tests against, read for which environment
values they collect and how they weight them - GPU renderer, hardwareConcurrency,
deviceMemory, AudioContext output and screen metrics.
- This project's release gates, which compare each of those fields against a stock
Firefox on the same machine rather than reading a verdict.
+69 -104
View File
@@ -9,13 +9,13 @@ 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.
Short version: a page can see that `navigator.clipboard` exists and it can ask the
Permissions API what state `clipboard-read` is in, so yes, 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 its permission state has to agree with a second
API that reports the same thing.
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
@@ -32,11 +32,10 @@ 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.
- **The permission state for `clipboard-read`**, by asking the
[Permissions API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API)'s
`navigator.permissions.query({name: 'clipboard-read'})`. That returns `granted`,
`denied` or `prompt` without prompting anyone.
- **What happens when it calls a method.** A rejected promise, and the shape of the
rejection, tells the page which guard tripped.
@@ -54,19 +53,14 @@ on two conditions the specification requires:
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.
2. **A permission.** Reading additionally requires the `clipboard-read` permission;
writing is allowed under a gesture in most configurations but can also be governed by
`clipboard-write`.
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.
because a page-built event carries `isTrusted=false` 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.
@@ -75,34 +69,31 @@ So the detector question is not "what is your clipboard value". It is "does the
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 cross-check: permission state must agree with the Permissions API
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.
The sharper check does not call the clipboard at all. It reads two answers to the same
question and looks at whether they line up.
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.
`navigator.clipboard` being present implies a certain permission model. The Permissions
API is then asked directly: `query({name: 'clipboard-read'})`. On a coherent, real
browser those two facts describe one consistent policy. On an over-patched setup, where
someone bolted on `navigator.clipboard` or forced a permission state from JavaScript
without moving the other half, the two disagree, and the disagreement is the tell.
It is the same family as
It is the same shape 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.
expected to give one coherent answer and a headless browser gives two. Clipboard adds a
third instance of the pattern, alongside
[the notification-state cross-check detectors already run](notification-permission-detection.md).
Nobody has to recognise automation directly; they just ask the same thing twice through
different code and compare.
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.
Firefox. The permission plumbing is the browser's own, so the Permissions API answer and
the clipboard's actual behaviour come from one source and cannot contradict each other the
way a page-level shim does. There is nothing to keep in sync because nothing was bolted
on.
## Reading the clipboard with invisible_playwright
@@ -121,39 +112,34 @@ with InvisiblePlaywright(seed=42) as browser:
# 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.
# Inspect the surface the way a detector would: presence plus the
# permission state that has to agree with it.
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
readState = s.state; // 'granted' | 'denied' | 'prompt'
} catch (e) {
readState = 'query-failed';
}
return { present, readState };
}""")
print(report) # e.g. {'present': True, 'readState': 'query-failed'}
print(report) # e.g. {'present': True, 'readState': 'prompt'}
```
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.
present in the secure context, and a `clipboard-read` state that matches the browser's
real policy rather than a hand-forced constant. If you need to grant clipboard permissions
explicitly for a `readText()` flow, use Playwright's own
`context.grant_permissions([...])` on the browser context, exactly as you would with
upstream Playwright; there is no separate API to learn here.
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.
The measurable point is the one from the section above: the presence flag and the
permission state agree, and a click-gated `writeText()` succeeds because the gesture was
trusted. That agreement 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
@@ -180,39 +166,36 @@ 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.
A website can absolutely detect that you are touching the Clipboard API, and it can read
your `clipboard-read` permission state without prompting. But the async Clipboard API is a
gate, not a value fingerprint: access opens only for a real trusted gesture, and the
permission it reports has to agree with the Permissions API's answer for the same thing.
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. 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.
exists and query the `clipboard-read` permission state. 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.
**Why does `readText()` reject in my automation?** Most often because there was no trusted
user gesture, or the `clipboard-read` permission was not granted. A script-dispatched
click does not count as a gesture.
**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.
**What is the clipboard cross-check?** A detector compares `navigator.clipboard` presence
against the Permissions API state for `clipboard-read`. On a real browser they describe
one policy; a page-level shim that forces one without the other makes them disagree.
**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
@@ -220,30 +203,12 @@ 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.
- The WHATWG and W3C definitions of the async Clipboard API and the Permissions API,
including the user-activation and `clipboard-read`/`clipboard-write` requirements, read
from the specifications rather than from a blog summary.
- 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.
operation succeeds under a trusted event and that the permission state a page can query
agrees with the browser's real policy.
**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
+4 -34
View File
@@ -29,7 +29,7 @@ by every serious tool on day one. The ones that survive are hardware questions t
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.
extension, which on a server is drawn by software.
- **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.
@@ -45,8 +45,7 @@ cannot).
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"
a software rasterizer: strings like `llvmpipe` or `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.
@@ -81,25 +80,10 @@ a real AudioContext output, and Windows screen metrics with a plausible availabl
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 each browser answers on the same page
![Two panels listing three values. navigator.webdriver differs, true against false. The
AudioContext sample rate is 48000 Hz in both. navigator.platform is Win32 in
both.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/can-a-website-tell-you-are-on-a-server-values.png)
Three values from one page served from `127.0.0.1`. The audio sample rate is `48000 Hz`
in both browsers and the platform string is `Win32` in both, so neither of those two is
the server tell on this host.
That is worth showing precisely because the section above is about a machine looking
like a server rather than a desktop. On a real desktop with a real audio device the
sample rate is ordinary in both, and the value that separates the two runs is the
automation flag, which is not a server signal at all.
## 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
The launch is two lines, and the browser you get back is a real Playwright `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
@@ -204,20 +188,6 @@ 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.
@@ -43,7 +43,7 @@ A one-of-a-kind fingerprint loses this even when every individual value is plaus
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.
combination is one real machines actually ship.
## Why a common configuration beats a clever one
@@ -99,9 +99,8 @@ with InvisiblePlaywright(seed=42) as browser:
# 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.
The `browser` returned is a real Playwright `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
@@ -177,13 +176,8 @@ a datacenter IP or a robotic pattern, and you supply the clean exit and the huma
## 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.
- The FingerprintJS open-source library's visitor ID model, read from its own source, for
how many components combine into one recognisable hash.
- 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.
@@ -80,22 +80,6 @@ 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.
## What changes when the values change
![Two panels listing three values. localStorage is available in both browsers, and both
report that the screen and the viewport differ, so neither looks like
resistFingerprinting is on. The canvas pixel hash differs between the two
panels.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/can-you-be-fingerprinted-in-incognito-mode-values.png)
Three values, read from one page served from `127.0.0.1`. `localStorage` is available in
both, which is the point of the section above: private mode is about state, and this
probe is not reading state.
The line that moves is the canvas, hashed from `getImageData` bytes rather than from
`toDataURL`, and the reason for that choice is measured in
[why a canvas hash changes between runs](canvas-fingerprint-changes-every-run.md): the
encoded string moves on its own even when the pixels do not.
## Changing the values themselves, not clearing storage
If the problem is that the fingerprint values are stable and readable, the fix is to
@@ -119,8 +119,7 @@ step so the download never lands on a request path:
```dockerfile
FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:0.12.10 /uv /uvx /bin/
RUN uv pip install --system invisible-playwright
RUN pip install invisible-playwright
# Unpack the engine at BUILD time, not per request.
RUN python -m invisible_playwright fetch
# ... your worker entrypoint ...
@@ -54,10 +54,10 @@ nothing for the others.
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.
invisible_playwright is built to solve layer 1 well, and it drives a real Firefox
binary, which means layer 1's network handshake is a genuine Firefox handshake rather
than 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
@@ -76,9 +76,9 @@ from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# navigator.webdriver reads false, the fingerprint is internally
# navigator.webdriver reads undefined, the fingerprint is internally
# consistent, and the TLS handshake is a real Firefox handshake
print(page.evaluate("navigator.webdriver")) # -> False
print(page.evaluate("navigator.webdriver")) # -> None
```
Add a proxy and let the browser timezone follow the exit automatically, which is how
@@ -109,9 +109,8 @@ 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
that is decided before your script runs. Around 90 percent of cheap proxies are
public and already known. 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
@@ -196,11 +195,9 @@ and behaviour layers are not in those tests at all.
- 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.
- The public detection suites named across this documentation set (sannysoft, CreepJS,
BotD, FingerprintJS, BrowserLeaks), each read from its own source rather than its
rendered verdict.
**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
@@ -1,146 +0,0 @@
---
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.*
+2 -52
View File
@@ -33,11 +33,8 @@ 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,
which is the direction you can rely on. The reverse does not hold as neatly: two
different identity seeds can land on the same hardware seed and hand you the same
readback, so a changed seed is not a guarantee of changed bytes. If you need two
sessions to look like two machines, check the readback rather than assuming it.
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
@@ -126,47 +123,6 @@ pages is that you [assert the presence of the right value rather than the absenc
wrong one](how-to-test-bot-detection.md), and this is a case where you can measure the
right value directly.
![Four sessions of the same page served from localhost. Two sessions launched without
a seed report different canvas and WebGL readback hashes and even a different device
pixel ratio, while two sessions launched with the same seed report identical hashes and
identical
pixels.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/canvas-seed-vs-no-seed.png)
Four sessions above, one page served from `127.0.0.1`, hashes computed inside the page
so the numbers and the picture come from the same run. The two unseeded sessions
disagree on both readbacks. The two seeded ones agree on both, and their screenshots
are identical pixel for pixel, 0 of 79,800 differing.
The detail worth noticing is that the drawing looks the same in all four panels. Your
eye cannot separate them; the hash separates them immediately. That is the shape of
this whole surface: the readback is not the picture, and a page that hashes it is not
looking at what you are looking at.
The second unseeded panel is also physically larger, because that session drew at a
different device pixel ratio. It is not only the readbacks that get redrawn per
session: the device does.
**Two things about that panel are worth stating precisely, because guessing them wrong
sends you debugging the wrong thing.**
**What changes on every unseeded launch is the device, not necessarily the readback.**
Five unseeded launches, reading four values each: the screen alternated between
1920x1080 and 2560x1440, the core count between 4 and 12, the device pixel ratio
between 1 and 1.25. All five moved. The canvas readback, over the same five launches,
returned the same value four times. So **two unseeded runs agreeing on a canvas hash is
not evidence that your seed took effect** - it is the likelier outcome. Check a value
that varies freely, like the screen or the core count, when you want to know whether a
new identity was drawn.
**And if you hash `toDataURL()`, you are partly hashing the PNG encoder.** On the
bundled Firefox, three launches drawing the identical canvas returned three different
`toDataURL()` hashes while `getImageData()` returned the same pixel bytes all three
times. The pixels never moved; the encoded string did. A canvas hash that changes
between two runs of a *stock* browser is usually this, not a fingerprinting defence, and
it is not something `privacy.fingerprintingProtection` or `privacy.resistFingerprinting`
explains: both were tested off and on, and the encoded string kept moving either way.
Compare `getImageData` bytes when you want to know whether the drawing changed.
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:
@@ -262,12 +218,6 @@ after launch and log it. Passing that number back reproduces the same device.
same cookies but a different fingerprint is a contradiction. Keep one stable seed per
durable identity.
**Should I hash `toDataURL()` or `getImageData()`?** `getImageData`, if you want to know
whether the drawing changed. Three launches of the bundled Firefox drawing the same
canvas returned three different `toDataURL` hashes and the same pixel bytes every time:
the encoded string moves on its own, so a data URL hash reports changes the canvas never
made.
## Sources
- The project's fingerprint generator, in which the canvas, WebGL and audio readbacks
-42
View File
@@ -133,22 +133,6 @@ pixel: [`measureText()` and its ten-plus numeric fields](measuretext-textmetrics
which fail the same way for the same reason if the noise added to them accumulates
instead of staying bounded.
## Substitution, seen on one page
![Two panels listing three values. The canvas pixel hash differs between the bundled
Firefox and the patched engine. The measureText width is 115.65 px in both, and both
report that the screen and the viewport differ.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/canvas-fingerprint-noise-values.png)
One page served from `127.0.0.1`, three values, two browsers. The canvas pixel hash
moves and the text width does not: `measureText` returns `115.65 px` in both.
That pairing is the distinction this page is built on. A substituted readback changes
what comes out of the canvas without changing the layout metrics the same text produces,
so a detector comparing the two does not find the mismatch that per-call noise creates.
The hash comes from `getImageData` bytes on purpose: `toDataURL` output moves between
launches on the bundled browser too, for encoder reasons that have nothing to do with
the drawing.
## Checking your own
```js
@@ -166,19 +150,6 @@ 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
@@ -203,19 +174,6 @@ also makes you identifiable as someone running that mode. There is
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
+21 -53
View File
@@ -12,7 +12,6 @@ nav_order: 9
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.
@@ -26,14 +25,13 @@ 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)
[`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),
[`getImageData`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData),
[`readPixels`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels),
a captured [`OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas),
and 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.
@@ -53,9 +51,7 @@ content for a legitimate reason. A reference probe - a handful of flat colours u
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
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.
@@ -66,9 +62,7 @@ intercepts every readback.
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
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
@@ -79,9 +73,7 @@ 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
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,
@@ -108,31 +100,16 @@ right on the machine it was tested on.
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
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
**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.
@@ -151,20 +128,6 @@ 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
@@ -173,9 +136,14 @@ 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.
## Sources
- 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).
---
*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.*
a Firefox patched at the C++ level, on making a seed mean the same machine regardless
of what it's actually running on.*
+27 -73
View File
@@ -21,11 +21,12 @@ and what that generalises to.
The check looks like this:
```js
Object.getOwnPropertyNames(window).find(k => k.startsWith('cdc_'))
Object.getOwnPropertyNames(document).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.
or the same thing scanning `window`. It is a two-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
@@ -50,31 +51,23 @@ 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.
The well-known remedy, and what [`undetected-chromedriver`](vs-undetected-chromedriver.md)
does, is to patch the binary and replace that literal with a different random-looking
string of the same length. Same length matters: it is an in-place patch of a compiled file, so the
replacement has to fit.
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.
That works against the check at the top of this page, because the check greps for
`cdc_`. It does not work against a slightly better one.
[`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.
The variables are still there, still on `document`, still a set of three related
names appearing together, still matching a shape no page author would produce. A
detector that looks for *the pattern* instead of the prefix, three own properties on
`document` with a common random-looking stem and typed suffixes, finds them again.
And because the patch has to preserve length, the shape of the replacement is
constrained in ways that make it recognisable.
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.
So: renaming raises the bar, it does not remove the surface. That distinction is the
whole point of this page, and it applies far beyond this one variable.
## The general shape of the problem
@@ -117,7 +110,7 @@ it.
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
1. `Object.getOwnPropertyNames(document)` and the same for `window`, 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.
@@ -130,33 +123,18 @@ order:
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.
**What is the `cdc_` variable?** A property ChromeDriver injects into the document,
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.
**Does renaming it in the binary work?** Against a check that greps for the exact
prefix, yes. Against a check looking for the *pattern*, three unexpected own properties
on `document`, no, because renaming does not remove them.
**How do I find it?** Enumerate `window`'s own properties and look for entries no normal
page has.
**How do I find it?** Enumerate `document`'s own properties and look for entries no
normal document has.
**Does Playwright have an equivalent?** Not this one, because it does not use
ChromeDriver, and not a comparable global either - checked directly, enumerating
@@ -172,30 +150,6 @@ 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.
---
-116
View File
@@ -1,116 +0,0 @@
---
title: "How to check a proxy's status before you rely on it"
description: "Liveness, exit location, latency and browser behaviour are four checks, not one. The order to run them, and what none of them can tell you about a site."
parent: "Network, Proxy and WebRTC"
grand_parent: "Guides"
nav_order: 40
---
# How to check a proxy's status before you rely on it
"Is my proxy working" is actually four separate questions, and treating it as
one is how people spend an hour debugging a browser fingerprint when the
proxy was down the whole time, or blame a working proxy for a site's own
block.
## The four checks, in the order to run them
**1. Is it alive at all?** Before touching a browser: `curl` through it and see
if you get a response.
```bash
curl -x socks5h://user:pass@host:port https://ifconfig.me
```
`socks5h` (not `socks5`) resolves DNS through the proxy rather than locally,
which matters for the leak question below. An HTTP proxy uses
`curl -x http://user:pass@host:port ...` instead. If this hangs or errors, stop
here - nothing downstream will work and no browser-level fix changes it.
**2. Where does it say it is exiting from?** The `ifconfig.me` response gives
you the exit IP. Check it against a geolocation lookup and against what you
expected to pay for. A proxy sold as "US residential" that resolves to a
datacenter ASN in a different country is not doing what you bought it for,
and this is worth catching before you spend time on anything else.
**3. Is it fast enough for what you are doing?** `curl -x ... -w "%{time_total}\n" -o /dev/null -s https://example.com`
gives you a round-trip number. A proxy that is technically alive but takes
eight seconds per request will make an automated flow look nothing like a
human's browsing rhythm, independent of any fingerprint concern.
**4. Does it hold up through an actual browser session, not just curl?** This
is the check people skip, and it is where a proxy that passes checks 1-3 can
still fail in practice. `curl` and a browser are different clients: a browser
opens more connections, resolves DNS differently depending on configuration,
and can leak the real address through WebRTC regardless of what the HTTP
proxy is doing correctly.
[How to check if a proxy leaks your real IP](how-to-check-proxy-ip-leak.md)
is the browser-level version of this check, and it is not optional if the
proxy's whole purpose is to hide the real address - a proxy that passes
`curl` but leaks over WebRTC has not actually done its job.
## What "proxy status" checks cannot tell you
None of the four checks above say anything about whether a *site* will let
you through. A perfectly healthy, correctly-exiting, fast proxy still gets
challenged if the browser behind it reports as automated, or if the exit
address has been used by enough other traffic to earn a bad reputation on
that specific site's own reputation database. Conflating "my proxy is up" with
"the site accepts my proxy's traffic" is a different confusion in the other
direction from the one above, and it sends people rotating proxies to fix a
browser-fingerprint problem.
## A quick reference for interpreting results
| Symptom | Likely cause | Where to look |
|---|---|---|
| curl through the proxy hangs or errors | Proxy is down or credentials are wrong | Check 1 |
| curl works, exit IP is wrong country/ASN | Wrong proxy config or provider issue | Check 2 |
| curl works, browser session times out | Browser-specific connection handling, or WebRTC leaking real address and site rejecting the mismatch | Check 4 |
| Everything above passes, site still blocks | Fingerprint, rate, or behavioural detection - not the proxy | See below |
If you have run all four checks and the proxy is confirmed healthy and
non-leaking, and you are still being challenged, the proxy has done its job
and the remaining problem is elsewhere.
[Why does my Playwright script get blocked?](why-does-my-playwright-script-get-blocked.md)
is the next page to read, and it starts from exactly this point: address
confirmed fine, now what.
## Short answers to the questions that lead here
**How do I know if my proxy is working?** Run `curl` through it against an IP
echo service before touching a browser. If that fails, nothing above it will
work either.
**Why does my proxy work in curl but not in my browser?** Different clients
handle DNS and WebRTC differently. A working `curl` test does not rule out a
WebRTC leak or a browser-specific connection issue.
**How often should I check a proxy's status?** Before every automated session
that depends on it mattering, if the proxy is shared or rotating - a proxy
that worked an hour ago can have changed reputation or gone down since.
**Does a slow proxy get detected more?** Indirectly: unusually slow, uniform
latency is itself a signal in aggregate behavioural analysis, separate from
whatever the proxy's address reputation is.
**Is a datacenter proxy always worse than residential?** Not universally - it
depends entirely on whether the specific site treats datacenter ranges
differently, which varies by site.
**See also:**
[How to check if a proxy leaks your real IP](how-to-check-proxy-ip-leak.md),
[Setting a proxy per Playwright context](set-geolocation-permissions-per-playwright-context.md),
and [WebRTC leak with a proxy](webrtc-leak-proxy.md).
## Sources
- [Playwright's documented proxy configuration](https://playwright.dev/python/docs/network#http-proxy), retrieved 2026-09-10, for how proxy credentials and per-context proxies are set.
- This project's own release gates, including the positive-form WebRTC check referenced in check 4, which replaced an earlier negative-only assertion that a fully blocked WebRTC connection could pass by mistake.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. The table above
exists because "the proxy isn't working" and "the site is blocking me" get
treated as the same sentence far more often than they are the same problem.*
+4 -4
View File
@@ -8,7 +8,7 @@ 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.
**Short answer:** no, they are not the same, and the gap moved in 2026 rather than 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
@@ -20,16 +20,16 @@ The gap is real, it moved in 2026, and one part of it is still a **compiled-in c
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
part that remains cannot be patched, why spoofing the user agent makes it worse rather than
better, and why Firefox has no equivalent gap.
## What Playwright ships today, checked directly, not assumed
## What Playwright ships today, checked directly rather than 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.
testing, pinned to the Playwright version rather than 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
+1 -1
View File
@@ -71,7 +71,7 @@ behaviour was lost:
| `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. |
| `clear-cache` | 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. |
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
+9 -11
View File
@@ -45,7 +45,7 @@ In a real browser those three agree by construction, because one piece of state
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:**
### 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
@@ -192,21 +192,19 @@ navigation.
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).
## Sources
- The User Agent Client Hints headers and `navigator.userAgentData`, as implemented in
Chromium and absent in Firefox.
- The Fetch Metadata request headers, `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).
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
-188
View File
@@ -1,188 +0,0 @@
---
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
@@ -1,86 +0,0 @@
---
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
@@ -1,239 +0,0 @@
---
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.*
-255
View File
@@ -1,255 +0,0 @@
---
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. A gate built on that idea alone exists in the open, and
[Anubis is readable end to end](anubis-proof-of-work-explained.md) in a way Turnstile
is not, which makes it the cheapest way to see what this layer can and cannot decide.
**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 shape is the part worth internalising: a value being wrong matters less
than two values disagreeing, which is why a mismatch like
[a platform string that contradicts the oscpu beside it](navigator-platform-oscpu-consistency.md)
is a stronger signal than either field on its own.
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,
and a click carries its own provenance:
[a click dispatched from page JavaScript is never trusted](playwright-clicks-istrusted.md),
while one produced by the driver or the engine is.
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.*
-37
View File
@@ -18,35 +18,6 @@ Start with [Three ways to make Playwright undetected](playwright-stealth-levels.
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.
@@ -56,12 +27,6 @@ need rendering. Each page below states where the other tool covers more.
- [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.
- [Selenium vs Playwright: the actual differences](difference-between-selenium-and-playwright.md) - Protocol, driver architecture and auto-waiting compared from each project's own docs, plus the one difference neither's docs foreground.
- [Alternative Chromium browsers for automation](alternative-chromium-browsers-for-automation.md) - Brave, Edge, Opera, Vivaldi: what actually differs between the forks, and why none of it touches the CDP-level tells that matter.
- [Browser automation testing tools, and where each one actually fits](browser-automation-testing-tools.md) - Playwright, Selenium, Cypress, Puppeteer by what they were each built to test, not by feature-list length.
## Patched-engine, driver-patch and stealth-plugin tools
@@ -95,8 +60,6 @@ need rendering. Each page below states where the other tool covers more.
- [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.
+186 -15
View File
@@ -1,6 +1,6 @@
---
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 invisible_playwright_mcp wiki."
description: "Computer-use agents click by pixel, not DOM, so driver flags are moot for them. Engine fingerprint and action rhythm remain the detectable signals."
parent: "AI Agents and Frameworks"
grand_parent: "Guides"
nav_order: 6
@@ -9,20 +9,191 @@ nav_order: 6
# Computer-use agents and browser fingerprint detection
This page moved to the invisible_playwright_mcp wiki, retargeted at the question people
actually search:
A computer-use agent (CUA) does not read the DOM to decide where to act. It takes a
screenshot, sends the image to a vision model, gets back a pixel coordinate, clicks
there, and takes another screenshot. That loop is the whole architecture of OpenAI's
Computer-Using Agent and of Anthropic's computer-use tool, and it changes which
detection signals matter and which stop mattering.
**[Claude computer use detected as a bot](https://github.com/feder-cr/invisible_playwright_mcp/wiki/claude-computer-use-detected-as-bot)**
This page is about that shift: why the automation flags people usually worry about are
moot for a coordinate agent, what is still checkable underneath it, and where
invisible_playwright helps and where you still have to do the work yourself.
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.
## Why the driver flags stop mattering
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).
A CUA never triggers the DOM-automation flags sites check for, because its click is a
coordinate delivered through the input pipeline the same way a real click is, not a
script reaching into the page. Most bot-detection advice targets that automation layer
anyway: `navigator.webdriver`, leftover automation globals, DOM mutations that only a
driver produces, an untrusted event dispatched from code rather than from hardware.
Those signals exist because a selector-driven script reaches into the page and touches
elements directly.
A CUA does not do that. It never calls `querySelector`, never sets an element's
value from script, never dispatches a synthetic event at a node it located by selector.
So the whole family of DOM-automation tells is [mostly not the thing that catches
it](navigator-webdriver-explained.md) - not because the agent hides them, but because
it never generates them in the first place.
That is the part people get wrong. They read that agents are hard to detect and assume
the fingerprint is solved. It is not solved. It is bypassed by the input method, and
two other surfaces are completely untouched by that fact.
## What stays checkable: the engine fingerprint
The agent clicks by coordinate, but the click still lands in a browser, and that
browser answers JavaScript. The site's own scripts still ask the engine what it is:
the WebGL renderer string, the canvas hash, the audio context, the installed fonts, the
screen geometry, the codec list. None of that goes through the DOM the agent avoids. It
goes through the ordinary JS surface every page can read, and a stock automation build
running on a server answers those questions like a server.
This is the surface invisible_playwright is built for. It is a Firefox patched at the
C++ level so the engine renders like a real Windows Firefox: the GPU strings, the
canvas and audio hashes, the font set and the screen all report values a real desktop
would report, derived from one seed so they stay consistent with each other. A
detector cross-checking those fields against one another finds agreement instead of the
contradictions a [half-patched or double-patched stack](playwright-stealth-levels.md)
produces.
The two-line launch is the same whether a human or a vision model drives it:
```python
from invisible_playwright import InvisiblePlaywright
# seed=42 makes the whole fingerprint reproducible run to run
with InvisiblePlaywright(seed=42) as browser:
page = browser.new_page()
page.goto("https://example.com")
# the screenshot -> click(x, y) -> screenshot loop a CUA runs
png = page.screenshot() # frame you hand to the vision model
x, y = 480, 320 # coordinate the model returns
page.mouse.click(x, y) # lands through the real input pipeline
png = page.screenshot() # next frame
```
`browser` here is a real Playwright `Browser`, so
[`page.screenshot()`](https://playwright.dev/python/docs/api/class-page#page-screenshot)
and [`page.mouse.click()`](https://playwright.dev/python/docs/api/class-mouse#mouse-click)
are the ordinary documented methods - the same ones a coordinate-clicking agent already
calls. There is no special CUA API to adopt. You feed the screenshot to whatever model
you use and feed its coordinate back to `page.mouse.click`.
## What stays checkable: the action rhythm
The second surface the input method does not fix is timing, and it is the one specific
to agents.
A CUA's loop has a shape. Screenshot, then a pause while a model processes the image and
decides, then a click, then another screenshot. That thinking pause is roughly the same
length every step because it is model latency, not human hesitation, and it repeats with
a regularity no person produces. A human pause varies with what is on screen, drifts,
gets distracted, double-checks. A model's pause is a distribution centered on its
inference time.
invisible_playwright gives the pointer a Bezier-curve path between coordinates rather
than a teleport, which removes the crudest motion tell. It does not reshape the
step-to-step rhythm of your agent loop, because that rhythm is produced by your model
and your code, not by the browser. If your loop clicks every 1.9 seconds because that is
how long the model takes, the engine cannot know to vary it. You add the variance:
jitter the delay between steps, and do not click the instant a screenshot returns. This
is [the pause shaped like model latency](ai-browser-agents-stealth.md), and it is
behaviour, which no fingerprint layer reaches.
## What invisible_playwright does not do
Being honest about the boundary is the point, because a coordinate agent makes it easy
to believe more is handled than actually is.
- **It does not change your IP.** The engine can look like a real Windows desktop and
still be sitting on a datacenter address that a site distrusts on sight. A perfect
fingerprint on a known-bad exit still loses. Bring a clean proxy; the engine cannot
supply one.
- **It does not fix per-account quotas or rate limits.** Those are counted server-side
against your account and address, and no browser property touches them.
- **It does not pace your agent.** The step rhythm above is yours to vary. The engine
handles the pointer path, not the schedule your loop runs on.
- **It does not see the DOM for you.** A CUA works by pixels precisely because it does
not read structure. invisible_playwright does not add DOM understanding; it makes the
browser those pixels are rendered in look real.
What it does do is remove the engine fingerprint from the list of things that give you
away, so that TLS, the driver layer and the render surface read as a genuine Firefox.
That is why it passes most fingerprint checks. It is not why a session with a bad IP and
a metronome rhythm passes, because it does not claim to fix those.
## A measurement worth trusting more than a verdict
The useful test for a CUA setup is not "did the suite say human". It is a field-by-field
comparison against a stock browser on the same machine, because the agent's own loop can
introduce timing the browser knows nothing about.
Open a fingerprinting page under invisible_playwright and under a stock Firefox on the
same host, and diff the reports. On the engine surface the two should agree: same GPU
family, a canvas hash that is stable across two reads in the same session (a hash that
changes per call is [a randomiser announcing itself](canvas-fingerprint-noise.md)), a
font list that belongs to the platform the user agent claims. Where they still differ,
after the address, is your candidate. A [software WebGL renderer or a
datacenter-shaped machine](playwright-docker-detection.md) survives every property patch
because it is not the engine's to change, and it is the most common reason a clean-looking
agent still gets a different page. Run it ten times, not once, because this domain is not
deterministic and a single green run is not a pass.
## Conclusion
Vision and coordinate agents move the detection problem, they do not remove it. The
DOM-automation flags that dominate ordinary Playwright advice are moot for them, because
a click delivered by pixel never generates those flags. What remains is the engine
fingerprint the site reads through its own JavaScript, and the machine-regular rhythm of
the screenshot-click loop. invisible_playwright answers the first: it makes the browser
render like a real Windows Firefox, seed-reproducible and self-consistent. The second is
yours - vary the timing - and so is the IP - bring a clean one. Handle all three and the
agent looks like a person on a real machine. Handle only the browser and you have a real
browser clicking like a robot.
## Short answers to the questions that lead here
**Do computer-use agents get detected as bots?** Not usually through `navigator.webdriver`
or DOM automation flags, because a coordinate click never produces them. They get caught
on the engine fingerprint, on the IP, or on the regular timing of the screenshot-click
loop.
**Does invisible_playwright work with OpenAI or Anthropic computer-use?** Yes. It returns
a real Playwright `Browser`, so `page.screenshot()` and `page.mouse.click(x, y)` - the
two calls a coordinate agent needs - work exactly as documented, on a Firefox that
renders like a real Windows desktop.
**If the agent clicks by pixel, is the fingerprint irrelevant?** No. The click method
avoids DOM tells, but the site still reads the engine through JavaScript. GPU, canvas,
audio, fonts and screen are all still checkable, and a stock server build answers them
like a server.
**Will it stop my agent being rate-limited?** No. Quotas and rate limits are counted
server-side against your account and address. No browser property changes them.
**How do I make the timing look human?** Jitter the delay between loop steps and do not
click the instant a screenshot returns. The engine varies the pointer path; the
step-to-step rhythm is produced by your model and your code, so you vary that.
**Does it fix my IP?** No. It makes the browser look real; it does not change the exit.
A real-looking browser on a datacenter address still loses, so bring a clean proxy.
## Sources
- OpenAI's Computer-Using Agent and Anthropic's computer-use tool, both of which drive a
browser through a screenshot to coordinate-click to screenshot loop rather than by DOM
selector.
- This project's own fingerprint gates and the stock-browser comparison method used to
separate an engine tell from a machine tell from a timing tell.
**See also:** [AI browser agents and stealth](ai-browser-agents-stealth.md) for the
agent-specific timing tell in depth, [browser-use and what you can change](browser-use-detection.md)
for a selector-driven agent by contrast, and [why you can be blocked with a clean
fingerprint](why-blocked-with-a-clean-fingerprint.md) for the surfaces past the browser.
---
*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 makes the
browser real; the pacing and the proxy are still yours to bring.*
+1 -2
View File
@@ -71,8 +71,7 @@ row is for a specific situation.
| Variable | When you need it |
|---|---|
| `INVISIBLE_PLAYWRIGHT_CACHE_DIR` | Put the cache somewhere else - another drive, a shared location, a path your CI already caches. It holds the engine and this machine's state (the GeoIP database, the font manifest) |
| `INVISIBLE_PLAYWRIGHT_ENGINE_DIR` | Keep the engine apart from the state, for example on a read-only disk built once per release: `invisible-playwright fetch` with it set fills it, and a launch only reads it. The cache directory must still be writable |
| `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 |
@@ -1,205 +0,0 @@
---
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.
That is worth reading as a property of the layer, not an accident. An init script is
page JavaScript, and page JavaScript is the outermost of
[the three levels anything can be changed at](playwright-stealth-levels.md): it is the
level the page itself is allowed to have an opinion about, and CSP is the page
exercising that opinion.
## 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. It belongs on the same list as every other setting that
makes a session behave unlike a visitor's, which is the list
[the checklist for a session being detected](playwright-detected-as-bot.md) works
through in order.
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.*
+3 -25
View File
@@ -24,23 +24,20 @@ The project is organised into modules that map onto surfaces: `canvas`, `webgl`,
`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:
Then there are four 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).
Four techniques, all visible in `src/lies/index.ts`.
**A pristine reference.** It creates fresh iframes and reaches into
[`contentWindow`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow)
@@ -107,9 +104,7 @@ 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
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.
@@ -147,23 +142,6 @@ 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.
---
-305
View File
@@ -1,305 +0,0 @@
---
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.*
-31
View File
@@ -162,20 +162,6 @@ For the third one the absolute number means nothing. Run it in your automated br
and in a normal browser on the same machine and compare the ratio. A large gap is the
JIT being off, and no property-level fix addresses it.
## Conclusion
An attached debugger is not a value on the page. It is a change in how the engine
behaves. That change produced four separate leaks: the timing cost of debug mode, stack
frames and eval labels naming the automation layer, a garbage-collection and allocation
side channel left active even with debug mode off, and a helper that touched the page's
own prototypes before the page existed.
A related leak in the same file made every evaluated script announce a user gesture
nobody made. The fourth was the one that mattered: a controlled experiment showed it was
the difference between being blocked and not, with everything else held constant. None
of this is readable as a property. It shows up only when you time the same code against
a stock browser and read what the stack says about itself.
## Short answers to the questions that lead here
**Why does a fingerprinting service report devtools when nothing is open?** Because an
@@ -201,23 +187,6 @@ page's world before the page has the same class of problem.
machine, on timing and on stack contents, rather than on values. Every one of these was
invisible in a property dump.
## Sources
- This project's own comparison against a stock Firefox on the same machine, on timing
and on stack contents, which is how all four leaks on this page were found and closed.
- SpiderMonkey source: [`Realm::setIsDebuggee()`](https://searchfox.org/mozilla-central/source/js/src/vm/Realm.cpp)
and [`Realm::hasDebuggers()`](https://searchfox.org/mozilla-central/source/js/src/vm/Realm.h),
retrieved 2026-08-28, for the debuggee flag fix one clears and the debugger-list
check fix three found still set.
- Mozilla's [`Debugger.Frame.prototype.eval` reference](https://firefox-source-docs.mozilla.org/devtools-user/debugger-api/debugger.frame/index.html)
and the [`Debugger.Source` introduction-type list](https://searchfox.org/mozilla-central/source/js/src/doc/Debugger/Debugger.Source.md),
retrieved 2026-08-28, for the `debugger eval code` label and the `debugger eval`
introduction type described in fix two.
- [MDN: `Error.stack`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack),
for the stack-trace leaks described in fix two.
- [MDN: the `UserActivation` interface](https://developer.mozilla.org/en-US/docs/Web/API/UserActivation),
for `isActive` and `hasBeenActive`, the properties the injected user gesture set.
**See also:** [Function.prototype.toString and the native code check](tostring-native-code-detection.md),
for the property-level half of the same story, and
[three ways to make Playwright undetected](playwright-stealth-levels.md), where the
+1 -37
View File
@@ -56,36 +56,6 @@ useful to a detector: it is stable for one machine, and it varies between
machines, because the installed-font set is one of the more distinctive things
about a device.
### The blind spot in that snippet, measured
The probe above is the one detectors use, and it has a false negative worth knowing
before you trust its output: **a family that IS the fallback is invisible to it.**
![The probe run on one Windows machine across three browsers, each testing ten
families against two different fallbacks. Segoe UI, Calibri, Cambria and Tahoma read
present against both fallbacks. Consolas reads absent against the monospace fallback
and present against the serif one. An invented control family reads absent
everywhere. All three browsers return the same
answer.](https://raw.githubusercontent.com/feder-cr/invisible_playwright/main/docs/img/font-presence-probe-three-arms.png)
Run that exact function over ten families with `monospace` as the fallback, on Windows,
and Consolas comes back **absent**. Consolas is installed. It is also what `monospace`
resolves to on that machine, so the candidate width and the baseline width are the same
number, and the comparison reads "fell back" when nothing fell back.
Swap the fallback to `serif` and the same family reads **present**, on the same page in
the same session. The invented control family stays absent under both, which is what
makes the Consolas row a finding, not a broken probe.
So the rule stated above holds with one exception: an identical width means the
candidate did not render *or* the candidate is the fallback. A detector that probes
against a single generic will systematically miss whichever family that generic points
at, and which family that is depends on the platform.
The other thing the three panels show is that the answer does not move. The bundled
Firefox headful, the same build headless, and an engine carrying its own font set all
return the same ten bits on this host.
## Why this is different from hashing measureText
It is easy to lump this in with `measureText` fingerprinting, but the two probe
@@ -124,7 +94,7 @@ consumer operating system, and that mismatch is the signal.
Claiming Windows in the user agent while the font vector is a Linux base image
is a one-line contradiction, and it is exactly the kind of internal disagreement
that [a browser that inspects consistency, not values](how-to-test-bot-detection.md)
that [a browser that inspects consistency rather than values](how-to-test-bot-detection.md)
records as a lie.
The same probe list produces a different vector in each of these three cases:
@@ -271,12 +241,6 @@ font set is built from one manifest on every OS, and the width for a run carries
single bounded, seed-derived offset instead of the host rasterizer's metrics, so
the numbers track the seed rather than the operating system.
**Why does the probe say a font is missing when I know it is installed?** Because the
candidate is the fallback. Measured on Windows: `Consolas` reads absent against a
`monospace` fallback and present against a `serif` one, in the same session, since
`monospace` resolves to Consolas there and the two widths match. Probe against a second
generic before believing an absent.
## Sources
- This project's font architecture notes: a bundled Windows font set built from a
@@ -1,157 +0,0 @@
---
title: "Selenium vs Playwright: the differences that matter"
description: "Protocol, driver architecture, auto-waiting and browser support from each project's own docs, plus the one difference neither project's docs foregrounds."
parent: "Comparisons"
nav_order: 39
---
# Selenium vs Playwright: the actual differences
Both drive a real browser. The differences that matter are in how they talk to
it, not in what either one can technically click, and most comparisons stop
before the difference that a defended site actually reads.
## Protocol
**Selenium** speaks the W3C WebDriver protocol: your test code sends an HTTP
request to a driver process (geckodriver, chromedriver), which translates it
into browser-specific automation calls. That extra hop is a JSON server in the
middle of every action.
**Playwright** speaks each browser's own remote-debugging protocol directly -
CDP for Chromium, its own protocol for Firefox and WebKit - with no
intermediate driver process. One fewer moving part, and it is also why
Playwright ships its own browser builds rather than driving whatever happens
to be installed.
The practical consequence: Playwright is generally faster and has fewer version
mismatches to manage, because there is no separate driver binary to keep in
sync with the browser. Selenium's WebDriver layer is a published spec, which
is why so many languages and tools speak it; Playwright's protocols are not a
public spec, which is why Playwright itself has to ship the client libraries.
## Auto-waiting
Selenium waits for an element to exist. Playwright waits for it to be
**actionable** - visible, stable, not covered by another element, not
disabled - before acting on it. This single design choice removes a large
share of the flaky-test problem Selenium suites are known for, where a test
clicks an element that technically exists but has not finished animating into
place.
You can build the same waiting logic into a Selenium suite by hand. Playwright
builds it into every action by default.
## Browser support and architecture
Selenium supports whatever has a WebDriver implementation: Chrome, Firefox,
Edge, Safari, and older browsers nobody ships anymore. Playwright supports
Chromium, Firefox and WebKit, using patched builds it maintains itself rather
than the retail installs on your machine.
That difference cuts both ways. Selenium can drive the exact browser your users
have, retail build and all. Playwright's browsers are a known, pinned,
Playwright-maintained artifact - consistent across machines, and also a
specific automation build with its own fingerprint, discussed below.
## Language and ecosystem
Selenium has bindings older and wider than Playwright's: every mainstream
language, decades of Stack Overflow answers, and a WebDriver spec that other
tools (Appium, for mobile) build on. Playwright covers JavaScript/TypeScript,
Python, Java and .NET officially, younger, with fewer historical workarounds
needed because the API was designed after auto-waiting was already a known
problem.
## The difference neither project's own docs foreground
Both are legitimate testing tools built for testing, and neither one was
designed against adversarial detection. But they end up in different places on
that axis anyway, for structural reasons:
**[`navigator.webdriver`](navigator-webdriver-explained.md) is `true` under
both by default**, because it is part of the WebDriver spec both implement,
not a Selenium-specific flag.
**Selenium via geckodriver or chromedriver adds an extra network hop and
process**, which shows up in timing and in a few CDP/WebDriver-specific
properties a determined detector can check for.
**Playwright's own browser builds [carry properties that differ from a retail
install](chromium-is-not-chrome.md)** - build flags, missing OS integration
pieces, a UA string that can disagree with what the build actually is -
because they were built for automation, not for the browser vendor's own
release pipeline.
Neither framework is "worse" here; both are automation tooling used the way
automation tooling looks, which is a separate question from which one has the
nicer API.
**And the layer below both of them is bigger than the gap between them.**
Measured in this project on one build, the same seed, changing only the host:
font ascent and descent diverged on **58 of 72 families** (up to 27px at 72pt)
and line-box height on 61, while **every advance width already matched**,
because shaping is the same in-tree library on both. None of that is Selenium
or Playwright; it is what the engine and the machine underneath either of them
report. Choosing between the two frameworks does not move any of those 58
families. This project exists because of that gap:
[invisible_playwright](https://github.com/feder-cr/invisible_playwright) is
Playwright's own API, unchanged, driving a Firefox patched at the C++ source
rather than the stock build - same protocol and auto-waiting Playwright always
had, different browser underneath. It does not touch Selenium's side of this
at all.
[Migrating from Selenium to Playwright for stealth](migrate-selenium-to-playwright-stealth.md)
is the practical guide if the browser, not the API, is your actual problem.
## Which to pick
- **An existing large Selenium suite, no detection problem:** stay. Rewriting a
working suite for architecture purity is rarely worth it.
- **A new suite, no detection problem:** Playwright, for auto-waiting alone.
- **Automation is being recognized and you need the retail browser exactly as
your users have it:** Selenium can drive it directly; Playwright's patched
builds are a different thing, unless you point it at a real engine as this
project does.
- **Automation is being recognized and you can accept a modified engine:**
Playwright with a patched build.
## Short answers to the questions that lead here
**Is Playwright faster than Selenium?** Generally yes, from the missing driver
hop and less flakiness from auto-waiting, not from any raw execution
advantage.
**Is Playwright replacing Selenium?** For new projects, largely, but Selenium's
installed base and WebDriver's status as a real spec keep it relevant,
especially where Appium and mobile matter.
**Does Selenium still get updates?** Yes, actively maintained, including 4.x's
own move toward Chrome DevTools Protocol features alongside WebDriver.
**Which one is more detectable?** Neither is inherently worse; both default to
`navigator.webdriver = true` and both are recognizable automation stacks
unless something changes the underlying browser.
**Can I use Playwright's API with Selenium's driver model?** No, they are
separate protocols end to end. Patchright and similar projects patch
Playwright's own driver instead of switching protocols.
**See also:**
[selenium-driverless vs invisible_playwright](vs-selenium-driverless.md) for the
driver-removal approach from Selenium's side, and
[Firefox or Chromium for anti-detect automation](firefox-vs-chromium-antidetect.md)
for the engine question once you have picked a framework.
## Sources
- [Selenium's own documentation on WebDriver and its components](https://www.selenium.dev/documentation/overview/components/), retrieved 2026-09-10.
- [Playwright's documentation on browsers and why it ships its own builds](https://playwright.dev/python/docs/browsers), retrieved 2026-09-10.
- [MDN, `Navigator.webdriver`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver) and the [WebDriver specification](https://www.w3.org/TR/webdriver2/#interface), for the flag both frameworks inherit.
- This project's own fingerprint gates, for the claim that a patched engine changes what the browser reports versus what Playwright's stock builds report.
---
*Written while maintaining [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. This page compares
frameworks, not engines - the engine question is a separate page, linked above,
because conflating them is the most common mistake in this comparison.*
-58
View File
@@ -1,58 +0,0 @@
---
title: "Differences from Playwright"
description: "Where invisible-playwright deliberately behaves differently from upstream Playwright, what it refuses, and why each one is a choice rather than a gap."
parent: "Documentation"
nav_order: 6
---
# Differences from Playwright
invisible-playwright adds nothing to Playwright's API: every method, option and
argument is Playwright's own. Where it cannot do what Playwright does without leaving
something a page can see, or without claiming to have done something it did not, it
says so with an error instead of pretending. This page lists those places.
## Objects that are not implemented
These exist only so the object tree is well formed. Every call on them raises an error
that names the reason.
| Object | Why |
|---|---|
| `Tracing` | It records a session for the trace viewer and drives none of it. `tracing.stop()` is accepted and does nothing, so code that always stops a trace keeps working. |
| `APIRequestContext` (`context.request`, `playwright.request`) | It sends HTTP from outside the page, without the browser's fingerprint, which is the opposite of what this package is for. |
## Calls that are refused
| Call | What happens | Why |
|---|---|---|
| `set_input_files()` with a folder | Error | The engine takes files. Pass the files inside the folder. |
| `set_input_files()` with an in-memory payload | Works, but `mimeType` is ignored | The payload is written to a file and handed over the way a user's pick is, so Firefox derives the type from the file name, as it does for a real pick. |
| `drop()` with an explicit data payload | Error | The engine builds the `DataTransfer` from a real pointer drag. Use `drag_and_drop()`. |
| `route_web_socket()` | Error | The engine reports WebSocket frames but cannot hold or rewrite one, so a route would look like it worked and pass everything through. |
| Screencast to a video file | Error | The engine streams JPEG frames and has no encoder. Pass `on_frame=` to receive the frames. |
| `register_selector_engine()` or `set_test_id_attribute()` after a page exists | Error | Both are built into the page's injected script when it is created. Call them before the first page. |
| `expose_binding()`, `expose_function()` | Error, not implemented yet | The page-facing half is easy; the reply path into the page's promise is not wired, and a binding that never answers would hang the page. |
| `set_storage_state()` with per-origin `localStorage` | Error, not implemented yet | Restoring only the cookies would look like success and leave half the session missing. |
| `response.body()` on a very large or old response | Error | The engine keeps at most 100 MB of response bodies per tab and 10 MB per response. Read the body sooner. |
## Behaviour that differs on purpose
- **`service_workers="block"`** is honoured by the engine itself, per context, with
no page script: `register()` fails the way it fails when the worker's script is
unreachable, and `navigator.serviceWorker` stays native. Playwright does it with a
page script whose source names Playwright. On a persistent profile, turning the
block on removes the service workers the profile had saved for that context, and
they do not come back when the block is turned off.
- **Language.** `locale="auto"` (the default) declares the language of a Firefox
build people in the proxy's country actually run. An explicit `locale` is
`navigator.language`, followed by the fallbacks Firefox itself adds
(`en-AU, en-US, en`).
- **Human input.** With `humanize=True` (the default) the pointer moves along a paced
path, typing pauses before the first key, and a file chooser waits as a person
looking for the file does. Calls take longer than in Playwright, and the page sees a
person's timing.
- **The server speaks to this client only.** The bundled Playwright client and the
bundled server are versioned together; a stock Playwright client cannot drive the
server directly.
+1 -1
View File
@@ -141,7 +141,7 @@ Playwright method works unchanged because there is no wrapped subset to learn.
Install is the ordinary way, and the engine downloads itself on first use:
```bash
uv add invisible-playwright
pip install invisible-playwright
```
That is the engine layer, in full, scriptable. What it does not print is a
@@ -12,7 +12,7 @@ nav_order: 12
No. A VPN changes one thing: the IP address the server sees. The browser
fingerprint - canvas, WebGL, installed fonts, the user agent, the timezone, the
hardware counters - is exactly what it was before you connected. Worse, a VPN can
make a session look more suspicious, not less, because it introduces a second
make a session look more suspicious rather than less, because it introduces a second
story about where you are and gives a detector two stories to compare.
This page is what a VPN moves, what it leaves in place, the specific way it can
@@ -35,7 +35,7 @@ different problem with a different owner.
## What a VPN leaves untouched
Open any fingerprinting report through a VPN and read the fields, not the
Open any fingerprinting report through a VPN and read the fields rather than the
verdict. The address at the top has changed. Nothing below it has:
- **[Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) and
@@ -17,7 +17,7 @@ exists precisely because cookies can be cleared and it wanted an identifier that
could not.
This page explains the difference between the two, why the second one ignores the
first, what changes the identity, and where the honest limits of the fingerprint
first, what does change the identity, and where the honest limits of the fingerprint
layer are.
## What a cookie is, and what a fingerprint is
@@ -50,12 +50,11 @@ Clear your cookies, clear local storage, open a private window, and then reload
fingerprinting page. The canvas still draws the same pixels, so it hashes to the same
value. WebGL still reports the same renderer. The font probe still finds the same
list. The audio path still returns the same numbers. Combine those and you get the
same identifier you had five minutes ago, because none of the inputs changed. Canvas,
WebGL, fonts and audio are four of the roughly forty-one components
[a FingerprintJS visitor ID hashes together](fingerprintjs-visitor-id.md), and a hash
of unchanged inputs is unchanged output.
same identifier you had five minutes ago, because none of the inputs changed. The
[FingerprintJS visitor ID is a hash of exactly these components](fingerprintjs-visitor-id.md),
and a hash of unchanged inputs is unchanged output.
This is why "clear cookies between sessions" does not rotate you into a new identity. It
This is why "clear cookies between sessions" does not rotate you a new identity. It
rotates the one thing that was trivial to rotate and leaves untouched every signal
that was hard to. A detector that leans on the fingerprint rather than the cookie is
built specifically to not care what you did to your storage.
@@ -86,8 +85,7 @@ so they agree with each other. Switching seeds is what a cookie clear is trying
failing to be.
The launch is the standard two-line change, and the object you get back is a real
Playwright [`Browser`](https://playwright.dev/python/docs/api/class-browser) with every
method intact:
Playwright `Browser` with every method intact:
```python
from invisible_playwright import InvisiblePlaywright
@@ -185,14 +183,6 @@ which is most checks but not all of them. Behaviour, pacing and IP are still on
- This project's fingerprint generator, which derives canvas, WebGL, font, audio and
screen values together from a single seed so a new identity is internally consistent.
- MDN Web Docs, [`HTMLCanvasElement.toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL),
[`WEBGL_debug_renderer_info`](https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info),
and the [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API),
retrieved 2026-08-28, for the canvas, WebGL and audio surfaces referenced above.
- FingerprintJS's own open-source library, [`fingerprintjs/fingerprintjs`](https://github.com/fingerprintjs/fingerprintjs)
on GitHub, retrieved 2026-08-28, for the visitor ID hash mentioned above.
- Playwright documentation, [`Browser`](https://playwright.dev/python/docs/api/class-browser),
retrieved 2026-08-28, for the object returned by the launch call shown above.
- The public detection suites named across this set, read for which components feed
the identifier and which of them a storage clear leaves untouched.
- The release gates that separate the fingerprint layer from IP and behaviour, so a
@@ -181,14 +181,9 @@ engine's and is the same regardless.
## Sources
- The TLS 1.3 specification, [RFC 8446](https://datatracker.ietf.org/doc/html/rfc8446),
retrieved 2026-08-28, for what the `ClientHello` message actually contains.
- The HTTP/2 specification, [RFC 9113](https://datatracker.ietf.org/doc/html/rfc9113),
retrieved 2026-08-28, for what the `SETTINGS` frame actually contains.
- Salesforce's own GitHub repository for [JA3](https://github.com/salesforce/ja3),
retrieved 2026-08-28, for the public JA3 definition and how the fields are hashed into a fingerprint.
- FoxIO's own GitHub repository for [JA4](https://github.com/FoxIO-LLC/ja4),
retrieved 2026-08-28, for the public JA4 definition.
- The TLS 1.3 and HTTP/2 specifications for what the `ClientHello` and `SETTINGS`
frames actually contain, and the public JA3 and JA4 definitions for how those
are hashed into a fingerprint.
- This project's own comparison method: capturing a handshake from a session and
from a stock Firefox on the same machine and diffing the result, rather than
trusting a verdict.
-12
View File
@@ -81,18 +81,6 @@ All three are page-visible because they live in the document or the global scope
them is the control channel. Fixing them is a matter of not writing them into the page in
the first place, which is a design decision, not a runtime patch.
There is a fourth, and it is the one you control rather than one the browser decides:
**an init script of your own that throws reaches the page.** A script added with
`page.add_init_script()` runs in the page's own realm, so a callback it registers - an
event listener, a timer, a promise - throws into that realm like any other page code.
An uncaught one reaches the page's `window.onerror` with `"eval code"` as its source,
which is a string a document that never calls `eval` has no other way to produce. The
browser's own injection does not do this: measured on a page that installs `onerror`,
a capturing `error` listener and `unhandledrejection` before anything else, then reads
every surface this package spoofs, nothing surfaces across repeated loads, reloads and
an iframe. So keep your own init scripts inside `try { } catch { }`, especially the
callbacks they leave behind, and prefer feature checks over assuming a property exists.
## Chromium injects cdc_ into the document; Firefox through Juggler does not
Chromium-based tooling writes `cdc_`-prefixed properties into the page; Firefox driven
@@ -37,10 +37,10 @@ On a plain Playwright launch of the same engine that prints `True`. The value ab
comes back `False`, and the rest of this page is about why the difference between those
two lines is not one character of JavaScript.
A clean, human-driven browser reports `false` here. Chromium used to differ: before
Chrome 89 shipped in 2021, an untouched browser left the property `undefined`, and a
hand-set `false` was itself an anomaly. Chrome has reported a plain `false` ever since,
matching Firefox and the spec, which is what this engine returns.
A clean, human-driven browser reports `false` here. Note that this is different from the
Chromium story, where an untouched browser reports `undefined` and a hand-set `false` is
itself an anomaly. On Firefox the honest value is a plain `false`, which is what this
engine returns.
## Why that boolean is such an old tell
@@ -179,9 +179,8 @@ property lands on the wrong object, so you have added two tells to remove one.
`Function.prototype.toString`, and by walking the prototype chain to see that the
property moved onto the instance.
**What should a clean Firefox report?** A plain `false`. Chromium reported `undefined`
here before Chrome 89 in 2021; every version since reports `false` too, matching Firefox
and the spec.
**What should a clean Firefox report?** A plain `false`. That is different from Chromium,
where an untouched browser reports `undefined` and a hand-set `false` is itself odd.
**Does invisible_playwright fake the value?** No. It returns `false` from the browser's
own native code path, so there is no JavaScript getter to inspect and no own property to
@@ -193,16 +192,10 @@ of which you still have to supply.
## Sources
- The W3C WebDriver specification, [WebDriver](https://www.w3.org/TR/webdriver2/),
retrieved 2026-08-28, which defines `navigator.webdriver` and requires an
- The WebDriver specification, which defines `navigator.webdriver` and requires an
automated user agent to expose it as `true`.
- MDN Web Docs, [`Function.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString),
retrieved 2026-08-28, whose `[native code]` behaviour for builtins is the
- `Function.prototype.toString`, whose `[native code]` behaviour for builtins is the
standard mechanism behind the getter-source check.
- The Chromium project's own record of the change,
[Intent to Ship: navigator.webdriver === false when automation is not enabled](https://groups.google.com/a/chromium.org/g/blink-dev/c/h-5nQQLs2QU/m/iRVKU4LhAgAJ),
retrieved 2026-08-28, which documents Chrome exposing the property as
`undefined` before Chrome 89 and as a plain `false` in every version since.
- This project's own driver-layer checks, comparing a native `false` against a
JavaScript override on the same engine.
@@ -1,214 +0,0 @@
---
title: "Does Playwright Support Firefox Extensions?"
description: "Playwright's documented extension API, launch_persistent_context plus --load-extension, is Chromium-only. Loading an .xpi into Firefox means a persistent profile, not a launch flag."
parent: "Scraping with Playwright"
grand_parent: "Guides"
nav_order: 145
---
# Does Playwright Support Firefox Extensions?
Not the way it supports them on Chromium. Playwright's documented extension-loading
API, a persistent context launched with `--disable-extensions-except` and
`--load-extension`, is explicitly Chromium-only, and Firefox has no first-class
equivalent in the public API. Firefox can still end up running an extension, but the
route there is a persistent browser profile with the `.xpi` already installed in it,
not a launch-time argument Playwright resolves for you.
This gets asked because the Chromium path is well documented and looks like it should
generalize, and because the honest answer involves a handful of old, still-open
GitHub issues instead of a clean feature page. Here is what Playwright actually
supports, what does not work, and the one route that does.
## What Playwright's documented extension support actually is
Playwright's own extension-loading guide is unambiguous about scope:
> "Extensions only work in Chromium when launched with a persistent context."
The mechanism it documents is `chromium.launchPersistentContext()` with two Chromium
command-line flags:
- `--disable-extensions-except=${pathToExtension}`
- `--load-extension=${pathToExtension}`
That page makes no mention of Firefox or WebKit anywhere. This is not an omission in
the docs; it reflects what actually exists. Chrome and Chromium extensions are loaded
through Chromium's own command-line surface, which Playwright forwards through
untouched. There is no Firefox equivalent of `--load-extension` for Playwright to
forward to, because Firefox does not expose one to launch-time flags in the first
place.
## What has actually been tried, and where it stalls
Firefox extension support has been requested since early in Playwright's life, and the
GitHub issue history is a reasonably complete map of where it breaks:
- **[Issue #2644](https://github.com/microsoft/playwright/issues/2644)**, "Support
browser extension loading in Firefox," is closed without the feature having shipped
as a first-class API.
- **[Issue #7297](https://github.com/microsoft/playwright/issues/7297)**, "Support
running extensions with Firefox," reports the same shape of failure from a different
angle: passing Chromium-style extension flags to a Firefox launch starts the browser,
but Playwright cannot then connect to drive it.
- **[Issue #15299](https://github.com/microsoft/playwright/issues/15299)** describes
launching Firefox with an extension already producing a confirmation popup asking a
human to approve the install, which blocks unattended automation outright.
- **[Issue #9202](https://github.com/microsoft/playwright/issues/9202)**, closed, is
specifically about unsigned extensions: even after setting Firefox's own
`xpinstall.signatures.required` preference to `false`, a Firefox instance launched by
Playwright still refused to install one.
None of these landed a documented, supported Firefox extension-loading API. Read
together, they describe the practical failure modes rather than a single missing
flag: Chromium's launch-flag approach does not translate, a raw XPI install can
trigger a manual confirmation dialog, and even the preference meant to relax Firefox's
signature enforcement has not reliably worked through Playwright's launch path. Treat
any of the four as evidence of the state of things at the time it was filed rather than
a guarantee about the exact behavior of every Firefox build going forward.
## The route that does work: a persistent profile
Firefox stores installed extensions inside its profile directory, the way it stores
cookies, history and every other piece of per-profile state. Nothing about that
mechanism runs through Playwright's launch arguments at all, which is exactly why it
still works: you are not asking Playwright to load an extension, you are asking
Firefox to open a profile that already has one installed.
```python
from invisible_playwright import InvisiblePlaywright
# first run: launch headed, pointed at a profile you intend to keep,
# and install the .xpi through Firefox's own UI - drag it onto the
# window, or use about:addons - the normal way a person would
with InvisiblePlaywright(seed=42, profile_dir="/path/to/profile", headless=False) as browser:
page = browser.new_page()
page.goto("about:addons")
# install manually here, then close the browser
# every run after that: the same profile directory carries the
# extension forward, because it was never Playwright's to load
with InvisiblePlaywright(seed=42, profile_dir="/path/to/profile") as browser:
page = browser.new_page()
page.goto("https://example.com")
```
Without `profile_dir`, this project builds a fresh profile from the seed on every
launch, which is exactly why an extension installed in one run disappears in the
next - there is no profile left afterward to have kept it. The `profile_dir` /
persistent-profile pattern, including its other traps (a stale seed, a stored
permission that quietly changes WebRTC behavior), is covered in full in
[Playwright persistent profile: what it fixes and breaks](persistent-profiles.md).
**invisible_playwright does not add extension-loading support on top of this.** There
is no extension argument in the wrapper's launch call. What you are using is Firefox's
own, ordinary "the profile already has this installed" behavior, the same mechanism a
real desktop Firefox uses, reached through the persistent-profile option this project
already exposes for other reasons.
## The signature question, and why to test it rather than assume it
A release build of Firefox enforces that extensions be signed by Mozilla, and the
`xpinstall.signatures.required` preference is the documented way to relax that on
builds that honor it (Developer Edition, Nightly, and unbranded/ESR builds
traditionally do; a standard release build may not). Whether the specific patched
Firefox binary this project ships behaves like one of those relaxed builds for
signature purposes is not something this page can state without checking that exact
binary, so if an unsigned `.xpi` refuses to install, that preference is the first thing
to check, and confirming it against your own pinned build is the only way to know for
certain.
## Should you, though: extensions as a fingerprint surface
Getting an extension to load is a mechanical question. Whether it is a good idea is a
separate one, and this project already has an answer, at length, on
[browser extensions as a fingerprint surface](browser-extension-fingerprint.md): an
installed extension is detectable through the web-accessible resources it exposes,
through what it visibly changes on the page, and through the same override traces any
injected script leaves behind. That page also covers the specific trap of stacking a
*stealth* extension on top of an engine that already decides the same fingerprint
values in C++ - two components disagreeing with each other, which is easier to spot
than either value alone. If the extension you want is functional rather than
stealth-related, that page's guidance still applies: know what it changes, and check it
against a clean profile before trusting it in production.
## Conclusion
Chromium extension loading in Playwright is a documented, supported feature reached
through a command-line flag on a persistent context. Firefox has no equivalent, and a
handful of long-open GitHub issues describe exactly where the naive attempts stall:
the flags do not translate, a raw install can demand a manual confirmation click, and
signature enforcement has been an independent obstacle on top of both. The route that
actually works sidesteps Playwright's launch arguments entirely - install the `.xpi`
into a persistent Firefox profile through the browser's own UI once, then keep
launching against that same profile directory. It is Firefox's own mechanism, not a
Playwright feature, and it is the only one of the options here with a real track
record.
## Short answers to the questions that lead here
**Can I load a Firefox extension with Playwright the same way I load a Chrome
extension?** No. Chromium's `--load-extension` / `--disable-extensions-except` flags on
`launchPersistentContext` are Chromium-only per Playwright's own documentation. There
is no Firefox equivalent.
**Is Firefox extension support ever coming to Playwright?** Several feature requests
for it are years old and closed without a shipped API. There is no committed feature
here to point to, only the workaround below.
**How do I actually get an extension into a Playwright-driven Firefox?** Install it
once into a persistent profile through Firefox's own add-ons UI, headed, then relaunch
every session against that same profile directory with `profile_dir`.
**Why did my extension disappear on the next run?** Because a fresh profile is built
from the seed on every launch unless you pass `profile_dir`. Without a persistent
profile, there is nothing to carry the install forward.
**My unsigned extension won't install. Why?** Standard Firefox release builds require
Mozilla-signed extensions. The documented relaxation is the
`xpinstall.signatures.required` preference, but whether the specific build you are
running honors it is worth testing rather than assuming.
**Does invisible_playwright add its own extension support?** No. It exposes a
persistent-profile option for other reasons, and Firefox's own profile-based extension
storage rides along on top of that. There is no extension-specific argument in the
wrapper.
**Is adding an extension a good idea for a stealth session?** Only for functionality,
not for stealth. An extension is its own detectable fingerprint surface, and a stealth
extension stacked on an already-patched engine tends to make sessions easier to spot,
not harder.
## Sources
- Playwright's own [Chrome extensions documentation](https://playwright.dev/docs/chrome-extensions),
retrieved 2026-08-30, for the "Chromium when launched with a persistent context"
scope statement and the exact launch flags quoted above.
- [microsoft/playwright issue #2644](https://github.com/microsoft/playwright/issues/2644),
retrieved 2026-08-30, "Support browser extension loading in Firefox," closed without
a shipped equivalent.
- [microsoft/playwright issue #7297](https://github.com/microsoft/playwright/issues/7297),
retrieved 2026-08-30, on Playwright failing to connect after a Firefox launch with
extension flags.
- [microsoft/playwright issue #15299](https://github.com/microsoft/playwright/issues/15299),
retrieved 2026-08-30, on a manual confirmation popup blocking unattended extension
install.
- [microsoft/playwright issue #9202](https://github.com/microsoft/playwright/issues/9202),
retrieved 2026-08-30, on unsigned extensions still being refused after setting
`xpinstall.signatures.required` to `false`.
- This project's own `profile_dir` mechanism and its fingerprint-surface notes, linked
above.
**See also:** [Browser extensions are a fingerprint surface](browser-extension-fingerprint.md)
for how a loaded extension is detected and why a stealth extension is usually the wrong
move, and [Playwright persistent profile: what it fixes and breaks](persistent-profiles.md)
for the full mechanics and traps of the `profile_dir` option this page's workaround
depends on.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. The honest answer here is a persistent profile and
a handful of old GitHub issues, not a launch flag, and pretending otherwise would just
cost someone an afternoon finding that out the hard way.*
-186
View File
@@ -1,186 +0,0 @@
---
title: "Does Playwright Trigger hCaptcha More Often?"
description: "Why Playwright sessions escalate to hCaptcha's visual challenge more often. How hCaptcha's invisible pass reads fingerprint, IP, and session inputs, and which of those a browser engine can actually move."
parent: "Testing and Troubleshooting"
grand_parent: "Guides"
nav_order: 26
---
# Does Playwright Trigger hCaptcha More Often?
Often, yes. hCaptcha runs an invisible risk pass before it ever shows anything, and a
default Playwright session gives that pass more reasons to escalate than a browser a
person has actually been using does. That is not a single "this is Playwright" flag
either. It is the same shape of problem covered on
[the reCAPTCHA version of this page](does-playwright-trigger-recaptcha.md): several
inputs, most of them not published, several of them pushed the wrong way at once by a
fresh automated context.
[hCaptcha, Explained](hcaptcha-explained.md) covers the two-stage mechanism in full,
the invisible pass and the visual puzzle it falls back to. This page is about what tips
that first stage toward showing you the second one, and which parts of that a
patched, engine-level browser can actually change.
## What the invisible pass is deciding
hCaptcha's own documentation frames the decision at category level only: a challenge
appears based on "computed confidence in the visitor's humanity, the site difficulty
setting, and other security factors," and hCaptcha's Pro-tier docs describe the
underlying evaluation as drawn from "thousands of factors," aimed at keeping visible
challenges under roughly 0.1% of real visitors. Neither document names the specific
signals or their weights, and this page does not claim to know them either, the same
honesty this corpus applies to [Arkose's undisclosed "225+ risk signals"](arkose-labs-funcaptcha-explained.md#what-arkoses-own-materials-say-and-where-they-stop).
What is confirmed, from hCaptcha's own API surface, is that the server-side
`siteverify` call accepts an optional `remoteip` parameter that hCaptcha's own docs say
improves the check's accuracy, which is a direct acknowledgment that the requesting
address is one of the inputs, alongside whatever the client-side script itself collects.
## The inputs that plausibly feed the score
Reasoning from what a browser-based risk pass generally reads, and from hCaptcha's own
partial disclosures, the same broad families that drive
[reCAPTCHA's score](does-playwright-trigger-recaptcha.md#the-inputs-that-feed-the-score)
apply here too:
- **Fingerprint and engine consistency.** Whether the browser's claimed identity agrees
with how it actually behaves, an inconsistency this corpus has documented in general
through [`navigator.webdriver`](does-playwright-set-navigator-webdriver.md) and other
automation tells that a stock automated launch leaves in place.
- **IP reputation.** Confirmed as an input via the `remoteip` parameter above. A
datacenter address or one already flagged by other traffic raises suspicion regardless
of what the browser reports.
- **Session and cookie history.** A brand-new context with nothing behind it looks
different from a browser that has actually been used, the same "a fresh profile has no
past" argument [made in full on the reCAPTCHA v3 score page](recaptcha-v3-score.md).
- **Interaction pattern.** How the page got its click or its keystrokes, before the
challenge ever renders, is part of what "other security factors" plausibly covers,
though hCaptcha's own docs do not spell this out explicitly.
One nuance worth being precise about: hCaptcha's own marketing draws a contrast with
"traditional fingerprints," describing its passive modes as working "without
fingerprinting" and framing device fingerprints as becoming obsolete as a detection
tool. Read that as a positioning claim about where hCaptcha says it is putting its
effort, not as proof that browser-level consistency checks play no role at all in the
undisclosed "thousands of factors." hCaptcha does not publish enough for either reading
to be stated as settled fact, and this page does not pretend otherwise.
## Which input the browser layer actually moves
Of those families, the browser engine itself can only speak to one: whether the
JavaScript-visible surface of the browser is internally consistent and behaves like a
genuine instance of the engine it claims to be. Stock Playwright driving stock Firefox
or Chromium leaves a scattering of small disagreements here, an automation property
like `navigator.webdriver`, a headless context missing a real GPU, a font set or codec
list that does not match the claimed platform. Each one is a plausible, if unconfirmed,
contributor to whatever "other security factors" hCaptcha's decision actually weighs.
IP reputation, session history and interaction pattern are not properties of the
browser engine at all. No amount of patching below the JavaScript layer manufactures a
browsing history, warms a cold IP, or paces a click for you.
## What invisible_playwright does, and a two-line example
invisible_playwright is a Firefox patched at the C++ level and driven by stock
Playwright. Its contribution to this specific problem is the fingerprint-and-engine
input: instead of a scattering of disagreements, it presents one coherent real Firefox,
with GPU, audio, fonts, screen and roughly 400 fields derived together from a single
seed so they agree with each other and with a genuine desktop build.
Switching from plain Playwright is two lines, and every Playwright method works
unchanged because the returned object is a real Playwright
[`Browser`](https://playwright.dev/python/docs/api/class-browser):
```python
from invisible_playwright import InvisiblePlaywright
# seed=42 makes the identity reproducible: same GPU, fonts, canvas hash every run
with InvisiblePlaywright(seed=42, proxy={
"server": "socks5://gate.example.com:1080",
"username": "user",
"password": "pass",
}) as browser:
page = browser.new_page()
page.goto("https://example.com/signup")
page.click("#submit") # pointer arcs to the button on a Bezier curve
```
The reproducible seed matters for debugging this specific problem: if a run escalates
to hCaptcha's visual challenge, replay the exact same identity and change one variable,
the proxy, the timing, the target page, at a time, rather than guessing whether the
site's own thresholds moved or the browser did.
What this buys you is a smaller fingerprint-and-consistency contribution to whatever the
invisible pass weighs. It does not touch the address you connect from, the history that
session does or does not carry, or the rhythm of your own clicks, and it does not
"solve" hCaptcha's pass/fail decision. There is no such thing, and this project does not
claim to have found one.
## The inputs the browser cannot move
These stay yours to bring, and no browser-engine patch substitutes for them:
- **IP reputation.** A perfect fingerprint on a listed or overused address is still on a
bad address. Rule out the exit first; see
[how ASN and IP reputation feed bot detection](asn-and-ip-reputation-in-bot-detection.md).
- **Session age.** A cookieless, day-zero context reads as fresh every single time.
Warming a session or reusing storage state moves this, and it is not the browser's job.
- **Behavior and timing.** Mechanical pacing scores against you no matter how real the
browser looks underneath it.
If the fingerprint is coherent and the visible puzzle still shows up, the cause is one
of these three, not the engine.
## Short answers to the questions that lead here
**Does Playwright itself get flagged by hCaptcha?** Not as a single named flag. hCaptcha
does not publish its criteria, but a default Playwright session tends to combine an
inconsistent browser fingerprint with a fresh, historyless session, both plausible
contributors to whatever pushes the invisible pass toward escalating.
**Will a stealth browser stop hCaptcha's visual challenge from appearing?** It can lower
the fingerprint-and-engine-consistency contribution. It does nothing for the IP address,
the session's age, or your own timing, so on its own it will not stop every challenge.
**Can any browser guarantee I never see the puzzle?** No. hCaptcha's decision draws on
undisclosed inputs the browser does not fully control, and even if it did, this project
does not sell or claim a captcha-solving outcome for the puzzle itself.
**Is it the IP or the browser?** Test it directly: visit the same page by hand from the
same machine and network. If the manual visit also escalates, look at the exit first,
using [the detection checklist](playwright-detected-as-bot.md) to work the split in
order.
**Does hCaptcha's "no fingerprinting" claim mean the browser doesn't matter?** Not
necessarily. It is hCaptcha's own positioning against traditional device fingerprints,
not a disclosure of the full input list behind its "thousands of factors." Treat it as a
marketing claim to weigh, not as proof the browser layer is irrelevant.
## Sources
- hCaptcha, [Frequently Asked Questions](https://docs.hcaptcha.com/faq), retrieved
2026-08-30, for the "computed confidence... site difficulty... other security
factors" framing of the challenge decision.
- hCaptcha, [Pro Features](https://docs.hcaptcha.com/pro), retrieved 2026-08-30, for the
"thousands of factors" and "less than 0.1%" description of the passive evaluation.
- hCaptcha, [Developer Guide](https://docs.hcaptcha.com/), retrieved 2026-08-30, for the
`remoteip` parameter on the `siteverify` endpoint.
- hCaptcha, [homepage](https://www.hcaptcha.com/), retrieved 2026-08-30, for the
"without fingerprinting" and traditional-fingerprints-are-obsolete positioning quoted
and weighed above.
- This project's fingerprint generation, which derives roughly 400 fields from one seed
so they agree with each other rather than contradicting.
**See also:** [hCaptcha, Explained](hcaptcha-explained.md) for the full two-stage
mechanism this page assumes; [Does Playwright Trigger reCAPTCHA More Often?](does-playwright-trigger-recaptcha.md)
for the structurally identical argument on Google's product; [how a browser trust score
is assembled](browser-trust-score-explained.md); and
[the checklist for being detected on one site](playwright-detected-as-bot.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 moves the
fingerprint-and-engine input into hCaptcha's invisible pass; the clean exit, the session
history and the timing are still yours to bring.*
+3 -11
View File
@@ -69,7 +69,7 @@ are consistency gaps: a headless context with no real GPU, a screen size no disp
list or font set that does not match the claimed platform. Each is a small addition to the
score, and together they are the fingerprint contribution.
You can see this contribution directly instead of taking it on faith. Open the same
You can see this contribution directly rather than taking it on faith. Open the same
detector page in your automated browser and in a stock browser on the same machine, and
diff the reports field by field. The
[method for doing that comparison honestly](how-to-test-bot-detection.md) is worth reading
@@ -174,22 +174,14 @@ machine and network. If the manual visit is also challenged, it is the exit, and
## Sources
- Google's own reCAPTCHA v3 documentation, [reCAPTCHA v3](https://developers.google.com/recaptcha/docs/v3),
retrieved 2026-08-29, for the score-and-threshold behavior this page treats as its working
model throughout.
- This project's fingerprint generation, which derives roughly 400 fields from one seed so
they agree with each other rather than contradicting.
- The comparison method in the testing guide linked above, used to read the fingerprint
contribution to a score directly rather than trusting a verdict.
- Public detector suites ([CreepJS](https://github.com/abrahamjuliot/creepjs),
[BotD](https://github.com/fingerprintjs/BotD),
[FingerprintJS](https://github.com/fingerprintjs/fingerprintjs),
[sannysoft](https://bot.sannysoft.com/), [BrowserLeaks](https://browserleaks.com/)), each
read from its own source, retrieved 2026-08-28, for what a coherence check actually
inspects.
- Public detector suites (CreepJS, BotD, FingerprintJS, sannysoft, BrowserLeaks), each read
from its own source, for what a coherence check actually inspects.
**See also:** [how a browser trust score is assembled](browser-trust-score-explained.md),
[why a fresh browser scores low on reCAPTCHA v3](recaptcha-v3-score.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).
+3 -3
View File
@@ -112,7 +112,7 @@ The launch is the same two lines for both agents. The seed makes the identity
reproducible, so a failing run can be replayed rather than guessed at.
```bash
uv add invisible-playwright
pip install invisible-playwright
```
A DOM-reading agent reads structure and acts on a selector:
@@ -125,7 +125,7 @@ with InvisiblePlaywright(seed=42) as browser:
page.goto("https://example.com")
# what a text / accessibility-tree agent would hand to the model
tree = page.aria_snapshot()
tree = page.accessibility.snapshot()
text = page.inner_text("body")
# the model returns an action against a selector
@@ -148,7 +148,7 @@ with InvisiblePlaywright(seed=42) as browser:
page.mouse.click(220, 140)
```
The `browser` is a real Playwright `Browser`, so `aria_snapshot()`,
The `browser` is a real Playwright `Browser`, so `accessibility.snapshot()`,
`inner_text()`, [`screenshot()`](https://playwright.dev/python/docs/api/class-page#page-screenshot)
and [`mouse.click()`](https://playwright.dev/python/docs/api/class-mouse#mouse-click) are
all the standard upstream methods.
+6 -6
View File
@@ -10,7 +10,7 @@ nav_order: 10
# Emoji fingerprinting: why emoji look the same on any OS
Emoji look the same on any OS in Firefox because Firefox draws colour emoji from
its own bundled font instead of the platform's, so the render is host-independent.
its own bundled font rather than the platform's, so the render is host-independent.
That is worth explaining, because emoji are otherwise one of the oldest
operating-system tells there is. The same code point is drawn from a different font
on each platform, and those fonts do not agree on a single pixel: Windows renders
@@ -48,7 +48,7 @@ operating system's emoji font at all. It ships its own colour-emoji font, based
Twemoji, inside the browser package, and it rasterises colour emoji from that
bundled file on every platform it runs on. A stock Firefox on Windows, a stock
Firefox on macOS and a stock Firefox on Linux all draw the same emoji from the
same font, because the font travels with the browser instead of coming from the
same font, because the font travels with the browser rather than coming from the
host.
That is a structural difference from Chrome, which defers to the platform emoji
@@ -63,7 +63,7 @@ assume. The engine has already made the render host-independent.
This project builds on that property deliberately. To make text match Windows on
any host, the build bundles a set of real Windows font files and exposes only
those families, so a Linux server draws Latin, CJK and the rest from genuine
Windows glyphs, not from whatever the host happens to have installed. The
Windows glyphs rather than from whatever the host happens to have installed. The
same idea is covered in detail under [bundled fonts that render the same on every OS](bundled-fonts-cross-platform.md).
The emoji font is treated differently, and on purpose. The colour-emoji file is
@@ -223,9 +223,9 @@ deploy on. A blank or changing emoji is a failure, not a pass.
## Sources
- This project's font architecture and its cross-OS host gate, which runs the
browser on a Linux host with no Windows fonts and compares what a page reads,
colour emoji included, with the Windows build (decision log, 2026-06-20).
- This project's font architecture and its cross-OS font gate, which runs the
browser on a Linux host with no Windows fonts and reads what it renders,
including colour emoji (decision log, 2026-06-20).
- Firefox's use of a bundled colour-emoji font in place of the platform emoji
font, verified against a stock build on more than one operating system.
- [`HTMLCanvasElement.toDataURL()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL)
-160
View File
@@ -1,160 +0,0 @@
---
title: "net::ERR_ABORTED in Playwright"
description: "net::ERR_ABORTED usually means a navigation was cancelled on purpose, by a redirect, a download, route.abort(), or a second goto(), not that anything actually failed. When it is benign and when it signals a real bug."
parent: "Network, Proxy and WebRTC"
grand_parent: "Guides"
nav_order: 33
---
# net::ERR_ABORTED in Playwright
`net::ERR_ABORTED` means a request was cancelled before it finished, not that it
failed. Chromium's own network error list defines it as "an operation was aborted
(due to user action)," and the cancelling "action" is very often something your own
page, your own script, or Playwright's own navigation handling did on purpose. This
is the one error in the `net::ERR_` family that is frequently not a problem at
all. [ERR_CONNECTION_RESET](err-connection-reset-playwright.md) and
[ERR_HTTP2_PROTOCOL_ERROR](err-http2-protocol-error-playwright.md) report a
connection that genuinely broke; this one usually reports one that was closed on
purpose, and treating every occurrence as a bug wastes time chasing something that
already worked.
## The causes that are usually fine
**A download started instead of a page load.** When a navigation resolves to a file
download instead of an HTML response, the browser aborts the page-level navigation
in favor of handing the response to the download machinery, and Playwright surfaces
that abort as `net::ERR_ABORTED` even though the file saves correctly.
[microsoft/playwright-java#541](https://github.com/microsoft/playwright-java/issues/541)
shows exactly this: navigating to a URL that returns only a JSON payload logs
`net::ERR_ABORTED` on the response, reproduced across Chromium, Firefox and WebKit
alike, with the download itself completing successfully regardless. The fix is not
suppressing the error, it is not using `page.goto()` to wait on a navigation that was
never going to become a page: use `page.expect_download()` around the action that
triggers it instead.
**A redirect chain moved the page somewhere else mid-flight.** Authentication flows
in particular chain several redirects, and Chromium's request lifecycle can report
an intermediate hop as aborted, since it was superseded before completing, without
the overall navigation actually failing.
**Two navigations fired in quick succession.** Calling `page.goto()` a second time
before the first has resolved cancels the first, and the cancelled one reports
`net::ERR_ABORTED`. This is standard browser behavior, not a Playwright defect, and
it is intentional the moment your own code causes it.
**An SPA replaced the frame during navigation.** "Maybe frame was detached?" appended
to the error, seen in reports like
[microsoft/playwright#13071](https://github.com/microsoft/playwright/issues/13071)
and [#34889](https://github.com/microsoft/playwright/issues/34889), points at a
single-page app tearing down and rebuilding its root frame while a navigation was in
flight, ordinary behavior for that class of app rather than a network failure.
## The causes that are a real problem
**Your own `page.route()` handler called `route.abort()`.** If a route handler is
deliberately aborting requests, matched by URL pattern, to speed up a test or block
unwanted third-party calls, and the pattern is broader than intended, it can abort a
request the test actually needed. [microsoft/playwright#21451](https://github.com/microsoft/playwright/issues/21451)
is exactly this shape: a route handler aborting a specific unwanted domain pattern
threw `net::ERR_ABORTED` on the next `page.goto()` because the abort landed on
in-flight navigation rather than the intended third-party request.
**`page.close()` was called while a navigation was still in flight.** Closing the
page tears down whatever requests it had open; if that happens mid-navigation on
purpose or by an unrelated timeout, the abort is real and the navigation that was
racing it never gets a result. When the teardown came from the browser or the
context disappearing under you, the exception that surfaces first is usually
[TargetClosedError](playwright-targetclosederror-causes.md), and the abort is the
second thing you see.
**A route handler that never resolves.** A `page.route()` interceptor that neither
calls `route.continue()`, `route.fulfill()`, nor `route.abort()` leaves a request
hanging, and it can be aborted during teardown rather than completing, which reads
identically to an intentional abort but traces back to a handler bug instead.
## Telling the two apart
Read what triggered the abort, not just the string. A download-triggering URL,
a redirect chain, or a second `goto()` you called yourself all explain the abort on
their own and need no fix. A route handler you wrote, a `page.close()` call your own
code or test framework issued, or a hanging interceptor are bugs in the automation
code, and the fix is in that code, not in retrying the navigation or raising a
timeout.
```bash
DEBUG=pw:api python your_script.py 2> pw.log
```
Reading which call issued immediately before the abort, a second `goto()`, a
`route.abort()`, a `page.close()`, separates the benign cases from the real ones
faster than guessing from the exception alone.
## The honest boundary
`net::ERR_ABORTED` is not a fingerprint or network-identity failure, and no amount
of browser realness changes whether it fires. It is a navigation-lifecycle signal
that fires identically on a stock Playwright Chromium, a stock Firefox, and this
project's patched build, because the cancellation is decided by request-handling
logic in the engine, on your own code's instruction, not by anything about how real
the browser's identity looks to a remote site. The error that does carry that
second meaning is a different one:
["Execution context was destroyed" can be a navigation you did not ask for](execution-context-destroyed.md),
which is worth reading before deciding an abort was a block.
## Short answers to the questions that lead here
**What does net::ERR_ABORTED mean?** A request or navigation was cancelled before
completing, most often on purpose, by a download, a redirect, a second navigation, or
a `route.abort()` call, rather than by a network or server failure.
**Is net::ERR_ABORTED always a bug?** No, and most of the time it is not. A download
replacing a page load, a redirect chain, and overlapping navigations you triggered
yourself are all expected causes with no fix required.
**How do I stop it from firing on a download?** Do not wait on `page.goto()` to
resolve a URL that becomes a download. Wrap the triggering action in
`page.expect_download()` instead.
**My own route.abort() call seems to be the cause. How do I fix that?** Narrow the
URL pattern your handler matches so it only intercepts the requests you actually
intend to block, not in-flight navigation traffic that happens to match too broadly.
**Does invisible_playwright cause or fix this error?** Neither. It is a
navigation-lifecycle event decided by request handling and your own automation
code, entirely independent of the browser's fingerprint or identity layer.
## Sources
- Chromium's [`net/base/net_error_list.h`](https://chromium.googlesource.com/chromium/src/+/main/net/base/net_error_list.h),
for `ERR_ABORTED` (-3), retrieved 2026-08-30.
- [microsoft/playwright-java#541](https://github.com/microsoft/playwright-java/issues/541),
`net::ERR_ABORTED` logged when navigating to a URL that only returns a downloadable
payload, reproduced across all three engines.
- [microsoft/playwright#21451](https://github.com/microsoft/playwright/issues/21451),
a `page.route()` handler's `route.abort()` call surfacing as `net::ERR_ABORTED` on
a subsequent navigation.
- [microsoft/playwright-python#2131](https://github.com/microsoft/playwright-python/issues/2131),
an intermittent `net::ERR_ABORTED` report during ordinary navigation.
- [microsoft/playwright#13071](https://github.com/microsoft/playwright/issues/13071)
and [#34889](https://github.com/microsoft/playwright/issues/34889), the
"maybe frame was detached?" variant tied to SPA frame replacement during
navigation.
- Playwright's own [`Route` API reference](https://playwright.dev/python/docs/api/class-route),
for the `route.abort()` method and its optional error-code argument.
**See also:** [Playwright TargetClosedError: the causes and the fixes](playwright-targetclosederror-causes.md)
for another error whose real cause lives in the lines logged before it rather than
in the exception itself, [ERR_CONNECTION_RESET in Playwright](err-connection-reset-playwright.md)
for a genuinely network-level failure to contrast against, and
[ERR_HTTP2_PROTOCOL_ERROR in Playwright](err-http2-protocol-error-playwright.md) for
a case where a server deliberately resetting a stream is easy to mistake for an
accident.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level driven by stock Playwright. `net::ERR_ABORTED`
tracks a navigation-lifecycle decision, most often your own code's, and has nothing
to do with how the browser's identity reads to a remote site.*
@@ -1,183 +0,0 @@
---
title: "net::ERR_CERT_AUTHORITY_INVALID in Playwright"
description: "net::ERR_CERT_AUTHORITY_INVALID means the certificate chain does not trace to a root the browser trusts, often a proxy intercepting TLS. What ignoreHTTPSErrors actually disables, and the tradeoff of using it."
parent: "Network, Proxy and WebRTC"
grand_parent: "Guides"
nav_order: 35
---
# net::ERR_CERT_AUTHORITY_INVALID in Playwright
`net::ERR_CERT_AUTHORITY_INVALID` means the certificate presented during the TLS
handshake does not chain up to a certificate authority the browser trusts.
Chromium's own network error list defines it exactly: "the server responded with a
certificate that is signed by an authority we don't trust." Playwright drives real
browser engines, and those engines enforce this the same way they do for any human
using them, because certificate-chain validation is the mechanism that makes TLS mean
anything against a man-in-the-middle.
This is not the same failure as the adjacent
`ERR_CERT_COMMON_NAME_INVALID`, which fires when the chain is trusted but the
certificate's own name does not match the hostname you asked for. Authority-invalid
means the *issuer* is not trusted; common-name-invalid means the *subject* is wrong.
Read the exact code before assuming which problem you have.
## The causes
**A self-signed certificate on the target.** Common in local development and
staging environments: nothing signed it that any browser trusts by default, because
nothing was meant to.
**A proxy intercepting and re-signing TLS.** A proxy that terminates the original TLS
connection and re-establishes its own toward the destination has to present *some*
certificate to your browser for that connection, and unless its own root CA is
installed in the browser's trust store, that certificate is signed by an authority
nothing trusts. This is functionally identical, from the browser's point of view, to
a hostile machine-in-the-middle attack, because it is the same mechanism: someone
between you and the destination is terminating TLS you did not expect them to
terminate. Note where in the sequence this leaves you: the tunnel was established
and the certificate on the far side of it is what failed. A proxy that refuses the
tunnel outright never gets this far and reports
[ERR_TUNNEL_CONNECTION_FAILED](err-tunnel-connection-failed-playwright.md) instead.
**An expired or misconfigured intermediate certificate.** A chain that used to
validate can stop validating the moment an intermediate CA cert expires or gets
revoked, with nothing about the leaf certificate itself having changed.
**Corporate or antivirus SSL inspection.** The same mechanism as the proxy case
above, run locally: security software that intercepts outbound HTTPS to scan it
presents its own re-signed certificate, and a browser Playwright drives on that
machine sees exactly the same untrusted-authority failure a hostile interception
would produce.
## What `ignoreHTTPSErrors` actually disables, and the tradeoff
Playwright's `ignoreHTTPSErrors` context or launch option is a real, documented
lever, and it does exactly what it says: it disables certificate-chain and hostname
validation for that browser context entirely. It is not a feature that trusts one
specific proxy's certificate and rejects everything else; it removes the check
altogether, for every connection that context makes for the rest of its life.
That is the tradeoff worth being explicit about, because "just add
`ignoreHTTPSErrors: True`" is the answer everywhere and it is rarely presented with
its actual cost. The entire reason certificate validation exists is to make TLS mean
"you are actually talking to who you think you are talking to." Turning it off to
accept your own proxy's interception certificate accepts every other invalid
certificate with it, including one from an attacker on a network you did not expect
to be adversarial. A context configured this way cannot tell the difference between
your trusted proxy's re-signed certificate and a hostile one sitting on public
Wi-Fi, because the check that would have told them apart is the check you disabled.
Turning the check off also changes nothing about what the destination sees. A proxy
that terminates your TLS and re-establishes its own connection onward presents its
own handshake to the server, so the
[JA3 and JA4 fingerprint](ja3-ja4-tls-fingerprint.md) arriving at the destination is
the proxy's and not your browser's. Whether your browser accepted the proxy's
certificate and what the proxy's handshake looks like from the far end are two
separate questions, and only the first one is what this error is about.
The narrower, safer alternative when the actual goal is trusting one specific proxy
is installing that proxy's own root CA certificate into the browser's trust store,
so only that one issuer becomes trusted, not every issuer becoming
irrelevant. Where that is not practical, the operationally honest habit is scoping
`ignoreHTTPSErrors` to sessions that are genuinely, deliberately behind a proxy you
control, never to a context whose traffic might also touch a network you do not
control, and treating a *new* certificate error appearing mid-session, on a proxy
that was previously validating fine, as a signal worth investigating rather than
suppressing further, since that is exactly the shape a captive portal or an
unexpected interception point produces.
## Diagnostic checklist
1. **Reproduce with `curl` against the same target and proxy.** `curl -v
-x <proxy> <url>` prints the actual certificate chain rather than collapsing it
into one exception. Read the `issuer` line specifically.
2. **Compare the issuer to what you expect.** If the certificate's issuer is your own
proxy provider's name rather than a public CA, this confirms the proxy is
terminating and re-signing TLS, the expected-but-unvalidated case, not a hostile
interception.
3. **Test the same target with the proxy removed.** Validates cleanly without the
proxy: the proxy is the one re-signing TLS, confirmed. Still fails: the
destination's own certificate is broken, unrelated to the proxy at all. A proxy
that intercepts TLS is usually also deciding
[where your DNS queries go](does-a-proxy-leak-dns-doh-explained.md), which is a
separate setting with a separate way of going wrong, and worth reading once while
you have the proxy's configuration open.
4. **Check with `openssl s_client -connect host:443 -showcerts`** for the full chain
and its dates, to rule out an expired intermediate specifically rather than an
untrusted one.
5. **If the error appears suddenly on a proxy that was previously clean, stop and
investigate before reaching for `ignoreHTTPSErrors`.** A working proxy's
certificate does not change identity on its own; a new, different issuer showing
up mid-project is the concrete signal the tradeoff above describes, not routine
noise to suppress.
## The honest boundary
Certificate validation is a TLS-layer check, enforced by the browser engine the same
way for a real person and for Playwright driving it. `invisible_playwright` does not
alter certificate handling and does not make an untrusted chain trusted; the
`ignoreHTTPSErrors` lever is stock Playwright behavior, available identically on a
stock browser, and this project's engine-level realness has no bearing on whether a
given certificate validates. Realness answers what a page can observe about the
browser; it says nothing about who is actually on the other end of the TLS
handshake, which is precisely the question certificate validation exists to answer.
## Short answers to the questions that lead here
**What does net::ERR_CERT_AUTHORITY_INVALID mean?** The certificate presented during
the TLS handshake does not chain up to a certificate authority the browser trusts,
most often because it is self-signed or was re-signed by an intercepting proxy.
**Is this the same as ERR_CERT_COMMON_NAME_INVALID?** No. That error means the chain
is trusted but the certificate's name does not match the hostname requested. This
error means the issuer itself is not trusted, regardless of the name on the
certificate.
**What does ignoreHTTPSErrors actually turn off?** All certificate-chain and
hostname validation for that browser context, for every connection it makes, not
just the one proxy or certificate you intended to allow.
**Is there a safer fix than ignoreHTTPSErrors?** Installing the specific proxy's own
root CA certificate into the trust store validates only that one issuer, leaving
every other certificate's validation intact, unlike disabling the check outright.
**How do I know if a proxy is intercepting TLS versus the destination just having a
broken certificate?** Read the certificate's issuer with `curl -v` or `openssl
s_client`. An issuer matching your proxy provider confirms interception; test the
same target with the proxy removed to isolate it further.
**Does invisible_playwright fix or cause certificate validation errors?** Neither.
Certificate validation is standard TLS behavior the engine enforces the same way for
any browser; this project's stealth patching does not touch it, and `ignoreHTTPSErrors`
is stock Playwright, not something this project adds or modifies.
## Sources
- Chromium's [`net/base/net_error_list.h`](https://chromium.googlesource.com/chromium/src/+/main/net/base/net_error_list.h),
for `ERR_CERT_AUTHORITY_INVALID` (-202) and the adjacent, distinct
`ERR_CERT_COMMON_NAME_INVALID` (-200), retrieved 2026-08-30.
- [microsoft/playwright-python#346](https://github.com/microsoft/playwright-python/issues/346),
a real, verbatim report of `net::ERR_CERT_AUTHORITY_INVALID` against a bare IP
address destination.
- [microsoft/playwright#2814](https://github.com/microsoft/playwright/issues/2814),
a user question on bypassing this exact error, illustrating how often
`ignoreHTTPSErrors` is reached for without the tradeoff being discussed.
- Playwright's own [API reference](https://playwright.dev/python/docs/api/class-browser#browser-new-context),
for the `ignoreHTTPSErrors` context option and its documented scope.
**See also:** [ERR_TUNNEL_CONNECTION_FAILED in Playwright](err-tunnel-connection-failed-playwright.md)
for a different proxy failure mode that happens before TLS is ever negotiated, [JA3
and JA4: why a TLS fingerprint cannot be patched](ja3-ja4-tls-fingerprint.md) for the
handshake layer just beneath certificate validation, and [does a proxy leak
DNS? DoH and DNS leaks explained](does-a-proxy-leak-dns-doh-explained.md) for another
case where a proxy's behavior is easy to mistake for the browser's own.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. Certificate validation is stock TLS behavior,
untouched by this project's patching; `ignoreHTTPSErrors` removes that check
entirely rather than trusting one specific proxy, and that tradeoff is worth reading
before reaching for it.*
-178
View File
@@ -1,178 +0,0 @@
---
title: "net::ERR_CONNECTION_REFUSED in Playwright"
description: "net::ERR_CONNECTION_REFUSED means something actively rejected the connection attempt, not that nobody answered. The Docker and CI variant, where localhost inside a container is not the host machine, is the most common real cause."
parent: "Network, Proxy and WebRTC"
grand_parent: "Guides"
nav_order: 37
---
# net::ERR_CONNECTION_REFUSED in Playwright
`net::ERR_CONNECTION_REFUSED` means the machine at the other end of the address and port
actively refused the connection: it answered with a TCP reset instead of staying silent.
Chromium's own network error list defines it in five words, "A connection attempt was
refused," code -102. `page.goto()` throws it fast, usually in well under a second, because
a refusal is an immediate reply, not a wait for something that never comes.
That speed is itself informative. A connection that times out is one where nothing
answers at all, covered separately on [`ERR_CONNECTION_TIMED_OUT`](err-connection-timed-out-playwright.md).
A connection that is refused got an answer, and the answer was no. Something is running
at that address that can send a TCP RST, which usually means either nothing is listening
on that exact port, or something is actively and deliberately rejecting the attempt.
## The realistic causes
**Nothing is listening on that port.** The most literal reading: a dev server not yet
started, a service that crashed, or a port number that is simply wrong. Confirm the
process is actually running and bound to the port you are navigating to.
**A firewall or security group actively rejecting, not silently dropping.** Some
firewall configurations answer a blocked port with a reset (refused) and others simply
drop the packet (timeout). Which one you get depends on the device, not on Playwright.
**A local dev server that had not finished starting yet.** [A real report](https://github.com/microsoft/playwright/issues/35879)
shows this exact error firing in headless mode specifically, immediately, against a
server still starting up: headful mode's slightly longer startup window happened to give
it enough time, headless did not.
**A CI runner whose network path or firewall differs from a developer's own machine.**
[A GitHub Actions report](https://github.com/microsoft/playwright/issues/21414) and
[a CircleCI report](https://github.com/microsoft/playwright/issues/20343) both show
`ERR_CONNECTION_REFUSED` against `localhost` reproducing reliably in CI and not locally,
which is the signature of an environment-specific networking difference instead of a
code regression.
## The Docker and CI networking variant, in detail
This is the shape worth understanding on purpose, because "it works on my machine and
fails in the container" is the single most common real cause behind this error, and the
reason is not intuitive if you have not hit it before.
Docker containers run in their own network namespace, a Linux kernel feature that gives a
process its own IP addresses, its own loopback interface, and its own view of "localhost"
entirely separate from the host machine's. As it is put directly: "when a server listens
on 127.0.0.1 inside the container network namespace" and something outside that
namespace, including the host, tries to reach `127.0.0.1`, "these are different
interfaces, so no connection is made." `localhost` inside a container refers to that
container, never to the host, and never to a sibling container, no matter how natural it
feels to type it out of habit.
This produces `ERR_CONNECTION_REFUSED` in a specific, recognizable shape: Playwright runs
inside a container and navigates to `http://localhost:3000`, expecting to reach a server
on the host machine or in a different container. It reaches its own container's loopback
instead, where nothing is listening, and gets refused. The same code works perfectly on a
developer's own machine, because there `localhost` genuinely is the machine running both
the browser and the server, no namespace boundary in between, which is exactly why the
bug reads as "nothing changed" when the entire network topology did. Port publishing
(`-p 3000:3000`) does not fix this either if the server itself is bound to `127.0.0.1`,
not `0.0.0.0`: "the server is listening on 127.0.0.1 inside the container network
namespace" while the forwarded traffic arrives on the external interface, an address the
server was never told to listen on. [A real report](https://github.com/microsoft/playwright/issues/24582)
shows exactly this shape: the port listed as exposed in a Compose file, and the connection
still refused.
The fixes follow directly from the cause: bind the target service to `0.0.0.0` so it
accepts connections on every interface, use Docker's own DNS name `host.docker.internal`
to reach the host from inside a container, and, for container-to-container traffic under
Compose, address the other service by its **service name** on the shared network rather
than by `localhost`. On Linux hosts, `host.docker.internal` is not wired up by default the
way it is on Docker Desktop, and needs `--add-host=host.docker.internal:host-gateway` or
the equivalent Compose `extra_hosts` entry.
## Diagnostic checklist
1. **Confirm the target process is running and bound to that port**, from inside the
same environment that will run the browser, not from your own machine. `curl
http://target:port` inside the container or runner is the fastest check.
2. **If this is Docker, ask what `localhost` resolves to from where you are asking.**
Playwright's process, the target service, and your own terminal can each be in a
different network namespace, each with its own idea of `localhost`.
3. **Check what interface the target service binds to**, and address other Compose
services by their service name, not `localhost`, which does not cross
container boundaries at all.
4. **In CI specifically, test from inside the runner**, since a firewall or security
group there can behave differently from your own machine even when the code and the
port are both correct.
5. **If a local dev server is involved, rule out a startup race** before assuming
anything about networking: a navigation that fires before the server has finished
binding produces this exact error in headless mode.
## What Firefox calls the same failure
`invisible_playwright` drives a patched Firefox rather than Chromium, and Firefox's own
networking layer does not use `net::ERR_*` naming. The identical event, a connection
actively refused, is `NS_ERROR_CONNECTION_REFUSED` in Firefox's own error list, defined
as: "The connection attempt failed, for example, because no server was listening at
specified host:port." The causes above apply unchanged; only the string in the log
differs.
## The honest boundary
A refused connection is answered below any layer a browser's identity touches: the
operating system's TCP stack sent the reset, whether because nothing is listening or
because a firewall chose to reject rather than drop. `invisible_playwright` passes the
navigation straight to the patched engine and does not retry a refused port or paper over
a network namespace it did not create. A stock Playwright Chromium, a stock Firefox, and
this project's build all see the identical refusal from the identical port, because the
fingerprint layer this project touches sits far above where a TCP RST gets generated.
## Short answers to the questions that lead here
**What does net::ERR_CONNECTION_REFUSED mean?** Something at that address and port
actively rejected the connection attempt with a TCP reset, rather than staying silent.
Usually nothing is listening on that exact port, or a firewall chose to reject rather than
drop the attempt.
**Why does this happen constantly in Docker but never on my own machine?** Docker
containers each have their own network namespace, so `localhost` inside a container never
refers to the host machine or to a sibling container. This is the single most common real
cause of this error under automation.
**What is the fix for the Docker case?** Bind the target service to `0.0.0.0` instead of
`127.0.0.1`, use `host.docker.internal` to reach the host from inside a container, and
address other Compose services by their service name rather than `localhost`.
**Is this the same as ERR_CONNECTION_TIMED_OUT?** No. A refusal is an immediate answer
that says no. A timeout is silence, with nothing answering at all within the wait period.
**Can invisible_playwright's stealth patching cause or fix this?** No. The refusal is
generated at the TCP layer by whatever is, or is not, listening on the target port,
entirely below any fingerprint or identity surface this project touches.
## Sources
- Chromium's [`net/base/net_error_list.h`](https://chromium.googlesource.com/chromium/src/+/main/net/base/net_error_list.h),
for `ERR_CONNECTION_REFUSED` (-102), retrieved 2026-08-30.
- Mozilla's [`xpcom/base/ErrorList.py`](https://searchfox.org/mozilla-central/source/xpcom/base/ErrorList.py)
(viewed via the Fossies mirror), for `NS_ERROR_CONNECTION_REFUSED` (13) and its exact
definition, retrieved 2026-08-30.
- [microsoft/playwright#35879](https://github.com/microsoft/playwright/issues/35879),
`ERR_CONNECTION_REFUSED` in headless mode specifically against a dev server that had
not finished starting.
- [microsoft/playwright#21414](https://github.com/microsoft/playwright/issues/21414) and
[microsoft/playwright#20343](https://github.com/microsoft/playwright/issues/20343),
reports of this error reproducing reliably in GitHub Actions and CircleCI against
`localhost` and not locally.
- [microsoft/playwright#24582](https://github.com/microsoft/playwright/issues/24582), a
report of the error persisting against a Docker Compose service despite the port being
listed as exposed.
- pythonspeed.com, ["Connection refused? Docker networking and how it impacts your
image"](https://pythonspeed.com/articles/docker-connection-refused/), for the network
namespace explanation of why `localhost` inside a container is not the host, retrieved
2026-08-30.
- Docker's own documentation, [Networking on Docker Desktop](https://docs.docker.com/desktop/features/networking/),
for `host.docker.internal` and its platform-specific availability, retrieved 2026-08-30.
**See also:** [ERR_PROXY_CONNECTION_FAILED in Playwright](err-proxy-connection-failed-playwright.md)
for the equivalent failure when it is a configured proxy, not the destination, that is
unreachable, [ERR_CONNECTION_TIMED_OUT in Playwright](err-connection-timed-out-playwright.md)
for the silent variant with no reset at all, and [Playwright in Docker: what actually
changes detection-wise](playwright-docker-detection.md) for the rest of what differs
about running this project inside a container.
---
*From the notes of [invisible_playwright](https://github.com/feder-cr/invisible_playwright),
a Firefox patched at the C++ level. A refused connection is the operating system's TCP
stack answering; the browser's identity layer never gets a say in it.*
Loaded 100 of 874 files, more files were not shown because too many files have changed in this diff. Show more