If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Failed to save data to the login manager: "newLogin is not defined" when using macos-keychain@fitzell.ca.xpi addon

RESOLVED FIXED

Status

()

Core
FxAccounts
RESOLVED FIXED
3 years ago
11 months ago

People

(Reporter: markh, Unassigned)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

From a log in bug 1112962:

> 1418516708738	FirefoxAccounts	DEBUG	setSignedInUser - aborting any existing flows
> 1418516708774	FirefoxAccounts	ERROR	Failed to save data to the login manager: [Exception... "[JavaScript Error: "newLogin is not defined" {file: "jar:file:///Users/Nolski/Library/Application%20Support/Firefox/Profiles/ziowhbw7.dev-edition-default/extensions/macos-keychain@fitzell.ca.xpi!/components/MacOSKeychainStorage.js" line: 179}]'[JavaScript Error: "newLogin is not defined" {file: "jar:file:///Users/Nolski/Library/Application%20Support/Firefox/Profiles/ziowhbw7.dev-edition-default/extensions/macos-keychain@fitzell.ca.xpi!/components/MacOSKeychainStorage.js" line: 179}]' when calling method: [nsILoginManagerStorage::modifyLogin]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/components/nsLoginManager.js :: LoginManager.prototype.modifyLogin :: line 284"  data: yes] Stack trace: LoginManager.prototype.modifyLogin()@resource://gre/components/nsLoginManager.js:284 < LoginManagerStorage.prototype.set<()@resource://gre/modules/FxAccounts.jsm:1023 < next()@self-hosted:583 < TaskImpl_run()@resource://gre/modules/Task.jsm:314 < Handler.prototype.process()@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:870 < this.PromiseWalker.walkerLoop()@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:749 < this.PromiseWalker.scheduleWalkerLoop/<()@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:691 < <file:unknown>
> 1418516708774	FirefoxAccounts	DEBUG	Notifying observers of fxaccounts:onlogin

This is coming via FxAccounts.jsm:

>      let existingLogins = Services.logins.findLogins({}, FXA_PWDMGR_HOST, null,
>                                                      FXA_PWDMGR_REALM);
>      if (existingLogins.length) {
>        Services.logins.modifyLogin(existingLogins[0], login);

So for some reason findLogins seems to be returning an array with length at least 1, but element 0 is undefined.  Looking through the login manager code, this should be impossible (eg, if decryption of the record fails it's not returned).  Or the addon has some bug - hard to tell.
(Reporter)

Comment 1

3 years ago
From the same log:

> 1418516711939	Sync.Engine.Passwords	WARN	Error creating record: [Exception... "[JavaScript Error: "Not yet implemented: searchLogins()" {file: "jar:file:///Users/Nolski/Library/Application%20Support/Firefox/Profiles/ziowhbw7.dev-edition-default/extensions/macos-keychain@fitzell.ca.xpi!/components/MacOSKeychainStorage.js" line: 406}]'[JavaScript Error: "Not yet implemented: searchLogins()" {file: "jar:file:///Users/Nolski/Library/Application%20Support/Firefox/Profiles/ziowhbw7.dev-edition-default/extensions/macos-keychain@fitzell.ca.xpi!/components/MacOSKeychainStorage.js" line: 406}]' when calling method: [nsILoginManagerStorage::searchLogins]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/components/nsLoginManager.js :: LoginManager.prototype.searchLogins :: line 354"  data: yes] Stack trace: LoginManager.prototype.searchLogins()@resource://gre/components/nsLoginManager.js:354 < PasswordStore.prototype._getLoginFromGUID()@resource://gre/modules/services-sync/engines/passwords.js:127 < PasswordStore.prototype.createRecord()@resource://gre/modules/services-sync/engines/passwords.js:182 < SyncEngine.prototype._createRecord()@resource://services-sync/engines.js:831 < SyncEngine.prototype._uploadOutgoing()@resource://services-sync/engines.js:1428 < SyncEngine.prototype._sync()@resource://services-sync/engines.js:1499 < WrappedNotify()@resource://services-sync/util.js:148 < Engine.prototype.sync()@resource://services-sync/engines.js:657 < _syncEngine()@resource://services-sync/stages/enginesync.js:199 < sync()@resource://services-sync/stages/enginesync.js:149 < onNotify()@resource://gre/modules/services-sync/service.js:1275 < WrappedNotify()@resource://services-sync/util.js:148 < WrappedLock()@resource://services-sync/util.js:103 < _lockedSync()@resource://gre/modules/services-sync/service.js:1265 < sync/<()@resource://gre/modules/services-sync/service.js:1257 < WrappedCatch()@resource://services-sync/util.js:77 < sync()@resource://gre/modules/services-sync/service.js:1245 < <file:unknown>
(Reporter)

Updated

2 years ago
Blocks: 1166571
This particular bug is fixed in https://github.com/jfitzell/mozilla-keychain/pull/84 - the addon is still struggling with working out how to sync passwords, but at least the credentials are saved correctly.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
(Reporter)

Updated

11 months ago
Duplicate of this bug: 1254319
You need to log in before you can comment on or make changes to this bug.