PhilippC / keepass2android

Password manager app for Android
https://play.google.com/store/apps/details?id=keepass2android.keepass2android
GNU General Public License v3.0
4.86k stars 393 forks source link

[BUG] Synchronization through gdrive is inconsistent #2694

Closed kyounes closed 2 weeks ago

kyounes commented 1 month ago

Checks

Describe the bug you encountered:

After making changes to a shared gdrive database on the desktop app, often I have to force close the Android app and re-open it to force it to load the changed database on gdrive. I did check the database file timestamp on Android gdrive to make sure it is the updated version, so this is not a gdrive issue.

Even choosing "Synchronize Database" in the menu doesn't resolve this, unless I close and reload the app. Is there a setting that I am misconfiguring perhaps? I have all file handling options checked in Settings (except "always merge on conflict").

Thank you!

Describe what you expected to happen:

No response

What version of Keepass2Android are you using?

1.10-pre

Which version of Android are you on?

14, build AP2A.240905.003 on Pixel 7

PhilippC commented 1 month ago

did you open the file through the built-in GDrive support or through the system file picker? You can tell this from the "url" identifier in the filename: does it start with gdrive:// or with content://?

kyounes commented 1 month ago

It looks like it's gdrive://{my gmail address}/{filename}.kdbx

kyounes commented 1 month ago

Correction (and more details). My Pixel 7 has the gdrive:// path and the KP2A app seems to work fine there.

My wife's phone uses the content:// type path (because the kdbx file is shared from my account to hers) and her K2PA app does not load the changes consistently.

Thanks again...

PhilippC commented 2 weeks ago

unfortunately I don't know how the GDrive app works internally. If my app reads the data through the content:// URL, this could trigger a direct loading from the GDrive server, but it might as well access an internal cache which might be updated after some time or even never. Sorry to say, but I don't think I can do anything better.

To resolve the issue, please think about different setups. If you want to stick to using GDrive, I recommend to create a Google account which you use only for storing the databases and you and your wife both add this account to your phones, so you can use KP2A's built-in GDrive support. You can share the databases to your personal Google accounts if you want to access the files there in other cases.