https://wiki.mozilla.org/api.php?action=feedcontributions&user=Bdanforth&feedformat=atomMozillaWiki - User contributions [en]2024-03-28T22:48:12ZUser contributionsMediaWiki 1.27.4https://wiki.mozilla.org/index.php?title=Toolkit:Password_Manager/Debugging&diff=1231613Toolkit:Password Manager/Debugging2020-10-15T20:24:00Z<p>Bdanforth: Add a new reason for why logins are not autofilled. See https://bugzilla.mozilla.org/show_bug.cgi?id=786276 for more details.</p>
<hr />
<div>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.<br />
<br />
= Gathering Debug Logs =<br />
[https://drive.google.com/file/d/1P94qZvQc3FkLiwhrmEYTSweCGt09ef97/preview Follow the instructions in this video] or the written steps in both sections below.<br />
== Enable Debug Logging ==<br />
<br />
<ol><br />
<li>Enter "about:config" in the URL bar.</li><br />
<li>You may see a warning screen cautioning you about changing advanced preferences. Click the button to ignore the warning.</li><br />
<li><br />
Make sure '''''all''''' of the following prefs are set to 'true'. (Find a pref by entering its name in the "Filter" box at the top of the page. Toggle its value by either clicking the ⇌ (Toggle) icon or double-clicking the line.)<br />
<blockquote>signon.debug<br/>devtools.browserconsole.contentMessages<br/>devtools.browserconsole.filter.error<br/>devtools.browserconsole.filter.warn<br/>devtools.browserconsole.filter.info<br/>devtools.browserconsole.filter.log<br/>devtools.browserconsole.filter.debug<br/></blockquote><br />
</li><br />
<li>Restart Firefox</li><br />
</ol><br />
<br />
== View the Logging ==<br />
# To view the logging, open the [https://developer.mozilla.org/en-US/docs/Tools/Browser_Console '''Browser''' Console] and/or Browser Content Toolbox (for logs related to in-page stuff) from the Tools → Web Developer menu. If you don't see these, follow the instructions on the MDN page to enable it.<br />
#* '''Note that the above consoles are different than the Web Console that you use for regular web development.'''<br />
# Make sure the log level toggles ("Errors", "Warnings", "Logs", …, "Debug") are all enabled in the Browser Console. "CSS" should ideally be disabled.<br />
# Load the problematic web (or about:logins) page in in the browser. You should see messages in the Browser Console like:<br />
LoginManagerContent: onDOMFormHasPassword for <nowiki>https://www.google.com</nowiki><br />
LoginManager: Counting logins matching host: <nowiki>https://www.google.com</nowiki>, formSubmitURL: httpRealm: null<br />
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.<br />
<br />
To copy/save the logs, right-click in an open area of the console and choose "Export visible messages to" and choose "Clipboard" or "File" depending on which you prefer. Include them as an '''attachment''' on your bug report, not in the body of a comment.<br />
<br />
= Common Problems =<br />
<br />
== Won't auto-fill a saved password ==<br />
[https://support.mozilla.org/en-US/kb/usernames-and-passwords-are-not-saved SUMO article]<br />
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).<br />
* Logins are not auto-filled in '''Private Browsing''' windows. You should still be able to autocomplete the password from the autocomplete dropdown on the username field (if one exists).<br />
* Logins are not auto-filled on insecure <code>http:</code> documents. Make sure all ancestor frames are <code>https:</code><br />
* Logins are not auto-filled in sandboxed documents e.g. <code><iframe sandbox></code> or <code>Content-Security-Policy: sandbox;</code><br />
* If there are multiple username+password combinations 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.<br />
* If the page pre-fills a 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 a password if the username field value doesn't match the one saved.<br />
* The <code><form></code>'s <code>action</code> attribute is for a different origin than the <code>action</code> origin that the login was saved for.<br />
* The field is <code>disabled</code> or <code>readonly</code><br />
* The username or password doesn't fit within the <code>maxlength</code><br />
* The password field for the form has the <code>autocomplete</code> attribute with a value of <code>"new-password"</code><br />
* There are more than 5 password fields in the "form".<br />
* The login form is loaded into a subframe (e.g. an <code><iframe></code>), and it is cross-origin (i.e. not [https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy same-origin]) with the top level frame.<br />
<br />
== HTTP Authentication popup not filled in ==<br />
<br />
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:<br />
…<br />
LoginManagerPrompter: ===== promptAuth called =====<br />
LoginManager: Searching for logins matching host: "<nowiki>https://intranet.mozilla.org</nowiki>", formSubmitURL: null, httpRealm: Mozilla Corporation - LDAP Login<br />
LoginManager: Checking if logins to "<nowiki>https://intranet.mozilla.org</nowiki>" can be saved.<br />
LoginManagerPrompter: Login unchanged, no further action needed.<br />
…<br />
<br />
== Won't prompt to save a password ==<br />
Potential reasons for not getting a prompt to save:<br />
* The password is already saved. Check about:logins to see if it's already there<br />
* Make sure "Ask to save logins and passwords for websites." is check in about:preferences#privacy-logins<br />
* Make sure the website isn't in the "Exceptions…" list of about:preferences#privacy-logins<br />
* If you are in a private window, the prompt may be dismissed by default and not pop up automatically.</div>Bdanforthhttps://wiki.mozilla.org/index.php?title=Toolkit:Password_Manager/Debugging&diff=1228768Toolkit:Password Manager/Debugging2020-07-02T22:20:20Z<p>Bdanforth: /* Gathering Debug Logs */ s/this/the</p>
<hr />
<div>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.<br />
<br />
= Gathering Debug Logs =<br />
[https://drive.google.com/file/d/1P94qZvQc3FkLiwhrmEYTSweCGt09ef97/preview Follow the instructions in this video] or the written steps in both sections below.<br />
== Enable Debug Logging ==<br />
<br />
<ol><br />
<li>Enter "about:config" in the URL bar.</li><br />
<li>You may see a warning screen cautioning you about changing advanced preferences. Click the button to ignore the warning.</li><br />
<li><br />
Make sure '''''all''''' of the following prefs are set to 'true'. (Find a pref by entering its name in the "Filter" box at the top of the page. Toggle its value by either clicking the ⇌ (Toggle) icon or double-clicking the line.)<br />
<blockquote>signon.debug<br/>devtools.browserconsole.contentMessages<br/>devtools.browserconsole.filter.error<br/>devtools.browserconsole.filter.warn<br/>devtools.browserconsole.filter.info<br/>devtools.browserconsole.filter.log<br/>devtools.browserconsole.filter.debug<br/></blockquote><br />
</li><br />
<li>Restart Firefox</li><br />
</ol><br />
<br />
== View the Logging ==<br />
# To view the logging, open the [https://developer.mozilla.org/en-US/docs/Tools/Browser_Console '''Browser''' Console] and/or Browser Content Toolbox (for logs related to in-page stuff) from the Tools → Web Developer menu. If you don't see these, follow the instructions on the MDN page to enable it.<br />
#* '''Note that the above consoles are different than the Web Console that you use for regular web development.'''<br />
# Make sure the log level toggles ("Errors", "Warnings", "Logs", …, "Debug") are all enabled in the Browser Console. "CSS" should ideally be disabled.<br />
# Load the problematic web (or about:logins) page in in the browser. You should see messages in the Browser Console like:<br />
LoginManagerContent: onDOMFormHasPassword for <nowiki>https://www.google.com</nowiki><br />
LoginManager: Counting logins matching host: <nowiki>https://www.google.com</nowiki>, formSubmitURL: httpRealm: null<br />
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.<br />
<br />
To copy/save the logs, right-click in an open area of the console and choose "Export visible messages to" and choose "Clipboard" or "File" depending on which you prefer. Include them as an '''attachment''' on your bug report, not in the body of a comment.<br />
<br />
= Common Problems =<br />
<br />
== Won't auto-fill a saved password ==<br />
[https://support.mozilla.org/en-US/kb/usernames-and-passwords-are-not-saved SUMO article]<br />
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).<br />
* Logins are not auto-filled in '''Private Browsing''' windows. You should still be able to autocomplete the password from the autocomplete dropdown on the username field (if one exists).<br />
* Logins are not auto-filled on insecure <code>http:</code> documents. Make sure all ancestor frames are <code>https:</code><br />
* Logins are not auto-filled in sandboxed documents e.g. <code><iframe sandbox></code> or <code>Content-Security-Policy: sandbox;</code><br />
* If there are multiple username+password combinations 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.<br />
* If the page pre-fills a 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 a password if the username field value doesn't match the one saved.<br />
* The <code><form></code>'s <code>action</code> attribute is for a different origin than the <code>action</code> origin that the login was saved for.<br />
* The field is <code>disabled</code> or <code>readonly</code><br />
* The username or password doesn't fit within the <code>maxlength</code><br />
* The password field for the form has the <code>autocomplete</code> attribute with a value of <code>"new-password"</code><br />
<br />
== HTTP Authentication popup not filled in ==<br />
<br />
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:<br />
…<br />
LoginManagerPrompter: ===== promptAuth called =====<br />
LoginManager: Searching for logins matching host: "<nowiki>https://intranet.mozilla.org</nowiki>", formSubmitURL: null, httpRealm: Mozilla Corporation - LDAP Login<br />
LoginManager: Checking if logins to "<nowiki>https://intranet.mozilla.org</nowiki>" can be saved.<br />
LoginManagerPrompter: Login unchanged, no further action needed.<br />
…<br />
<br />
== Won't prompt to save a password ==<br />
Potential reasons for not getting a prompt to save:<br />
* The password is already saved. Check about:logins to see if it's already there<br />
* Make sure "Ask to save logins and passwords for websites." is check in about:preferences#privacy-logins<br />
* Make sure the website isn't in the "Exceptions…" list of about:preferences#privacy-logins<br />
* If you are in a private window, the prompt may be dismissed by default and not pop up automatically.</div>Bdanforthhttps://wiki.mozilla.org/index.php?title=Toolkit:Password_Manager/Debugging&diff=1227479Toolkit:Password Manager/Debugging2020-05-22T16:57:09Z<p>Bdanforth: /* Won't auto-fill a saved password */ : After triaging bug 1633271 (see comment #13), we noticed this reason was not listed in our wiki page.</p>
<hr />
<div>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.<br />
<br />
= Enable Debug Logging =<br />
<br />
<ol><br />
<li>Enter "about:config" in the URL bar.</li><br />
<li>You may see a warning screen cautioning you about changing advanced preferences. Click the button to ignore the warning.</li><br />
<li><br />
Make sure '''''all''''' of the following prefs are set to 'true'. (Find a pref by entering its name in the "Filter" box at the top of the page. Toggle its value by either clicking the ⇌ (Toggle) icon or double-clicking the line.)<br />
<blockquote>signon.debug<br/>devtools.browserconsole.contentMessages<br/>devtools.browserconsole.filter.error<br/>devtools.browserconsole.filter.warn<br/>devtools.browserconsole.filter.info<br/>devtools.browserconsole.filter.log<br/>devtools.browserconsole.filter.debug<br/></blockquote><br />
</li><br />
<li>Restart Firefox</li><br />
</ol><br />
<br />
= View the Logging =<br />
# To view the logging, open the [https://developer.mozilla.org/en-US/docs/Tools/Browser_Console '''Browser''' Console] and/or Browser Content Toolbox (for logs related to in-page stuff) from the Tools → Web Developer menu. If you don't see these, follow the instructions on the MDN page to enable it.<br />
#* '''Note that the above consoles are different than the Web Console that you use for regular web development.'''<br />
# Make sure the log level toggles ("Errors", "Warnings", "Logs", …, "Debug") are all enabled in the Browser Console. "CSS" should ideally be disabled.<br />
# Load the problematic web (or about:logins) page in in the browser. You should see messages in the Browser Console like:<br />
LoginManagerContent: onDOMFormHasPassword for <nowiki>https://www.google.com</nowiki><br />
LoginManager: Counting logins matching host: <nowiki>https://www.google.com</nowiki>, formSubmitURL: httpRealm: null<br />
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.<br />
<br />
To copy/save the logs, right-click in an open area of the console and choose "Export visible messages to" and choose "Clipboard" or "File" depending on which you prefer. Include them as an '''attachment''' on your bug report, not in the body of a comment.<br />
<br />
= Common Problems =<br />
<br />
== Won't auto-fill a saved password ==<br />
[https://support.mozilla.org/en-US/kb/usernames-and-passwords-are-not-saved SUMO article]<br />
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).<br />
* Logins are not auto-filled in '''Private Browsing''' windows. You should still be able to autocomplete the password from the autocomplete dropdown on the username field (if one exists).<br />
* Logins are not auto-filled on insecure <code>http:</code> documents. Make sure all ancestor frames are <code>https:</code><br />
* Logins are not auto-filled in sandboxed documents e.g. <code><iframe sandbox></code> or <code>Content-Security-Policy: sandbox;</code><br />
* If there are multiple username+password combinations 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.<br />
* If the page pre-fills a 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 a password if the username field value doesn't match the one saved.<br />
* The <code><form></code>'s <code>action</code> attribute is for a different origin than the <code>action</code> origin that the login was saved for.<br />
* The field is <code>disabled</code> or <code>readonly</code><br />
* The username or password doesn't fit within the <code>maxlength</code><br />
* The password field for the form has the <code>autocomplete</code> attribute with a value of <code>"new-password"</code><br />
<br />
== HTTP Authentication popup not filled in ==<br />
<br />
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:<br />
…<br />
LoginManagerPrompter: ===== promptAuth called =====<br />
LoginManager: Searching for logins matching host: "<nowiki>https://intranet.mozilla.org</nowiki>", formSubmitURL: null, httpRealm: Mozilla Corporation - LDAP Login<br />
LoginManager: Checking if logins to "<nowiki>https://intranet.mozilla.org</nowiki>" can be saved.<br />
LoginManagerPrompter: Login unchanged, no further action needed.<br />
…<br />
<br />
== Won't prompt to save a password ==<br />
Potential reasons for not getting a prompt to save:<br />
* The password is already saved. Check about:logins to see if it's already there<br />
* Make sure "Ask to save logins and passwords for websites." is check in about:preferences#privacy-logins<br />
* Make sure the website isn't in the "Exceptions…" list of about:preferences#privacy-logins<br />
* If you are in a private window, the prompt may be dismissed by default and not pop up automatically.</div>Bdanforth