Toolkit:Password Manager/Debugging: Difference between revisions
(→View the Logging: Update for new format) |
(→Won't auto-fill a saved password: Update logging) |
||
Line 20: | Line 20: | ||
== Won't auto-fill a saved password == | == Won't auto-fill a saved password == | ||
Note that '''auto-fill''' refers to the field being filled automatically whereas '''autocomplete''' refers to completing the field value based on what you have typed so far (usually via the autocomplete dropdown). | Note that '''auto-fill''' refers to the field being filled automatically whereas '''autocomplete''' refers to completing the field value based on what you have typed so far (usually via the autocomplete dropdown). | ||
* Some sites use <code>autocomplete="off"</code> in their HTML, which directs the password manager not to autofill/autocomplete the login on page load. You can look for this in the page's HTML, or by using the password manager logging. You may still be able to autofill the password using the autocomplete dropdown on the username field (if one exists). Here's some example output: | * Some sites use <code>autocomplete="off"</code> in their HTML, which directs the password manager not to autofill/autocomplete the login on page load. You can look for this in the page's HTML, or by using the password manager logging. You may still be able to autofill the password using the autocomplete dropdown on the username field (if one exists). As of Firefox 38, the <code>autocomplete="off"</code> has no effect on login fields. Here's some example output: | ||
… | … | ||
Login storage: _findLogins: returning 1 logins | |||
LoginManagerContent: found 1 matching logins. | |||
LoginManagerContent: form not filled, has autocomplete=off | |||
LoginManagerContent: autocomplete=off but form can be filled; notified observers | |||
… | … | ||
* Passwords are not auto-filled in '''Private Browsing''' mode. You should still be able to autocomplete the password from the autocomplete dropdown on the username field (if one exists). | * Passwords are not auto-filled in '''Private Browsing''' mode. You should still be able to autocomplete the password from the autocomplete dropdown on the username field (if one exists). | ||
* If there are multiple username+password combos saved for a domain and the username field wasn't pre-filled by the website, Firefox won't know which username/password to use and thus won't auto-fill. Use the autocomplete dropdown to choose the username you would like to use. | * If there are multiple username+password combos saved for a domain and the username field wasn't pre-filled by the website, Firefox won't know which username/password to use and thus won't auto-fill. Use the autocomplete dropdown to choose the username you would like to use. | ||
* If the page pre-fills the username field e.g. using your session | * If the page pre-fills the username field (e.g. using your session/local cookies or with a value attribute used as an old hack for placeholder text), Firefox won't fill in the password since the username field value doesn't match the one saved. | ||
== HTTP Authentication popup not filled in == | == HTTP Authentication popup not filled in == |
Revision as of 05:12, 8 June 2015
The password manager in Firefox includes the ability to log debugging information to the Browser Console, which can be enabled to help diagnose problems. This logging is off by default. Passwords are not shown in the output.
Enable Debug Logging
- Enter "about:config" in the URL bar.
- You may see a warning screen, cautioning you about changing advanced preferences. Click the button to ignore the warning.
- Find the
signon.debug
andjavascript.options.showInConsole
settings, and set them totrue
(the latter may already betrue
). You can enter the name in the "Filter" box at the top of the page to help find them. To change the value of a setting, right-click on the line and select "Toggle" or just double-click the line.
View the Logging
- To view the logging, open the Browser Console from the Tools → Web Developer menu.
- Make sure the "JS" logging options are all enabled in the Browser Console.
- Load a web page in in the browser. You should see messages in the Browser Console like:
LoginManagerContent: onDOMFormHasPassword for https://www.google.com nsLoginManager: Counting logins matching host: https://www.google.com, formSubmitURL: httpRealm: null
All password manager logging contains the string "login" in the prefix so you can type the word "login" in the "Filter output" box of the Browser Console to filter out other content. To copy messages, select the text and copy the usual way e.g. choose Copy from the context menu.
Common Problems
Won't auto-fill a saved password
Note that auto-fill refers to the field being filled automatically whereas autocomplete refers to completing the field value based on what you have typed so far (usually via the autocomplete dropdown).
- Some sites use
autocomplete="off"
in their HTML, which directs the password manager not to autofill/autocomplete the login on page load. You can look for this in the page's HTML, or by using the password manager logging. You may still be able to autofill the password using the autocomplete dropdown on the username field (if one exists). As of Firefox 38, theautocomplete="off"
has no effect on login fields. Here's some example output:
… Login storage: _findLogins: returning 1 logins LoginManagerContent: found 1 matching logins. LoginManagerContent: form not filled, has autocomplete=off LoginManagerContent: autocomplete=off but form can be filled; notified observers …
- Passwords are not auto-filled in Private Browsing mode. You should still be able to autocomplete the password from the autocomplete dropdown on the username field (if one exists).
- If there are multiple username+password combos saved for a domain and the username field wasn't pre-filled by the website, Firefox won't know which username/password to use and thus won't auto-fill. Use the autocomplete dropdown to choose the username you would like to use.
- If the page pre-fills the username field (e.g. using your session/local cookies or with a value attribute used as an old hack for placeholder text), Firefox won't fill in the password since the username field value doesn't match the one saved.
HTTP Authentication popup not filled in
This is often due to the HTTP "Realm" being different from the stored login. The values the password manager is checking can be seen in the logging. Here's some example output from a successful sign in:
… Pwmgr Prompter: ===== promptAuth called ===== Login Manager: Searching for logins matching host: https://intranet.mozilla.org, formSubmitURL: null, httpRealm: Mozilla Corporation - LDAP Login Login Manager: Checking if logins to https://intranet.mozilla.org can be saved. Pwmgr Prompter: Login unchanged, no further action needed. …