syncthing-Fork breaks URI of KeePass default database (.kdbx file)

Hello, forum! I installed Syncthing-Fork from F-Droid to keep various folders synced between my phone and my GNU+Linux laptop. Everything works great with one small but important exception.

My .kdbx password file is in one of the sync directories. Every time I make a change to that file on my phone or on my computer, Syncthing-Fork syncs the changes as expected. However, after Syncthing touches the file, next time I try to open the .kdbx file in the KeePassDroid app, it claims the file does not exist. I tried a different KeePass app (KeePassDX Passkey Vault) with similar results.

The workaround is to go into KeePassDroid, delete the URI for the .kdbx file (which looks like “content://com.android.externalstorage.documents/document/primary/%3Astuff%2Fpasswords.kdbx”), then re-create the URI by selecting the .kdbx file from scratch.

I’m a bit bewildered because the URI seems to contain nothing but the path to the .kdbx file, which obviously does not change when the file is synced. This is probably a bug (or at least needlessly complicated behavior) in AOSP–for invisibly including metadata in a URI that appears to be simply a path–but I didn’t know where to ask for help…so I came here.

Is there a way to use Syncthing-Fork with a KeePass client which does not involve having to re-select the .kdbx database file every time the file is synced?


Versions:

Phone: Fairphone 6+

OS: LineageOS 23.2

Syncthing-fork: 2.1.5.0

KeePassDroid: 2.6.9.2

It’s https://github.com/syncthing/syncthing/issues/10887. There’s a workaround available, but I don’t know if Syncthing-Fork has implemented it. You may want try updating the app first, because yours is outdated (with the newest version at the moment being 2.1.7).

Thank you, Tomasz. It’s issue 10887, for sure. I thought I had the latest version of the app because 2.1.5.0 is the latest in F-Droid. I downloaded version 2.1.7 (from Release Syncthing-Fork v2.1.7.0 · researchxxl/syncthing-android · GitHub ) and, sure enough, the problem is solved. I did not need to tweak any settings in the new version of the app to solve my problem.

Thanks again for your help. I wasted quite a few hours chasing my tail on this problem yesterday. Happy hacking!