You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a Python tool that uses your pykeepass library. I used it to write some filenames into a KDBX file generated by KeePassDX, and it worked—or so I thought. Later I found out that KeePassDX could no longer open that database file. I don't remember whether it was V2 or V3 back then (this was before the V4 release), but at the time KeePassDX opened it just fine. My mistake: I didn't keep a backup.
After hours of troubleshooting, I first noticed that pykeepass could still open the file, so I wrote a small script to dump it to XML—and the contents came out perfectly intact. Then I dove into the source code of KeePassXC, KeePassDX, and pykeepass, trying to pinpoint the issue. I tweaked Argon2's memory parameter, messed with the AWS UUID, played around with padding, and read through multiple KeePass codebases to understand the KDBX structure, the recognition logic, encryption, decryption, the overall flow, and the standard spec.
Within the first two or three hours, I already had a self-ported KeePassXC-CLI, the web tool app.keeweb.info, your pykeepass, and my own little KDBX utility all able to open the file—but KeePassDX still wouldn't. I've been using a key file with no password from the start. At first I thought the --no-password flag might be the culprit, but that turned out to be a dead end. Eventually I hacked together a KeePassDX-like command-line tool based on its own source code, and that actually worked. I thought I was finally done—until I tried opening the file on my phone with the actual KeePassDX app. Still no luck.
I've tried nine different fixes in total, and every single one of them failed. Every attempt just gave me the same error: "Failed to load database."
To be honest, my technical skills just aren't cutting it here. So I'm out of ideas. Figured I'd reach out to the original author of pykeepass and see if you have any insight.
I will upload my tool to my Github repository.You can check it.
It would be hard for me to guess what KeepassDX is doing differently. You can start with your broken database and change one thing at a time until it works, or go the other way and start with a working database, changing it until it breaks.
Have you asked the KeepassDX author? Or looked at adb logs?
On August 16, 2026 1:45:17 AM CDT, NotMindGame ***@***.***> wrote:
NotMindGame created an issue (libkeepass/pykeepass#436)
I wrote a Python tool that uses your pykeepass library. I used it to write some filenames into a KDBX file generated by KeePassDX, and it worked—or so I thought. Later I found out that KeePassDX could no longer open that database file. I don't remember whether it was V2 or V3 back then (this was before the V4 release), but at the time KeePassDX opened it just fine. My mistake: I didn't keep a backup.
After hours of troubleshooting, I first noticed that pykeepass could still open the file, so I wrote a small script to dump it to XML—and the contents came out perfectly intact. Then I dove into the source code of KeePassXC, KeePassDX, and pykeepass, trying to pinpoint the issue. I tweaked Argon2's memory parameter, messed with the AWS UUID, played around with padding, and read through multiple KeePass codebases to understand the KDBX structure, the recognition logic, encryption, decryption, the overall flow, and the standard spec.
Within the first two or three hours, I already had a self-ported KeePassXC-CLI, the web tool app.keeweb.info, your pykeepass, and my own little KDBX utility all able to open the file—but KeePassDX still wouldn't. I've been using a key file with no password from the start. At first I thought the --no-password flag might be the culprit, but that turned out to be a dead end. Eventually I hacked together a KeePassDX-like command-line tool based on its own source code, and that actually worked. I thought I was finally done—until I tried opening the file on my phone with the actual KeePassDX app. Still no luck.
I've tried nine different fixes in total, and every single one of them failed. Every attempt just gave me the same error: "Failed to load database."
To be honest, my technical skills just aren't cutting it here. So I'm out of ideas. Figured I'd reach out to the original author of pykeepass and see if you have any insight.
I will upload my tool to my Github repository.You can check it.
--
Reply to this email directly or view it on GitHub:
#436
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
I think the problem caused by pykeepass.The only good thing is that we can go to the web app.keeweb.info to convert the corrupted KDBX file back to a normal KDBX file.You are the creators of the pykeepass.You are familiar with the pykeepass.But I am not familiar with it.
I think the problem caused by pykeepass.The only good thing is that we can go to the web app.keeweb.info to convert the corrupted KDBX file back to a normal KDBX file.You are the creators of the pykeepass.You are familiar with the pykeepass.But I am not familiar with it.
I extremely think the bug caused by version updating.But I don't know which updating is the cause.
If you can provide an example kdbx+password that reproduces the issue, I can take a look. I dont have enough information right now to attempt fixing this.
I just encountered the same issue. I'm guessing it happened after editing a version 3 kdbx with gnome-secrets (and therefore pykeepass), but I didn't have file versioning enabled so I can't trace back. I was unable to open with KeePassDX. I tried using KeePassXC on desktop which gave a more specific error that the hash in the header mismatched. Since I suspected that nothing else was actually corrupted I commented out the line of code that errors out and it opens successfully. I changed the format in KeePassXC to version 4 and saved. Hopefully it's fine from now on but I kept a backup of the last version in case something goes wrong or I can use it to debug the root cause.
Activity
Evidlo commentedon Aug 16, 2026
NotMindGame commentedon Aug 18, 2026
I think the problem caused by pykeepass.The only good thing is that we can go to the web app.keeweb.info to convert the corrupted KDBX file back to a normal KDBX file.You are the creators of the pykeepass.You are familiar with the pykeepass.But I am not familiar with it.
NotMindGame commentedon Aug 18, 2026
I extremely think the bug caused by version updating.But I don't know which updating is the cause.
Evidlo commentedon Aug 19, 2026
If you can provide an example kdbx+password that reproduces the issue, I can take a look. I dont have enough information right now to attempt fixing this.
mvnetbiz commentedon Oct 12, 2026
I just encountered the same issue. I'm guessing it happened after editing a version 3 kdbx with gnome-secrets (and therefore pykeepass), but I didn't have file versioning enabled so I can't trace back. I was unable to open with KeePassDX. I tried using KeePassXC on desktop which gave a more specific error that the hash in the header mismatched. Since I suspected that nothing else was actually corrupted I commented out the line of code that errors out and it opens successfully. I changed the format in KeePassXC to version 4 and saved. Hopefully it's fine from now on but I kept a backup of the last version in case something goes wrong or I can use it to debug the root cause.