Closed bug report

credential_set fails on a full Windows vault (CredWriteW error 8) after the no-hostFilter import the hint recommends: needs vault_full errorCode + prune, and an index that does not spend one Credential Manager slot per site

John Lauer · 1mo ago ·closed by John Lauer

Summary

On AdomLapper (Windows 11, pup 2.0.645) every credential_set fails with a Windows Credential Manager capacity error, even a 1-byte probe. The vault holds 871 entries after the no-hostFilter pup_import_browser_logins that pup's own credential_list hint recommends for a first import. pup reports the raw Win32 error and offers no way out; the only workaround was to credential_delete an entry to make room.

What I ran

adom-bridge --ai-thread "ToF sensor libs" --target AdomLapper credential_set '{"host":"my.st.com","username":"[email protected]","password":"<18 chars>"}'
adom-bridge --ai-thread "ToF sensor libs" --target AdomLapper credential_set '{"host":"probe.invalid","username":"probe","password":"x"}'
adom-bridge --ai-thread "ToF sensor libs" --target AdomLapper credential_list '{}'

What I expected

The credential stored (host + username in the index, secret in the keychain), or a structured error that names the cause and the remedy.

What happened

Both writes, four retries 15 s apart, returned the same thing:

{"status":"error","ok":false,"error":"CredWriteW failed (error Not enough memory resources are available to process this command. (os error 8))"}

credential_list {} returned ok:true with 871 credentials (only 15 flagged imported:true, yet the hosts are clearly the user's Chrome logins: allstate, hertz, avis, aa.com, gusto, americanexpress ...). The same credential_set on ConfRoomROG (small vault) succeeded first try.

ERROR_NOT_ENOUGH_MEMORY (8) from CredWriteW is the error Windows returns when the per-user credential set is at capacity, not a real memory problem. A 1-byte probe failing confirms it is capacity, not payload size.

Workaround that worked

credential_delete {"host":"my.st.com","username":"[email protected]"}   -> ok
credential_set    {"host":"my.st.com","username":"[email protected]", ...}   -> ok
pup_login {submit:true} on my.st.com                                      -> LOGGED IN

So one freed slot was enough; the store is right at the cap.

Proposals

  1. Map CredWriteW error 8 to errorCode: "vault_full" with a _hint that says how many entries the vault holds and names credential_delete (or a new credential_prune {olderThan|hostFilter|imported:true}) as the remedy. A bare Win32 string sends the AI down a memory-pressure rabbit hole.
  2. Do not spend one Credential Manager slot per site. Keep the index in pup's own DPAPI/keychain-encrypted file (or one keychain blob) so the vault size is not bounded by Windows' per-user credential cap. Windows creds that the user's other apps already hold count against the same cap, so pup can hit it without being the main tenant.
  3. pup_import_browser_logins should report written, skipped, failed counts and stop with vault_full instead of failing silently part way. The credential_list hint that recommends "no hostFilter the first time" should mention the cap, or the import should keep a hostFilter default that only widens on request.
  4. Set imported:true on every entry the import wrote (856 of 871 here are unflagged), so a future prune can target them safely.

Found while

Storing the myST login for [email protected] on both of John's machines (ToF sensor library run, 2026-09-19). ConfRoomROG stored it fine; AdomLapper needed the delete-then-set workaround.

1 Reply

John Lauer · 1mo ago

Fixed in pup 2.0.649, hotfixed in 2.0.651 (insiders, on AdomLapper).

What ships: every secret lives in one DPAPI-protected file (~/.adom/pup-vault.bin, CryptProtectData, current user, UI forbidden) instead of one Credential Manager entry per login, so there is no per-user slot cap any more. Legacy entries are migrated on the first vault call (save first, then delete the Credential Manager copies) and their slots freed. Measured on AdomLapper: credential_set that failed with error 8 on 2.0.648 succeeds; store 47686 bytes, 857 secrets; Credential Manager targets for pup down from 864 to 7.

What it cost, and I own this: 2.0.650's migration held the cache lock across its save (a deadlock that hung every vault verb) and deleted entries before the save had completed. 14 index entries lost their secret in both stores: 13 americanexpress.com logins (www / online / global / travel / checkout, usernames adom1, jlauer12, zipwhip) and ms.componentsearchengine.com ([email protected]). All were browser imports, so pup_import_browser_logins {hostFilter:"americanexpress.com,componentsearchengine.com"} restores them from Chrome; it has been started on the laptop and waits on the consent toast. 2.0.651 saves before it deletes and never holds the lock across the save.

Not done from the proposal: a vault_full error code; with the slot cap gone there is nothing to prune. The import hint should still suggest a hostFilter for a first import, and does.

John Lauer closed this · 1mo ago

Log in to reply.