KeePassDX icon indicating copy to clipboard operation
KeePassDX copied to clipboard

Could not read credentials

Open akovia opened this issue 2 years ago • 12 comments

Describe the bug

Can not access my passwords any longer. I use KeepassDX every single day and when I went to use it today it no longer had the option to use biometric. After failing to try and set up biometric again by turning it off and back on, I found that I couldn't even access my passwords with my normal credentials. (password and key file.)

I have both a personal and work db on my phone and can still access my work db without issue with biometric credentials.

I sync both dbs with Syncthing and can open both on my desktop without issue. (KeepassXC)

To Reproduce

Steps to reproduce the behavior:

  1. Select existing db
  2. Enter creds
  3. Select Open
  4. See error Could not read credentials

Expected behavior

My db opens

KeePass Database

  • Created with: [??]
  • Version: [V2 - KDBX4.1]
  • Location: [Documents folder via Syncthing]
  • File provider (content:// URI): [content://com.google.android.externalstorage.documents/document/primary:Sync/My-Sync/]
  • Size: [109KB]
  • Contains attachment: [Yes]

KeePassDX:

  • Version: [3.4.5] Pro
  • Build: [Free]
  • Language: [English]

Android:

  • Device: [Galaxy s22+]
  • Version: [12]

Additional context

Add any other context about the problem here. I've tried killing the program and clearing the cache. Have also tried duplicating the working db from my desktop and opening that one as well with the same problem. The desktop program is using the same keyfile, so I don't see how that can be the issue.

akovia avatar Aug 26 '22 15:08 akovia

Your problem is too generalized. My assumption is that Syncthing was doing a synchronization during a backup of the file and therefore it is no longer readable. My recommendation is to use a backup to avoid this kind of case.

Have also tried duplicating the working db from my desktop and opening that one as well with the same problem. The desktop program is using the same keyfile, so I don't see how that can be the issue.

Have you tried a manual copy without using a synchronization software?

J-Jamet avatar Aug 30 '22 12:08 J-Jamet

I couldn't wait any longer and went back to Keepass2Android and it was able to open the db without issue. I'll work on this again when I have some time.

akovia avatar Aug 30 '22 12:08 akovia

I tested all database versions and made all KeePass files readable with KeePassDX, so I think there is a bad cache in the file manager that provides your file, especially since it worked fine before.

J-Jamet avatar Aug 30 '22 12:08 J-Jamet

@akovia sounds like your KeePass Database is corrupted somehow because of Syncthing syncing while KeePassDX making changes to the database at the same time.

MDP43140 avatar Sep 13 '22 15:09 MDP43140

I also was experiencing this issue, and resolved it by downloading the key file to my device and pointing to that, rather than pointing to it in OneDrive. I was on a stock Pixel 6 and accessing onedrive via the native file manager. I wonder if there might be some issue with getting the key file from a cloud service? Or, it's also very possible it was just another fluke. I can confirm it wasn't a database corruption issue, since I was opening the exact same database both times.

dryya avatar Oct 01 '22 16:10 dryya

Concretely, the code of the key files and the database files work on the same principle. So if a file manager breaks a link, it can be the key file or the database file independently.

J-Jamet avatar Oct 13 '22 15:10 J-Jamet

I have the exact same issue right now. I'm using Syncthing, database opens normally on PC using KeepassXC but can't be opened by KeepassDX on Android.

How could the database be corrupted if it opens without issue with KeepassCX ? Is there a way to "un-corrupt" it on Android? I tried deleting it and resynchronizing it, but with the same result, it doesn't work.

Nicryc avatar May 18 '23 14:05 Nicryc

If you have tried again with the same synchronization method but it doesn't work for you. You'll obviously have the same problem. Try copying your vault .kdbx file to your Android device manually.

J-Jamet avatar Jul 22 '23 06:07 J-Jamet

I have a similar problem but I use Nextcloud to synchronize my database. In my case, when I select the database file from the Nextcloud file system KeepassDX opens it with no problems. When I open the database from KeepassDX I get the 'Could not read credentials' error.

jeff-sweeney avatar Apr 17 '24 14:04 jeff-sweeney