Skip to content

Fetch.enable interception never fires requestPaused and swallows page fetch #280

Description

@XDLCS

Summary

After Fetch.enable with request-stage patterns, CDP never emits Fetch.requestPaused for matching requests, and a matching in-page fetch() never settles — the request is swallowed and the promise rejects with TypeError (no pause event, no response, no error surfaced to the network layer).

Environment

  • moli 1.0.6, also verified on local build a1385e0 (main, 2026-08-30)
  • Chromium baseline: chrome-headless-shell 131.0.6778.204, same CDP script

Reproduction (CDP over ws://…/devtools/browser/…)

  1. Create + attach to a target, Page.enable, Runtime.enable, Network.enable
  2. Fetch.enable {"patterns":[{"urlPattern":"http://127.0.0.1:8765/*","requestStage":"Request"}]}
  3. In-page: fetch('/v6.html').then(r => r.status).then(...).catch(e => window.__er = e.name)
  4. Listen for Fetch.requestPaused for 5s

Observed (moli)

  • Fetch.enable is accepted (no error)
  • No Fetch.requestPaused event ever arrives (5s window)
  • The in-page fetch rejects with TypeError after the swallow (earlier builds left it pending forever; the failure mode changed but interception still never engages)
  • With Fetch.enable called without patterns (no interception), the same fetch completes normally → baseline network path is healthy; the breakage is specific to interception mode

Expected (Chromium 131)

  • Fetch.requestPaused fires for the matching request
  • Fetch.continueRequest resumes it and the fetch settles with the real response status

Impact

Request mocking/rewriting — a core CDP capability for agent test harnesses — is entirely non-functional: you can neither observe nor modify requests via Fetch domain.

Verified on a1385e0: still no pause event; in-page fetch now rejects TypeError instead of hanging.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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