Skip to content

[Bug]: Chrome cookie import still fails on Windows in 1.4.224: ERR_UNKNOWN_ENCODING buffer #27617

Closed

Description

@John-p-Webster

Summary

Chrome cookie import still fails on Windows in Orca 1.4.224 with ERR_UNKNOWN_ENCODING: Unknown encoding: buffer. The UI misleadingly suggests that the OS denied access to Chrome's encryption key.

Related existing report: #18670 (reported against 1.4.197). This report confirms the failure persists after updating from 1.4.223 to 1.4.224.

Environment

  • Windows x64, OS build 26200
  • Orca 1.4.224; also observed on 1.4.223
  • Google Chrome 154.0.8037.98

Steps to reproduce

  1. Open Orca on Windows with an existing Chrome profile containing cookies.
  2. Go to Settings → Browser → Import under Import Browser Cookies.
  3. Attempt to import Chrome cookies into Orca's default browser profile.

Actual result

The import fails with:

Could not access Google Chrome encryption key. The OS may have denied access.

A fresh retry through the actual UI on 1.4.224 produced these entries in %APPDATA%\orca\cookie-import-diag.log:

[2026-10-11T22:48:49.396Z] importCookiesFromBrowser: browser=chrome partition="persist:orca-browser"
[2026-10-11T22:48:49.410Z]   source has 3567 cookies
[2026-10-11T22:48:49.425Z]   Windows DPAPI key extraction failed: TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: buffer

Expected result

The Windows key-extraction subprocess should execute without an encoding exception. Any subsequent OS permission or unsupported encryption-format problem should be reported accurately rather than conflated with this programming error.

Investigation

Inspection of the installed 1.4.223 bundle traced the Windows key-extraction path to a synchronous process helper:

  • The importer reads os_crypt.encrypted_key from Chrome's Local State and passes a base64 string as stdin to a PowerShell DPAPI helper.
  • The shared process runner invokes spawnSync with input: e.input and encoding: "buffer".
  • Node rejects "buffer" when encoding string input, throwing before the PowerShell helper runs.
  • The importer catches that exception and returns the generic encryption-key/access-denied message.

The inspected bundle member was out/main/chunks/run-process-xe5GYZFQ.js inside app.asar in 1.4.223. The fresh 1.4.224 UI retry confirms the identical runtime exception; the new bundle's call site has not been independently inspected.

Harmless standalone reproduction

Run with Node (verified on v24.19.0):

const { spawnSync } = require('node:child_process');
for (const encoding of ['buffer', null]) {
  try {
    const result = spawnSync(
      process.execPath,
      ['-e', 'process.stdin.pipe(process.stdout)'],
      { input: 'nonsecret-probe', encoding, timeout: 3000 }
    );
    console.log({ encoding, status: result.status, output: result.stdout?.toString() });
  } catch (error) {
    console.log({ encoding, code: error.code, message: error.message });
  }
}

Observed:

encoding: "buffer" → ERR_UNKNOWN_ENCODING: Unknown encoding: buffer
encoding: null → status: 0, output: "nonsecret-probe"

Suggested fix

Use encoding: null (or omit the option) for raw subprocess output rather than the string "buffer", and retain explicit UTF-8 decoding of captured output. Add regression coverage for the synchronous process helper with string stdin. Preserve the actionable cause in the import error instead of implying an OS denial.

This only addresses the observed subprocess exception; it does not establish support for Chrome's app-bound cookie encryption. No cookie values or encryption keys are included in this report, and the installed application was not modified.

Activity

  1. AmethystLiang commented on Oct 12, 2026

    @AmethystLiang
    Contributor

    Thanks for reporting. Looking into it

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