Closed Petemir closed 2 years ago
Hi @Petemir and thanks for your report!
Is the quoted command the one you're using? RUST_BACKTRACE=full keepass-diff NewDatabase.kdbx NewDatabase.kdbx --same-password
I mean that command looks like it should diff the same file with itself which wouldn't really make sense to me. I'm not sure whether opening both files at the same time could yield that issue - I'm not sure whether I ever tested that...! 🙂
If you were actually using two different files, did you check both files individually with the Keepass client you're usually using? "corrupt deflate stream" and "Error opening database A" sounds like it had trouble opening the first of the two files.
Hi @Petemir and thanks for your report!
Hi @Narigo , thank you for answering :) .
Is the quoted command the one you're using?
RUST_BACKTRACE=full keepass-diff NewDatabase.kdbx NewDatabase.kdbx --same-password
I mean that command looks like it should diff the same file with itself which wouldn't really make sense to me. I'm not sure whether opening both files at the same time could yield that issue - I'm not sure whether I ever tested that...! slightly_smiling_face
Well, that's a new use case :smile: . Actually I first tested it with two different files, obviously. As I got the same error, I proceeded to test with the same file, just to see if it was a problem with either of the files.
If you were actually using two different files, did you check both files individually with the Keepass client you're usually using? "corrupt deflate stream" and "Error opening database A" sounds like it had trouble opening the first of the two files.
Yes, the file represents my current database, which I constantly and normally use everyday, across my desktop, Keepass2Android (Android) and StrongBox (iOS). Each one of them opens the file without any problems.
Let me know if I can help you debug something further.
@Narigo I've narrowed down the problem. If an entry has a "large" attached file to it, the program will fail to open the database. With "large" I mean at least a few MB (I had problems already with 2MB files); files with a few hundred KB do not fail. I hope this helps :) .
Thank you, that helps a lot! Do you want to create two simple reproducer files (with example passwords) so we could use this as a test? I never attached files to KeePass entries myself, so this is completely untested currently. Are smaller files being diffed already? The opening of the KeePass files is done through the underlying module from Stefan Seemayer - I will open an issue there and link it to this issue over here. /cc @sseemayer
I'll leave this issue open until using files is fixed here - thanks again for reporting this @Petemir !
The command for testing these is keepass-diff Test-with* --passwords samplepassword
.
I attach two zip files. One (Test_big_attachment.zip) contains two databases with one entry, one of them with a 2M random file attached; the other one (Test_small_attachment.zip) is the same, but with one small file instead. keepass-diff
detects no difference between the databases in the latter case (i.e., they are not being diffed).
Finally came around to test the files myself. I have opened issue 47 at keepass-rs with your test file. Thanks again, I'll leave this open (with blocked
label) until we can update to a newer version that allows us to open files with larger attachments.
The fix was quite simple -- hopefully you can use the branch to test it
Thanks a lot @DavidVentura! Looking forward for the new release @sseemayer 👍 Will close this issue once the new version is released and I've updated it here 🙂
keepass-diff
v1.1.4 is now available - @Petemir worked for me with the test files now. If it's still problematic, please reopen and let me know! Thanks again to everyone involved! :)
I confirm it is working for me too in the full files :). Thank you everyone!
Hello! Thanks for this very helpful tool :) . As others, I sometimes get sync(th)ing conflicts from using my database from several devices, and it's hard to know what went wrong.
When trying to check my database, I get the following error. Let me know how I can help debugging it further.