Skip to content

fix: support Windows Opera and Opera GX cookie imports - #2980

Closed
mvanhorn wants to merge 1 commit into
garrytan:mainfrom
mvanhorn:fix/2957-windows-opera-cookie-import
Closed

mvanhorn wants to merge 1 commit into
garrytan:mainfrom
mvanhorn:fix/2957-windows-opera-cookie-import

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Why (in your own words)

Extend the existing registry metadata with an explicit Windows Local/Roaming choice and register Windows-only Opera and Opera GX identities with distinct key-cache identities and aliases (opera, opera-gx, and the case-insensitive display name); represent absent macOS support explicitly in getDataDirForPlatform without inventing unverified non-Windows paths. Resolve the new Roaming root from non-empty APPDATA, falling back to os.homedir()/AppData/Roaming, while preserving existing browsers' Local-root behavior. Update every root construction in findInstalledBrowsers, listProfiles, findBrowserMatch, getBrowserMatch, getWindowsAesKey, and importCookiesViaCdp to consume the browser-aware resolution consistently; retain existing profile validation, Network/Cookies priority, and fallback to profile-level Cookies.

Issue #2957 reports misleading cookie-database errors, a failing Chrome CDP fallback, and missing Opera/Opera GX support on Windows. The September 25 comment explicitly says merged PR #2964 addressed the first two areas while keeping Opera support and native extraction qualification unresolved. At inspected revision 2a113ae7e623f590095bcaaa0cc581c9a10a6632, typed database errors and the native-extraction delegation are present, but BROWSER_REGISTRY has no Opera entries and all Windows roots use AppData/Local. The reporter verified Windows v10 decryption independently and supplied concrete Roaming layouts: Opera Software/Opera Stable/Default/Network/Cookies and Opera Software/Opera GX Stable/Default/Network/Cookies, with Local State directly under each browser root.

Fixes #2957

Live evidence


# what you ran + what it produced

Scope

  • Changed:
  • Verified live by:
  • Did NOT test:

Liveness proof (required for external contributors)

Not applicable to this change.

Checklist

  • Liveness screenshot attached (GSTACK PR typed live into a real surface) or PR author is @garrytan (owner exemption)
    Not verified: this needs a person on the named hardware or environment.
  • This is not a generated-file-only diff (I edited the source/template and regenerated)
  • No ETHOS.md edits, and no changes to voice / founder perspective / YC references
  • New public command / external service / host adapter has an accepted issue linked (or N/A)
  • Linked issue or reproduction: #

AI was used for assistance.

@trunk-io

trunk-io Bot commented Sep 26, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Thanks @mvanhorn — this is now included, with your authorship, in the release wave #2987. The wave adds docs, release metadata, a Windows v10 hash-prefix decryption fix it uncovered, clearer errors, and a real-DPAPI Windows CI test. I'll close this PR once #2987 merges.

garrytan added a commit that referenced this pull request Sep 28, 2026
…2987)

* fix: support Windows Opera and Opera GX cookie imports

Fixes #2957

* fix: repair Windows cookie decryption and make Opera import failures actionable

- strip the SHA-256(host_key) prefix Chromium adds to v10 values (DB meta v24+) on Windows
- keep receipts and name `$B handoff` recovery for App-Bound rows in browsers without native extraction
- explain missing browsers, missing profiles and ambiguous profile selection with next steps
- add windowsNative/resolveBrowserInfo, the operagx alias and sorted failure reasons in CLI output
- cover the Node server runtime with a real-DPAPI Windows test

* docs: document Windows Opera cookie import and guard browser lists against drift

* chore: file cookie-import follow-ups from the Opera fix wave review

* test: keep Opera receipt tests independent of the shared key cache

* test: declare generated gstack/llms.txt as a command-reference input for PR selection

* chore: release v1.91.4.0

* test: reconstruct the historical cookie-workflow approval after the Opera BROWSER.md additions

* test: run the real-DPAPI Windows check with the runner's environment

PowerShell launched with a stripped environment took ~18-21s on the Windows
runner (measured on a throwaway diagnostics run), past dpapiDecrypt's 10s
deadline; with the full environment it returns in ~0.3s. Only APPDATA is
redirected to the fixture's Opera root.

---------

Co-authored-by: Matt Van Horn <[email protected]>
@capy-ai

capy-ai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Closing now that #2987 has merged (v1.91.4.0), which supersedes this. Thank you!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cookie-import-browser on Windows: misleading "locked" error, v20 CDP fallback times out on Chrome 136+, Opera/Opera GX unsupported

1 participant