Skip to content

Fix KeePassXC Secret Service support - #1

Open
urrpurr wants to merge 1 commit into
Snd-R:mainfrom
urrpurr:fix-keepassxc-secret-service
Open

Fix KeePassXC Secret Service support#1
urrpurr wants to merge 1 commit into
Snd-R:mainfrom
urrpurr:fix-keepassxc-secret-service

Conversation

@urrpurr

@urrpurr urrpurr commented Jul 23, 2026

Copy link
Copy Markdown

When KeePassXC is the org.freedesktop.secrets provider, two bugs made it
unusable (this is the fork Komelia bundles; relates to Komelia#1):

1. Startup crash — ArrayIndexOutOfBoundsException
MessageHandler.send reads parameters[0] when a reply is a D-Bus error.
KeePassXC returns error replies with an empty body (e.g. IsLocked),
so parameters is zero-length and the access throws, killing the app on
launch. Guarded the access. (Mainline swiesend v3.0.0-alpha already has
this guard — this just brings the fork current.)

2. Logins never remembered — read always returns IsLocked
SimpleCollection.getSecret calls unlock(), which only unlocks the
collection. KeePassXC locks items independently: the collection
reports unlocked (so unlock() no-ops) while the item stays locked, so
item.getSecret returns IsLocked and no secret comes back — the user is
re-prompted every launch. Now the item is unlocked explicitly before reading.

With both fixes, KeePassXC works end-to-end: login persists across restarts.
Verified on Arch Linux, KeePassXC 2.7.12, Komelia 0.18.5

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.

1 participant