搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How can i fix corrupted logins.json file ?

  • 4 回覆
  • 10 有這個問題
  • 3 次檢視
  • 最近回覆由 cor-el

more options

Hello. My computer had crashed. So i installed another windows on crashed C drive

Later i copied my entire profile folder to another drive and reinstalled windows clean

Now i copied back my entire firefox folder

Everything works however firefox can't see any passwords. It creates are file logins.json.corrupt

When i check file with notepad++ i can see saved password sites etc.

So maybe only small part of it is corrupted however i don't know how to fix

How can i fix it ? It is extremely important for me

At least save the working part of the file

Hello. My computer had crashed. So i installed another windows on crashed C drive Later i copied my entire profile folder to another drive and reinstalled windows clean Now i copied back my entire firefox folder Everything works however firefox can't see any passwords. It creates are file logins.json.corrupt When i check file with notepad++ i can see saved password sites etc. So maybe only small part of it is corrupted however i don't know how to fix How can i fix it ? It is extremely important for me At least save the working part of the file

所有回覆 (4)

more options

Firefox 32 and later builds store the passwords in the logins.json file in the profile folder and no longer use the signons.sqlite file. You can force Firefox to reimport the passwords from the signons.sqlite file. • reset the signon.importedFromSqlite pref on the about:config page to the default value via the right-click context menu • delete the logins.json file in the Firefox profile folder with Firefox closed

When you restart Firefox then you should have the signon.importedFromSqlite pref with the value set to true and you should have the passwords imported in the Password Manager unless there may have been errors.

You can use this button to go to the currently used Firefox profile folder: Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)

more options

The file is in object format.

You can try to open the file in the Scratchpad (Firefox/Tools > Web Developer) and click the "Pretty Print" button to format the file for easy reading. It basically consists of two sections: logins and disabledHosts (never remember). You would have to check the file for anomalies. Note that the encrypted names and passwords can only be decrypted if you have the correct key3.db file.


{
  'nextId': xxx,
  'logins': [
    {
     'id': xx,
    },
    {
     'id': xx,
    }
  ],
  'disabledHosts': [
  ],
  'version': 1
}
more options

It fails to open file. Nothing displayed. I copy pasted from notepad++ however it shows weird characters and at the end i see these

Exception: Unterminated string constant (1:49146)

more options

Sounds that the file is corrupted.

Do you have an older copy of the signons.sqlite file that you could possibly use to rebuild the logins.json file (you will lose passwords created with the logins.json file)?

Is there binary data present in the file suggesting a problem with the cluster chain? Did you run the chkdsk.exe program in a cmd.exe window?

You can try to compare the last part with a working logins.json file to see if you can find out what to need to add to fix that last part and remove the last incomplete password record within {} and add closing brackets }]}.