[Home]

Device Enumeration Chaos

Runtime diagnostics

Wraps MediaDevices.prototype.enumerateDevices, getUserMedia, getDisplayMedia and Permissions.prototype.query with a counter + stack logger that sits above the C-S-S deviceEnumerationFix proxy, so you can see every entry. Use Copy DevTools snippet to paste the same instrumentation into another site's DevTools (e.g. linkedin.com/checkpoint/...) to observe what protechts / reCAPTCHA / first-party scripts actually call.



        
How to use this on a real site (e.g. linkedin.com) — full workflow

1. Install the snippet

  1. Click Copy DevTools snippet above.
  2. Open the site you want to observe (e.g. https://www.linkedin.com/) in the Windows DDG browser. For the OPS-7378 repro, temporarily disable the protechts.net request-blocklist rule so the checkpoint flow actually loads.
  3. Open DevTools → Console. Paste the snippet and press Enter. You should see a red chaos instrumentation installed banner.

Important: the snippet does not survive a page refresh — refresh creates a fresh window / MediaDevices.prototype and the wrappers are gone. Re-paste the snippet after every refresh. To catch calls that fire during page load (which is when most fingerprinting probes run), use the pause-on-first-statement trick in the next section.

1b. Catching very early calls (pause before page JS runs)

Anti-bot scripts typically fire their probes within the first few hundred ms of page load — before you can paste the snippet manually. To guarantee the wrappers are in place before any page JavaScript runs:

  1. Open DevTools before loading the target page.
  2. Go to SourcesEvent Listener Breakpoints (right-hand pane). Expand Script and tick Script First Statement.
  3. Navigate to / refresh the target site. DevTools will pause at the very first JavaScript statement.
  4. Switch to the Console tab and paste the chaos snippet. The wrappers are now installed.
  5. Click Resume script execution (▶ in Sources, or F8). All subsequent JS — including the protechts / reCAPTCHA bootstrap — will run through your wrappers.
  6. Uncheck Script First Statement when you are done, otherwise every page load will pause.

2. Trigger the behaviour you want to observe

Navigate to / interact with the page as a tester would. For the camera-prompt repro on LinkedIn, simply landing on the checkpoint flow is usually enough. The Console will stream [chaos] <API> <args> <count> debug lines as each wrapped API is called.

3. Read the counters

window.__chaosInstrumentation.summary()
// { counts: { 'MediaDevices.enumerateDevices': 7, ... }, logCount: 7 }

Watch the call rate, not just the count. A normal page calls enumerateDevices a handful of times at most; an anti-bot fingerprinter calling it hundreds of times in a few seconds is the queue-stampede pattern that DaveV's A11 / A12 simulates.

4. What to look for

5. Capture for the ticket

window.__chaosInstrumentation.download()  // saves full log + stacks as JSON
window.__chaosInstrumentation.uninstall() // restore originals

Attach the downloaded JSON to OPS-7378 along with the exact browser version and whether the OS prompt appeared.

What the snippet does not catch

Log



    
        

Unleash chaos?

This will run all device-enumeration techniques in sequence. The B group calls getUserMedia directly, which will trigger camera/mic permission prompts. Do not run this on a build where you do not want to be prompted.