WebSiteAdvantage.KeePass.Firefox
WebSiteAdvantage.KeePass.Firefox copied to clipboard
Importing can fail with newer versions of Firefox
Firefox 58 (released 1/23/2018) changed the way that the master password is validated with a user's Firefox profile. Previously, the password was validated using the key3.db
file (Berkeley db format). Now the master password is validated using the key4.db
file (sqlite format).
This Firefox to KeePass Importer fails with the following error message if it cannot find a key3.db file for validating the master password:
Message: Import Failed
Program: Importer
Version: 2.28
Assembly Version: 2.28.0.0
Processor: 64bit
Processor Architecture: MSIL
Exception
Failed to initialise profile for login at C:\Users\xxxx\AppData\Roaming\Mozilla\Firefox\Profiles\qjalyco0.default reason (-8174)
Source: WebSiteAdvantageKeePassFirefox
at WebSiteAdvantage.KeePass.Firefox.FirefoxProfile.Login(String password)
at WebSiteAdvantageKeePassFirefoxImporter.FirefoxFormatImporter.Import(PwDatabase pwStorage, Stream sInput, IStatusLogger slLogger)
A quick work-around is to define an environment variable NSS_DEFAULT_DB_TYPE=sql
, then restart KeePass and run the importer again. (Environment variables are entered in Windows under Control Panel -> System -> Advanced system settings -> Advanced tab -> Environment Variables...
) With this variable defined, the importer will validate the master password using the key4.db file.
It probably would be good to delete the environment variable once you have finished using the importer.
Similar problems on Windows 7 64bit with FF 64.0.2, even with NSS_DEFAULT_DB_TYPE=sql
Message: Import Failed Program: Importer Version: 2.28 Assembly Version: 2.28.0.0 Processor: 64bit Processor Architecture: MSIL
Exception Failed to initialise profile for login at C:\Users\MeinolfA\AppData\Roaming\Mozilla\Firefox\Profiles\jzoxp7g8.default reason (-8174) Source: WebSiteAdvantageKeePassFirefox bei WebSiteAdvantage.KeePass.Firefox.FirefoxProfile.Login(String password) bei WebSiteAdvantageKeePassFirefoxImporter.FirefoxFormatImporter.Import(PwDatabase pwStorage, Stream sInput, IStatusLogger slLogger)
Used this to export my Firefox Passwords on Linux using WINE:
- Open terminal in extracted KeePass Firefox Converter directory
- Run
ln -s ~/.mozilla/firefox ~/Firefox-Profiles
to add a non-hidden symlink to your profile directory in your home directory (or you won't be able to navigate to your profile directory using the file chooser) - Run
env NSS_DEFAULT_DB_TYPE=sql wine WebSiteAdvantageKeePassFirefoxConverter.exe
- Select the Firefox profile using Load more profiles… → No → / → home → Username → Firefox-Profiles → Profile-Name → OK
- Select the added profile as current profile using the drop-down button next to the Load more profiles… button
- Optionally check Get Titles from Websites
- Click Start and select save path
- Profit
Thanks!
Thanks for your help. I tried similar different approaches an Windows 7 defining environmental variables:
NSS_DEFAULT_DB_TYPE=sql and NSS_DEFAULT_DB_TYPE=sql c:\Program Files (x86)\KeePass Password Safe 2\Plugins\WebSiteAdvantageKeePassFirefoxConverter.exe and NSS_DEFAULT_DB_TYPE=sql c:\PROGRA~2\KEEPAS~1\Plugins\WEBSIT~1.EXE
all with the following error:
Message: Converting Failed Program: Convertor Version: 2.28 Assembly Version: 2.28.0.0 Processor: 64bit Processor Architecture: MSIL
Exception Failed to find WebSiteAdvantageKeePassFirefox-Gecko\NSS64\mozcrt19.dll Please re-check the installation process Source: WebSiteAdvantageKeePassFirefox bei WebSiteAdvantage.KeePass.Firefox.Gecko.NSS64.NSS3.LoadDependencies() bei WebSiteAdvantage.KeePass.Firefox.Gecko.NSS3.NSS_Init(String profilePath) bei WebSiteAdvantage.KeePass.Firefox.FirefoxProfile.Login(String password) bei WebSiteAdvantage.KeePass.FireFoxConverter.Form1.GenerateUsingFirefox()
Why does the program try to use the gecko variant and not the SQlite one, have a look at the path above??
I installed Firefox-KeePass-Importer-2-28.zip to c:\Program Files (x86)\KeePass Password Safe 2\Plugins\
Any idea or tip?
I cant find any good instructions on how to switch to using key4.db. The key3.db code uses Gecko/NSS to get the key (using the master password) to decrypt the password data which is in SQLite.
One solution is to switch off the master password temporarily.
Thanks for the tip. Meanwhile I found https://github.com/kspearrin/ff-password-exporter working well with the new DB format an passwords.
Thank's. I'll reference to that tool as well.