Toolkit:Password Manager/Debugging: Difference between revisions

Update for @autocomplete=off changes and Browser Console
(Browser Console and a pref now true)
(Update for @autocomplete=off changes and Browser Console)
Line 1: Line 1:
The password manager in Firefox 3 includes the ability to log debugging information to the Error Console, which can be enabled to help diagnose problems. This logging is off by default. Passwords are not shown in the output.
The password manager in Firefox includes the ability to log debugging information to the [https://developer.mozilla.org/en-US/docs/Tools/Browser_Console 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 =
= Enable Debug Logging =
Line 9: Line 9:


= View the Logging =
= View the Logging =
# To view the logging, open the Error Console from the Tools menu (in Nightly after May 2013, Browser Console from the Tools → Web Developer menu).
# To view the logging, open the [https://developer.mozilla.org/en-US/docs/Tools/Browser_Console Browser Console] from the Tools → Web Developer menu.
# Click either the "All" or "Messages" icons at the top of the window.
# 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 Error Console like:
# Load a web page in in the browser. You should see messages in the Browser Console like:
  Login Manager: onStateChange accepted: req = <nowiki>http://www.google.com</nowiki>, flags = 196612
  Login Manager (content): onFormPassword for <nowiki>https://www.google.com</nowiki>
Login Manager: onStateChange: adding dom listeners
  Login Manager: Counting logins matching host: <nowiki>https://www.google.com</nowiki>, formSubmitURL: httpRealm: null
Login Manager: domEventListener: got event DOMContentLoaded
To copy messages, select the text and copy the usual way e.g. choose Copy from the context menu.
  Login Manager: Counting logins matching host: http://www.google.com, formSubmitURL: , httpRealm: null
To copy a message, right-click on it and select Copy.


= Common Problems =
= Common Problems =


== Won't prompt to save a password ==
== Won't auto-fill a saved password ==


Some sites use <code>autocomplete="off"</code> in their HTML, which directs the password manager not to save the login. You can look for this in the page's HTML, or by using the password manager logging. Here's some example output from signing into Yahoo Mail:
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 autocomplete the password from the autocomplete dropdown on the username field (if one exists). Here's some example output:


  ...
 
  Login Manager: observer notified for form submission.
  PwMgr mozStorage: _findLogins: returning 1 logins
  Login Manager: Checking if logins to <nowiki>https://login.yahoo.com</nowiki> can be saved.
  Login Manager (content): found 1 matching logins.
  Login Manager: (form submission ignored -- autocomplete=off found)
  Login Manager (content): form not filled, has autocomplete=off
  ...
Login Manager (content): autocomplete=off but form can be filled; notified observers
 


== HTTP Authentication popup not filled in ==
== 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:
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 =====
  Pwmgr Prompter: ===== promptAuth called =====
  Login Manager: Searching for logins matching host: <nowiki>https://intranet.mozilla.org</nowiki>, formSubmitURL: null, httpRealm: Mozilla Corporation - LDAP Login
  Login Manager: Searching for logins matching host: <nowiki>https://intranet.mozilla.org</nowiki>, formSubmitURL: null, httpRealm: Mozilla Corporation - LDAP Login
  Login Manager: Checking if logins to <nowiki>https://intranet.mozilla.org</nowiki> can be saved.
  Login Manager: Checking if logins to <nowiki>https://intranet.mozilla.org</nowiki> can be saved.
  Pwmgr Prompter: Login unchanged, no further action needed.
  Pwmgr Prompter: Login unchanged, no further action needed.
  ...
 
Confirmed users
933

edits