Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database wont open! #313

Closed
ghost opened this issue Feb 16, 2017 · 47 comments
Closed

database wont open! #313

ghost opened this issue Feb 16, 2017 · 47 comments

Comments

@ghost
Copy link

ghost commented Feb 16, 2017

I can open database only every other time.

Expected Behavior

Current Behavior

[Unable to open the database. Wrong key or database file is corrupt.] I keep receiving this message after being able to open it...

Possible Solution

I wish I knew

Steps to Reproduce (for bugs)

Context

Your Environment

  • KeePassXC version/commit used: 2.1.1
  • Qt version (e.g. Qt 5.3):5.5.1
  • Compiler (e.g. Clang++3.6.0):
  • Operating System and version:Ubuntu 16.04 LTs
@phoerious
Copy link
Member

phoerious commented Feb 16, 2017

Well, I suppose you mistyped your password? Or maybe have capslock on? Or wrong keyboard layout?

@RealOrangeOne
Copy link
Contributor

Assuming you are typing the password incorrectly, you could try reinstalling keepassxc. Alternatively you could try the Repair Database option under Database > Repair Database and see if that does something about it.

@ghost
Copy link
Author

ghost commented Feb 17, 2017

Hi to all of you and thank you for your help. For the password I usually copy/paste it, after verifying I was not able to log in getting the same message. Today when I wanted to open my database I got this [Unable to open the database. Wrong key or database file is corrupt.] After a couple of try I finally could log in. The same thing happened with KeepassX by the way. The whole experience make that tool not really reliable to me.

@phoerious
Copy link
Member

phoerious commented Feb 17, 2017

This really makes no sense and I suspect external reasons. The decryption process is deterministic, so given the same input (password and file), it always produces the same output (file can be decrypted or not).
Reasons I could think of are:

  • your hard drive is dying (watch for your SMART values, run a thorough disk check, try another hard drive)
  • your hard disk firmware is bogus (try saving the file to another drive)
  • your main memory has errors (run a memcheck, try switching RAM modules)
  • some other process is writing to the file (is it on some sort of shared drive?)
  • something else is wrong with your software configuration (try a different PC or operating system, or at least a virtual machine)
  • ...

@droidmonkey
Copy link
Member

I can't imagine this to be a program error. Have yoy tried making a brand new database file to see if you can replicate the issue?

@ghost ghost closed this as completed Feb 18, 2017
@phoerious
Copy link
Member

phoerious commented Feb 18, 2017

@Vegan-us Has your problem been solved? Would be nice to hear what the problem was.

@ghost
Copy link
Author

ghost commented Feb 18, 2017

@phoerious
Hi, I did not resolved any thing but everything seems to be in order.
I have created a couple of database to test the login along side my original database that I can open now with no trouble.
To resume: Dell Inspiron 15 5k series dual boot. (New)
I have migrate from portable keepass2 windows to Keepassxc ubuntu 16.04LTS via keepassx.
Through all that process I have created new database and imported database which occasionally open or not. At this moment I have two database, #1 now seems to be working, #2 won't open.
Sorry for not being technical this isn't my field. I thought that some users around would have had the same issue. But I believe that I must have a bad understanding of how the .kdbx works...
Thanks again for your help.

@phoerious
Copy link
Member

phoerious commented Feb 18, 2017

Alright, I'll keep this closed then.

@xker2001
Copy link

I met this problem too. Here were what i didi (kdbx file is in dropbox folder):

  1. open kdbx and add some new entries.
  2. adjust folder structure (create and move).
  3. save and quit.
  4. try to reopen the kdbx file after about 30m, failed.
  5. restore some old versions from dropbox, all can not open.
  6. create a new kdbx with the same password, works fine.
  7. update keypassxc from 2.1.4 to 2.2.4, still can not open those kdbxs.

Fortunately, I can find those passwords in mac os's keychain.

@phoerious
Copy link
Member

It's a corruption issue, that means the database becomes unusable. 2.2.4 fixed the reason why this happens, but it cannot make a previously corrupted database readable again.

@phoerious
Copy link
Member

BTW this more likely related to #1113

