Closed Bug 1632581 Opened 4 months ago Closed 3 months ago

Password manager causes loads of "Invalid chrome URI: /" errors because it tries to match `chrome://FirefoxAccounts`

Categories

(Toolkit :: Password Manager, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(1 file)

I finally looked into this because I was seeing so many of these errors on my main profiles that I was starting to be seriously concerned.

It turns out that the stack (at least for some of them?) is:

0 isOriginMatching(aLoginOrigin = ""https://getpocket.com"", aSearchOrigin = ""chrome://FirefoxAccounts"", aOptions = "[object Object]") ["resource://gre/modules/LoginHelper.jsm":338:34]
    this = [object Object]
1 match(aLoginItem = "[object Object]") ["resource://gre/modules/storage-json.js":527:29]
2 _searchLogins(matchData = "[object Object]") ["resource://gre/modules/storage-json.js":568:15]
    this = [object Object]
3 findLogins(origin = ""chrome://FirefoxAccounts"", formActionOrigin = "null", httpRealm = ""Firefox Accounts credentials"") ["resource://gre/modules/storage-json.js":635:29]
    this = [object Object]
4 findLogins(origin = ""chrome://FirefoxAccounts"", formActionOrigin = "null", httpRealm = ""Firefox Accounts credentials"") ["resource://gre/modules/LoginManager.jsm":469:25]
    this = [object Object]
5 set() ["resource://gre/modules/FxAccountsStorage.jsm":583:43]
6 InterpretGeneratorResume(gen = "[object AsyncFunctionGenerator]", val = "undefined", kind = ""next"") ["self-hosted":1151:0]
7 AsyncFunctionNext(val = "undefined") ["self-hosted":693:0]
    this = [object AsyncFunctionGenerator]

ie the code at
https://searchfox.org/mozilla-central/rev/41c3ea3ee8eab9ce7b82932257cb80b703cbba67/toolkit/components/passwordmgr/LoginHelper.jsm#338

will log this error once for every time we get there, when invoked via FxAccountsStorage.jsm which looks for this origin. And probably once for every other time it gets invoked, given it'll be searching through space that involves this URI, if it exists.

See Also: → 1633259

As there is no way that the method can return true, we might as well skip the
work of constructing URIs. This also avoids unnecessary errors when trying to
do so for chrome URIs that are not valid, like the ones produced by FxA.

Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c84e287b9bd6
do not construct URIs when comparing password manager origins if we cannot upgrade or wildcard subdomains, r=MattN
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77

Is there anything actionable by QA here?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Vlad Lucaci, QA (:vlucaci) from comment #4)

Is there anything actionable by QA here?

You could verify that the errors have gone away but I don't think it's really important, so let's not bother.

Flags: needinfo?(gijskruitbosch+bugs) → qe-verify-
You need to log in before you can comment on or make changes to this bug.