https://bugs.kde.org/show_bug.cgi?id=512135

            Bug ID: 512135
           Summary: KWallet acting as proxy for KeePassXC wrongly asks to
                    create new database (sometimes)
    Classification: Frameworks and Libraries
           Product: frameworks-kwallet
      Version First 6.17.0
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

SUMMARY
Reporting on behalf of Miha Markič, original report at
https://github.com/keepassxreboot/keepassxc/discussions/12445 :

> I'm using KeepassXC as secret service on Fedora 42 KDE and migrated
> KWalletManager so keepassxc is used for wallets as well.
> https://notmart.org/blog/2025/04/towards-a-transition-from-kwallet-to-secret-service/
> Now, this almost works except for randomly seeing KeepassXC dialogs
> to create a new database - sometime one at the time, sometimes more
> than one. I'd dismiss all of them and then it works normally.

STEPS TO REPRODUCE
The user wasn't able to determine reliable steps to reproduce, but reports that
"it always happen sooner or later", and apparently more often after resuming
from sleep.
In one test case, he was able to trigger the behavior by trying to connect to
KRDC.
Having "org.freedesktop.secrets" "not activatable", but started manually, may
contribute to the issue.

OBSERVED RESULT
- KeePassXC displays a create database dialog.
- The DBus log shows a `CreateCollection` call from KWallet, and no calls to
list existing collections.

EXPECTED RESULT
- KWallet should list the existing collections, and access the relevant one.
- User should not be prompted to create a new database if a suitable one
already exists.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Fedora 42-43
KDE Plasma Version: ?
KDE Frameworks Version: ? (standard for Fedora 42 is 6.17.0)
Qt Version: ?

ADDITIONAL INFORMATION
See the DBus log and discussion at
https://github.com/keepassxreboot/keepassxc/discussions/12445#discussioncomment-14922681
(Log at
https://github.com/keepassxreboot/keepassxc/discussions/12445#discussioncomment-14946327
)

It appears `SecretServiceClient::listFolders()` skips the actual calls to list
existing collections, causing `KWalletD::openInternal()` to fall back to the
`createCollection()` call. This might be caused by a partial failure of
`attemptConnection()`.
https://invent.kde.org/frameworks/kwallet/-/blob/master/src/runtime/kwalletd/secretserviceclient.cpp?ref_type=heads#L487
https://invent.kde.org/frameworks/kwallet/-/blob/master/src/runtime/kwalletd/kwalletd.cpp?ref_type=heads#L342

The log shows that the user's "org.freedesktop.secrets" was "not activatable",
resulting in an error being returned by DBus, despite the service having been
manually started with KeePassXC. But the user reports that adding the DBus
service auto-start file did _not_ resolve the problem.

Restarting kwalletmanager5 and kwalletd6 seems to resolve the problem
temporarily, but restarting KeePassXC usually does not help.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to