Skip to content

Network offline emulation leaves target unresponsive to navigate and evaluate #281

Description

@XDLCS

Summary

After Network.emulateNetworkConditions with offline: true, the affected target becomes unresponsive: Page.navigate gets no response, no load events fire, and Runtime.evaluate returns an empty result object. The CDP connection itself stays alive (commands to the browser endpoint and session-level Runtime.evaluate before navigation work; after restoring offline: false the target does not recover).

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)

  1. Create + attach target, Page.enable, Runtime.enable, Network.enable
  2. Network.emulateNetworkConditions {"offline":true,"latency":0,"downloadThroughput":-1,"uploadThroughput":-1} → accepted
  3. Page.navigate {"url":"http://127.0.0.1:8765/page.html"}

Observed (moli)

  • Page.navigateno result (response object empty)
  • No Page.frameStartedLoading / loadEventFired events during a 3s window
  • Runtime.evaluate "1+1"empty result object ({})
  • The browser-level WS connection remains responsive (e.g. Target.getTargets works), but the target is effectively dead; restoring offline:false does not revive the already-navigated target

Expected (Chromium 131)

  • Navigation proceeds under the emulated condition (Chrome doesn't hard-block loopback navigations; navigator.onLine stays true — a known Chrome quirk — but the page loads and evaluates normally)

Impact

Offline/weak-network testing — a standard agent-scenario simulation — hangs the target. Any harness that toggles offline mode then navigates will deadlock.

Verified on a1385e0: nav_resp=False, eval=None — unchanged.

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