You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Attached CDP HAR recording can miss popup first navigation #523
A scenario HAR from an attached CDP browser can omit a sign-in popup's first navigation under load, even when the provider received the request. A missing popup request in the HAR alone cannot establish that the connector failed.
src/browser-launch.ts records the attached context through routeFromHAR(..., { update: true }). The original ownership fixture used window.open(providerUrl). Under CPU contention, its loopback server received /provider and the browser owner's client saw the request finish, but the recording client's HAR lacked it in 1 of 30 runs. A recorder-side probe reproduced the miss in 1 of 50 runs: the server count was one, the recording client logged no request or requestfinished events for /provider, and the HAR contained only the run page and owner tab. A passing control logged both request events. This places the observed miss at or before the attached client's network event capture, rather than at HAR export. PR #522 stabilizes the ownership test by opening a blank popup and navigating it after the popup event; real sign-in popups can still use window.open(providerUrl).
One candidate fix is a context-level CDP Network listener that captures new-target traffic and merges it into the HAR without duplicate entries. Another is Target.setAutoAttach with waitForDebuggerOnStart, which would pause popups until the recorder has attached. A regression test should use the original window.open(providerUrl) flow, verify the request reaches both server and HAR under contention, and preserve external browser page ownership.
The exact CDP/Patchright scheduling step that drops the recording client's event has not been traced.
Activity