Skip to content

Chrome cookie import fails on KDE Plasma (KWallet) with "No encryption key in your Keychain" #29234

Open

Description

@ahmedisam99

What happened

On KDE Plasma 6, Settings → Browser profiles → Import from Chrome fails for every Chrome profile with "Couldn't import from Chrome. No encryption key in your Keychain. Sign in to that browser once, then retry." Signing in to Chrome again changes nothing. Chrome's key is in KDE Wallet; T3 Code doesn't look for it there.

Diagnosis

On KDE, Chrome picks the kwallet6 password store (from KDE_SESSION_VERSION) and writes its key through the KWallet API: wallet kdewallet, folder Chrome Keys, entry Chrome Safe Storage. Exposed through the Secret Service (ksecretd), that item has the attributes server=Chrome Keys, user=Chrome Safe Storage, type=plaintext, and no application attribute.

native/browser-secret/main.c looks the key up only by application=<name> with the chrome_libsecret_os_crypt_password_v2 schema, which is how Chrome stores it on GNOME/libsecret. On KDE the search returns nothing, so the helper exits 2 (KEY_MISSING). Every cookie is v11, none decrypt, and readChromiumCookieDatabase returns cbcV11Error = keychainItemMissing.

#7261 left this out on purpose ("no direct KWallet implementation"), and main hasn't changed it.

Possible fix: when the application lookup comes up empty, fall back to the KWallet layout (server=<Browser> Keys, user=<Browser> Safe Storage via Secret Service, or KWallet D-Bus directly). Separately, the keychainItemMissing copy is macOS-only: Linux has no "Keychain", and "sign in to that browser" is not the fix here.

Steps to reproduce

  1. KDE Plasma 6 session with KWallet (ksecretd serving org.freedesktop.secrets), Google Chrome launched normally (no --password-store flag).
  2. Sign in to any site in Chrome, then quit Chrome. Its cookies are v11.
  3. In T3 Code Desktop: Settings → Browser profiles → Import from Chrome → pick a profile → Import.
  4. Import fails with keychainItemMissing.

Version

T3 Code Desktop 0.1.6 (AUR t3code-bin 0.1.6-1). Not fixed on main either: native/browser-secret/main.c last changed in #9516.

Environment

EndeavourOS (Arch), Linux 7.2.11, x64. KDE Plasma 6 on Wayland (XDG_CURRENT_DESKTOP=KDE, KDE_SESSION_VERSION=6). Secret Service from ksecretd (kwallet 6.31.0), libsecret 0.21.8. Google Chrome 156.0.8078.47.

Evidence

Desktop trace (`desktop.trace.ndjson`), span `BrowserImport.importCookies`:

BrowserImportFailedError: Importing cookies from chrome failed: keychainItemMissing.

- Chrome profiles: `Default` has 3698 cookies, all `v11`; `Profile 2` has 1199, all `v11`.
- Secret Service `SearchItems({application: "chrome"})` returns `[]`.
- Wallet items labelled `Chrome Keys/Chrome Safe Storage` exist, with attributes `{server: "Chrome Keys", user: "Chrome Safe Storage", type: "plaintext"}` (one also has `xdg:schema: org.qt.keychain`).
- The KWallet entry's value, run through the Linux OSCrypt derivation (PBKDF2-SHA1, `saltysalt`, 1 iteration), decrypts sampled `v11` cookies (20/20).
- With a copy of that key stored under `xdg:schema=chrome_libsecret_os_crypt_password_v2 application=chrome`, the bundled `t3-browser-secret chrome` exits 0 and the import succeeds (3250 and 1107 cookies imported; the skipped ones are almost all partitioned).

Related issues

Fix applied or workaround

Copy Chrome's KWallet key into an item the helper can find, import, then remove the copy:

printf %s "$(kwallet-query -f 'Chrome Keys' -r 'Chrome Safe Storage' kdewallet)" \
  | secret-tool store --label='Chrome Safe Storage' \
      xdg:schema chrome_libsecret_os_crypt_password_v2 application chrome
# import in T3 Code, then:
secret-tool clear xdg:schema chrome_libsecret_os_crypt_password_v2 application chrome

Filed by

Claude Code (Opus 5.5, claude-opus-5-5) running the T3 Code triage playbook inside T3 Code.

Activity

  1. added
    via-triage
    on Nov 2, 2026
  2. atybdot commented on Nov 26, 2026

    @atybdot

    Helium hits this too, through the same lookup.

    Fedora 44, Plasma 6, KWallet 6 serving org.freedesktop.secrets. Settings > Browser profiles > Import from Helium fails with the same "No encryption key in your Keychain" message. Helium uses the Chromium key. The helium source already sets linuxSecretApplication: "chromium", and the KWallet item on this machine is server=Chromium Keys, user=Chromium Safe Storage, type=plaintext, with no application attribute. SearchItems({application: "chromium"}) returns nothing, t3-browser-secret chromium exits 2, and every cookie in all three profiles is v11, so the whole import fails with cbcV11Error: keychainItemMissing.

    Copying that key under xdg:schema=chrome_libsecret_os_crypt_password_v2, application=chromium makes the helper exit 0. Then all 1609 cookies across Default, Profile 4 and Profile 6 decrypt, with the SHA256(host_key) prefix matching in every case. Same workaround as the report above, with application=chromium and the Helium source selected instead of Chrome.

    One detail for the fix. The KWallet folder and entry names follow the product, not the executable name. Chrome uses Chrome Keys / Chrome Safe Storage, Chromium and Helium use Chromium Keys / Chromium Safe Storage. A fallback keyed off linuxSecretApplication would work for Helium by accident, but it is the wrong string in general, so the fallback probably needs a per-source folder name.

    Still reproduces on the 2026-11-24 nightly AppImage with Helium 0.22.2.1. The copy about the macOS Keychain on Linux is the other half of the problem. There is no Keychain here, and signing in again cannot help.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions