DevTools Protocol side effect
A page can notice when a tool is listening to the browser over the DevTools Protocol.
Playwright, Puppeteer and many cloud browsers drive Chrome through the DevTools Protocol. When the Runtime domain is enabled, the browser serializes logged objects for the tool. A page can plant an Error whose stack getter runs only when that happens, which reveals the listener. Recent tools reduce this, so it is a moving target.
What it can and can't do
What the user does: Nothing. It runs from page script
It can
- Detect a DevTools Protocol client that enabled the Runtime domain
- Add the result to a bot score
- Catch automation that hides the webdriver flag
It cannot
- See which tool is attached
- Work after the tool patches or avoids Runtime.enable
- Tell a developer opening DevTools from a bot
- Work in Firefox or Safari
How it differs between platforms: Real developers who open DevTools can trigger it too. Newer automation tools avoid enabling the Runtime domain, which defeats the test.
Browser support
Version notes
- Chrome: Seen with Chromium based browsers driven over the DevTools Protocol
- Edge: Same Chromium behavior
- Chrome on Android: Seen when Chrome is driven over the protocol
- Samsung Internet: Chromium based; not verified
How a site asks for it
| API | console.debug(new Error()) with a getter on Error.prototype.stack; any accessor that fires only when Runtime.enable serializes the object |
| Browser compat keys | api.Console.debug_staticapi.Error.stack |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Page defines an Error with a stack getter
- Page logs the Error with console.debug
- If a protocol client serializes it, the getter runs and the page sees it
Data you get
Shape: boolean
How often: per check
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
stackGetterCalled | boolean | None | true when a protocol client serialized the logged object | Not listed |
Technical limits
- Chromium only
- Defeated by tools that avoid Runtime.enable
- Developers with DevTools open can match
The story
What it is
Some tools watch the browser by talking to it behind the scenes. The page can catch that conversation by leaving a trap that only springs when someone listens.
For you
You never see it. If you open DevTools yourself it can also fire. Agent tools that use the protocol can be spotted this way.
For makers
This is a cat and mouse game. Treat the result as one weak signal that decays as tools change. Do not use it alone to block people, because opening DevTools can trigger it.
Where you see it
| Type | Example | Apps |
|---|---|---|
| security | A bot filter marks sessions where the stack getter fires. | None named |
| shopping | A retailer flags checkout sessions from protocol driven browsers. | None named |
| ads | An ad verifier removes views from protocol driven browsers. | None named |
| games | An anti cheat script looks for a debugger style listener. | None named |
| developer | A tool maker tests whether their library trips the check. | Playwright, Puppeteer |
| enterprise | A fraud team adds the check to a layered score for login attempts. | None named |
Risks
- False positives for people with DevTools open
- Fast moving
What the platform says
- Chrome for Developers: Chrome DevTools Protocol. Docs list the protocol domains that tools use to inspect and control Chromium.
Good uses and abuse
Legitimate uses
- Bot defense
Known abuse
- Blocking legitimate agents
- Flagging developers
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 0.3 | Rough identifying entropy, when known |
History
- 2022, Chrome: Runtime.enable serialization described as a way to detect automation
Related capabilities
Related
- DevTools open detection. Can guess when your browser developer tools are open, but often gets it wrong
- Automation (webdriver) flag. Can tell if Selenium, Playwright, or Puppeteer is controlling the browser
- Bot detection and CAPTCHA signals. Can combine many browser and network clues to guess if you are a bot
Sources
How well checked: Inferred from related behavior.