Closed Bug 432477 Opened 18 years ago Closed 15 years ago

'Can't add a login with both a httpRealm and formSubmitURL.'

Categories

(Firefox :: Extension Compatibility, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Milan1987, Unassigned)

Details

(Whiteboard: [CLOSEME 2010-11-15])

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008050606 Minefield/3.0pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008050606 Minefield/3.0pre When trying to store a username and password in the Password Manager. The following error is being pushed; Error: 'Can't add a login with both a httpRealm and formSubmitURL.' when calling method: [nsILoginManager::addLogin] = NS_ERROR_XPC_JS_THREW_STRING. Followed by the path of my extension Reproducible: Always Steps to Reproduce: 1. 2. 3. Expected Results: Stored the username and password
The code looks like the following (partial) var passwordManager = Components.classes["@mozilla.org/login-manager;1"].getService(Components.interfaces.nsILoginManager); var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1", Components.interfaces.nsILoginInfo, "init"); var logins = passwordManager.findLogins({}, 'chrome://API.Lilium', 'User Registration', null); for (var i = 0; i < logins.length; i++) { if (logins[i].username == logins[0].username) { passwordManager.removeLogin(logins[0]); break; } } var extLoginInfo = new nsLoginInfo('chrome://API.Lilium', 'User Registration', "", document.getElementById("username").value, document.getElementById("password").value, "", ""); passwordManager.addLogin(extLoginInfo); }
This bug was reported using Firefox 3.0 or older, which is no longer supported. The bug has also not been changed in over 500 days and is still in UNCO. Reporter, please retest this bug in Firefox 3.6.10 or later using a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles. If you still see this problem, please update the bug. If you no longer see the bug, please set the resolution to RESOLVED, WORKSFORME. This is a mass search of unconfirmed bugs that have no activity on them, so if you feel a bug was marked in error, just remove the CLOSEME comment in the whiteboard within the next month.
Whiteboard: [CLOSEME 2010-11-15]
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.