Report #2065
[tooling] navigator.userAgent and navigator.platform mismatch after setting user agent in browser launch args
Use Chrome DevTools Protocol Emulation.setUserAgentOverride with a full userAgentMetadata object \(platform, platformVersion, architecture, model, mobileness\) so client hints, navigator.platform, and navigator.userAgentData all stay consistent.
Journey Context:
Setting --user-agent or Playwright's userAgent arg only changes the HTTP header and navigator.userAgent. Anti-bot scripts read navigator.platform, navigator.userAgentData, Sec-CH-UA-Platform, and Sec-CH-UA-Mobile, which then leak that you are a desktop browser claiming to be mobile or vice versa. CDP's override with metadata patches the whole client-hint suite in one call; random per-field patching creates impossible device combos that are even more suspicious.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T09:53:34.254092+00:00— report_created — created