Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.55k stars 269 forks source link

Random crash on database open #1791

Closed gza closed 5 months ago

gza commented 6 months ago

Describe the bug

After enabling biometric open, opening database works few times then fail with error (see screenshot)

To Reproduce

Steps to reproduce the behavior:

  1. install and use it few times
  2. then this happen

Screenshot_20240320-231111

when this issue starts, it becomes almost impossible to open the database

Expected behavior

Open with Password more than 10 times without issues

KeePass Database

KeePassDX:

Android:

Additional context

gza commented 6 months ago

I updated the issue because, at first it seemed related to fingerprint. But even after full app data flush and no biometric setup issue happen after few DB open.

J-Jamet commented 6 months ago

It seems to come from your file provider, which application do you use to open your file? (The URI is present in the previous screen when you display more information about the filename)

gza commented 6 months ago

You are right there is something strange here, url is content://org.nextcloud.documents/document/xxxxx

OK, I think I have an explanation : When one open a file in google's files app with Nextcloud shortcut on the menu, it will use a kind of Virtual Filesystem. So the app, will not talk to Android File API but with Nextcloud API.

Anyway, this does not seem to be a hard incompatibility (as it works from time to time) and Nextcloud sync is pretty much common use case. Can we consider this as a bug to be fixed ? or is it already identified somewhere (i haven't found obvious related bugs) ?

J-Jamet commented 5 months ago

What you call the VirtualFileSystem is the only method used in KeePassDX to access file contents. It's an interface contract, the storage access framework, which is standardized on Android. Most of the time it works fine when it's a local file, but many applications that provide files to synchronize provide a buggy file provider, all explained here : https://github.com/Kunzisoft/KeePassDX/wiki/File-Manager-and-Sync Honestly, I can't do much better at this level except make an application that better handles synchronization with protocols that use specific file transfer APIs.

gza commented 5 months ago

Thank you for pointing me the fine doc.