Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Unable to get my saves login (Corrupt logins file)

more options

I recently installed my OS and backup the entire profile folder of Firefox. When I put the key4 and logins file in to the fresh install there was only one password in it, the remaining passwords were gone. I also noticed that a new file (logins.json.corrupt) is created along with file(logins.json). I tried to paste the files again to fix it but same issue. I think the files are corrupt. Is there any way to fix it?

All Replies (20)

more options

A logins.json.corrupt is only created if there is a problem with logins.json.

Does logins.json looks like a valid JSON file if you open this file in a Firefox tab to inspect it with the builtin JSON viewer or are there errors reported ?

Do you possibly have a logins-backup.json in that backup that can be used in case of issues with logins.json ?

Helpful?

more options

Yes! There is a file named (logins-backup.json), But I don't know what to do with it. I tried to rename it logins.json but it didn't work. I am an old Firefox user and this is the first time I am facing this issue.

Helpful?

more options

Using the backup should work if you copy logins-backup.json to replace logins.json in the main profile folder. Make sure to keep a copy of all the involved key and logins files.

Are you sure that the key4.db and logins.json match because that is mandatory to be able to decrypt the logins ?

The presence of logins.json.corrupt might also point to a problem with the key4.db file.

You can temporarily set signon.debug = true on the about:config page and check the Browser Console for messages about processing the logins file.

Helpful?

more options

I did what you told me and it just rename the file (logins.json) to logins.json.corupt. It's not working and now I am starting to feel worried because it contains more than 150 logins. Please help me :(

Helpful?

more options

You should do the opposite and rename logins.json.corrupt to logins.json and possibly set signon.debug = true beforehand. When there is a problem with logins.json then Firefox can rename logins.json to logins.json.corrupt.

Helpful?

more options

Still no luck. It always change it to login.json.corrupt, Is there anyway to crack open the logins.json file?

Helpful?

more options

Did you try to open the logins.json file in Firefox to check the file in the JSON viewer to see if there is a problem ?

Helpful?

more options

I was waiting for your reply. This is the error I get when open logins.json file in the Firefox "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"

Parse error on line 1: ?�? ��i[�ʲ0?� ^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'

Got this error from online json viewer

Modified by Muhammad Hamza Umar

Helpful?

more options

That error message means that the file isn't valid JSON and can't be used.

Are there null bytes in the file ?

The logins.json file should be a plain text file that starts with: {"nextId":xxx,"logins":[{

Helpful?

more options

But It does get one password, why only one? Can you please suggest me better password manager to avoid this problem is the future? I mean a password manager which can backup data real time on the cloud. I thought the json file is encrypted so how it can be a plain text file.

Modified by Muhammad Hamza Umar

Helpful?

more options

That file is broken and is of no use. Maybe give it another try to extract the file(s) from the backup.

You can compare this with the new logins.json file that Firefox generates.

Helpful?

more options

How I can compare it? json file is encrypted. Is there any tool to open them?

Helpful?

more options

The logins.json file as such isn't encrypted, only the username and password key/value pairs are encrypted and can only be decrypted by Firefox if you have a matching key file (key4.db) that stores the encryption key. The logins.json is a plain text file and even the encrypted username and password values are plain text ASCII characters as you should see if you inspect a working logins.json.

Your reply shows binary data for logins.json and that means that the file is corrupted and doesn't contain useful data. Only a good logins.json together with its key file (key4.db) can decrypt the logins.

Helpful?

more options

It means I lost all of my password :( What's the better alternative for password manager?

Helpful?

more options

I don't know what happened but the logins-backup.json is converted to some random sh*t. Please see the attach and tell me why this happened?

Helpful?

more options

Still waiting for response!

Helpful?

more options

Did you previously inspect thislogins-backup.json file in Firefox or in a text editor ?

Are other files in your backup also corrupted ?

For text files you can easily check this in a text editor.

Helpful?

more options

I test these files on both (Notepad & Firefox). You can check the notepad view in attached. Surprisingly when I open the logins.json.corrupt file in the firefox it showed me the pic of some dude, check the attached images. What is this encryption anyway and how did it happened?

Modified by Muhammad Hamza Umar

Helpful?

more options

The first screenshot (logins.json.corrupt) shows content that look like a PNG image file and the second screenshot appears to confirm this. The third screenshot with the logins-backup.json file shows binary data as well, so neither of these are JSON files and aren't of any use.

I don't know where you got these logins files and why they aren't text files what they should be.

Was Firefox with that profile working properly when you created the backup or were there problems in Windows that caused you to reinstall Windows ?

Helpful?

more options

It was working fine before. I just bought a new SSD and did a fresh install. I still have that old SSD with old OS and software's along with the Firefox and profile folder of it but it's not working now. What could cause this? There is no virus in that SSD I just scanned it. The old SSD has 48% health and I got the warning to replace it.

Modified by Muhammad Hamza Umar

Helpful?

  1. 1
  2. 2
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.