Skip to content

Proxy disabled: per-session Fetch.enable entries accumulate in enableCommands and replay against dead sessions on reconnect #34628

Description

@AtofStryker

CdpFetchTransport.attachChildSession sends Fetch.enable through CriClient.send, which records every *.enable (with its sessionId) in enableCommands for reconnect replay. Nothing prunes an entry when its session detaches: the Fetch.disable filter in send() only removes the entry whose sessionId matches the disable call, and the transport's stop() sends a session-less Fetch.disable, so per-session entries live for the client's lifetime.

Before #34622 this only accrued service-worker sessions; now every OOPIF ever attached in a run adds an entry, and iframes attach far more often. On every websocket reconnect, _restoreState replays the full list, including enables aimed at long-dead sessions. Failures are soft (non-disconnect errors are debug-logged and don't abort restore), so the symptom is wasted sends, debug noise, and unbounded growth over a long proxy-off run — not breakage.

Fix direction

Listen for Target.detachedFromTarget in CriClient and drop enableCommands entries (and any queued commands) whose sessionId matches the detached session.

Out of scope for the HTTP/2 MVP — backlog.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions