-
Notifications
You must be signed in to change notification settings - Fork 159
X/Twitter cookie access fails: SecurityError - Access denied for cookie property #20
Description
Problem
When using opencli-rs twitter thread <tweet-id> (or any Twitter command requiring auth), Chrome extension CDP cannot read cookies from the user's browser profile:
SecurityError: Failed to read the 'cookie' property from 'Document': Access is denied for this document.
This is a Chrome security restriction — Chrome extensions cannot access cookies from non-original Document contexts.
Environment
- opencli-rs 0.2.3 (via Homebrew on macOS)
- Chrome profile active
- Commands affected:
twitter thread,twitter timeline,twitter search, etc.
Root Cause
The Chrome extension uses CDP Document.cookie API which is blocked by Chrome's security model. The extension runs in an isolated context that doesn't have access to the authenticated profile's cookies.
Note
This issue may be addressed by PR #3 (feat: native browser detection and direct CDP. No extension required) — which syncs cookies from the real browser profile to a separate working profile and connects via CDP directly, bypassing the extension entirely. If that PR is close to merge, this issue can be closed as duplicate.