Skip to content

Network.getCookies omits SameSite=None; Secure cookies visible to the page #283

Description

@XDLCS

Summary

Network.getCookies omits cookies whose stored attributes are SameSite=None; Secure. The cookie is visible to the page (document.cookie) and was accepted via Network.setCookie, but it never appears in the CDP cookie list — a silent data loss for any CDP-based cookie inspection.

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. Network.enable
  2. Network.setCookie {"name":"nonec","value":"1","domain":"127.0.0.1","path":"/","secure":true,"sameSite":"None"} → accepted
  3. Network.getCookies {"urls":["http://127.0.0.1:8765/"]}

Observed (moli)

  • Response cookies list does not contain nonec
  • Meanwhile in-page document.cookie does contain nonec=1 — the cookie exists in the jar, only the CDP listing drops it

Expected (Chromium 131)

nonec is present in Network.getCookies results (Chrome lists all matching cookies regardless of SameSite/Secure attributes)

Impact

Silent, hard-to-debug loss for agent harnesses reading session state over CDP: SSO / cross-site cookies are precisely the ones commonly set with SameSite=None; Secure, and they're exactly the ones that go missing from the CDP view while the page itself still sees them.

Verified on a1385e0: C37_nonec_in_cdp: False — unchanged.

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