@xker2001
Copy link

@phoerious thanks for your reply~

@chernetskynick
Copy link

Just faced same issue, database corrupted and wont repair. Backup file looks to be corrupted too.

@chernetskynick
Copy link

thx god google drive keeps backup of each version, but keepassxc prove to be unreliable, not sure how to trust it any more after this incident.

@TheZ3ro
Copy link
Contributor

TheZ3ro commented Jan 22, 2018

@chernetskynick what version are you using? 2.2.4 is the latest stable release and it's fixed.
Also, backup files shouldn't be corrupted if they were correctly saved before this issue

@chernetskynick
Copy link

I just opened backup with version 2.2.2 and seems like it got corrupted as well. Now I can't open it with 2.2.2 neither with 2.2.4.

@phoerious
Copy link
Member

If it's corrupted, you won't be able to open it with any version. But 2.2.4 should have fixed the cause for corruption. If 2.2.4 still keeps corrupting your DB, it would be great if you could explain in detail how we can reproduce the problem.

@relin-qq
Copy link

relin-qq commented Feb 6, 2018

Hi, i have the same problem even on 2.2.4 (Linux).
I try my best to remember what I did:

  • Create db
  • Create folder "websites"
  • Create several entries for websites (all lower case titles)
  • Save
  • Create new folder "google"
  • Wrongly created as sub-folder of "websites"
  • Relocate to root
  • Drag & Drop google entries from "websites" to "google"
  • Create some more entries in "google"
  • Save
  • Create new folder "private" with dollar sign as inheritable symbol
  • Create new entries "amazon" etc.
  • Try to download favicon on each entry (failed on some entries without favicon)
  • Save
  • Six days later I can't open my database

I hope this helps.
Regards
Relin.

@renta
Copy link

renta commented Feb 9, 2018

Faced the same issue on MacOS on both KeePassX and KeePassXC. The database does not open. On ubuntu everything works fine. Double checked and copy-pasted my password from the editor.

@phoerious
Copy link
Member

If you can open your DB on Ubuntu it is highly unlikely that we have a KeePassXC bug here. The code is exactly the same for all platforms. Check you password encoding, check location and contents of your key files.

@jlaplante333
Copy link

Everyone I know gets this problem on Mac Os X, and so do I. Database opens perfectly on Windows.

Thanks,

Jon

@phoerious
Copy link
Member

Can you please try if it happens with a new database well? Also please try our 2.3 beta version.

@jlaplante333
Copy link

New databases are fine though, works great. It's just any existing Windows databases are always corrupt when I open them. I'm using powershell to back it up constantly because I'm pretty sure it will just become corrupt again.

@renta
Copy link

renta commented May 3, 2018

Have found out a reason for this strange behavior on MacOS. I have special signs in my password, so clicking on 6 with command key will give you sign ˆ with an underscore. If you will continue to type your password, it will be something like â sign. And if you will not type a letter after compose+6, but type left arrow key - it will be ˆ sign (that's why I had an issue). And only after typing a combination of compose+6 and break after I got a right sign ^. On Ubuntu keyboard works in another way. It produces ^ with shift+6 keys. So, be aware!

@o2themar
Copy link

I just downloaded KeepassXC on Mac OSX running macOS High Sierra version 10.13.4. I created a new database and setup both password and keyfile login. When I lock the db with no entires and try to login again using either my password or the keyfile I get the error message below. I have tried to create a new database multiple times and in the beginning I keep getting the same error message without adding any entries.

Error message:
Unable to open the database.
Wrong key or database file is corrupt.

@phoerious
Copy link
Member

You always need to use ALL keys you used for creating the database. When you create a database with password and key file, you need to use both to unlock it. Make sure the corresponding checkboxes are ticked on the unlock screen.

@o2themar
Copy link

@phoerious You are correct. It works! I thought the reason for having the two different authentication methods was to provide two different ways to unlock the database. I was coming from the original Keypass site and saw in their documentation that you can use one or the other to sign in. Maybe they were referring to what you were saying. Thank you for your help.

@edsu
Copy link

edsu commented Aug 9, 2018

I landed here with the same error. Somehow I had checked the Key File box at some point, and once I unchecked it I could open my database again. Whew!

@notand
Copy link

notand commented Nov 1, 2018

I had the same error. @phoerious Your hint about the "Key File" box helped. Thanks! To me, this is a GUI design issue. I thought that in the "Key File" field, I had to choose the KeePass file that I want to open (the file that contains all my keys - the ones I want to access). I was not aware that the master key / password may be provided using a "key file".
I am a user who needs to access passwords from keepass files that some other people in my organization provide. I do so only once in a while.

@droidmonkey
Copy link
Member

droidmonkey commented Nov 1, 2018

@notand looks like the GUI is still misleading you. The key file is not for storing your database password, it is part of the total "key" that is used to decrypt your database. Your database is encrypted using an additive combination of {Password} + {Key File Binary Data} + {Yubikey Challenge Response}. When you check the checkbox, it is telling KeePassXC to use that information to form the master key, even if it is blank.

@notand
Copy link

notand commented Nov 1, 2018

@phoerious Thanks for the info. In my case, all I need to know is that I must not check the "Key File" box, because my organization does not use this method. My point is that changing the GUI design would help many users out there who just want to access a password without understanding much about key formation. Just after I posted my comment, a colleague of mine told me about having had the same problem.

@droidmonkey
Copy link
Member

@notand opened #2445 to capture these issues. Feel free to comment there.

@notand
Copy link

notand commented Nov 1, 2018

@droidmonkey Great, thanks!

@alexmaragko
Copy link

I faced the same issues on version 2.4.1, and by not checking the "Key FIle" box, as @notand suggested, I was able to open the database.

@emmamones

This comment has been minimized.

@randythomas
Copy link

I encountered this same problem after doing a forced Mac Update. Is there a solution? I know I have the right password as I have been using the program for years now.

@droidmonkey
Copy link
Member

Please read the post. You need to uncheck everything except for the master password box.

@randythomas
Copy link

randythomas commented Sep 26, 2019 via email

@zahardev
Copy link

Thanks, you saved my life :)

@samandhare
Copy link

samandhare commented Aug 14, 2020

Please read the post. You need to uncheck everything except for the master password box.

Please read the post. You need to uncheck everything except for the master password box.

Please read the post. You need to uncheck everything except for the master password box.

ohhh great..! 👍 you saved my time.

@franziska-haaf
Copy link

I faced the same issues on version 2.4.1, and by not checking the "Key FIle" box, as @notand suggested, I was able to open the database.

This. It's still a thing end of 2021 even with being such an easy fix. Just bad usability :D

@michaelk83
Copy link

This has been fixed since 2.5.0, two years ago. Current version is 2.6.6.

@franziska-haaf
Copy link

This has been fixed since 2.5.0, two years ago. Current version is 2.6.6.

Ok wow, I have to talk to our Filewave-Admin then 😅 Sorry for the wrong accusation!

@dimjava
Copy link

dimjava commented May 13, 2022

Hi there from 2022, had the same problem twice already. First time it was fixed by itself after some time. Waiting what happens this time, but no way I'm using KeepassXC again.

Version 2.7.1, Mac OS 11.4

UPD. Problem fixed after the following: close all previously opened pages with databases, reopen the app, add databases one more time.

@me00001
Copy link

me00001 commented Aug 29, 2022

UPD. Problem fixed after the following: close all previously opened pages with databases, reopen the app, add databases one more time.

Same here
Version 2.7.1, Gentoo Linux

@michaelk83
Copy link

michaelk83 commented Aug 29, 2022

Same here
Version 2.7.1, Gentoo Linux

You guys should open a new issue with all the relevant details. It's not likely to be the same bug that was tracked by this issue.
Also, double-check that you're entering the password correctly. If you use a non-standard keyborad layout, there's a known issue in Qt that types some characters wrong when the password is hidden.

@droidmonkey
Copy link
Member

Please don't open a new issue, we cannot help you when your database is unopenable.

@keepassxreboot keepassxreboot locked and limited conversation to collaborators Aug 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests