Closed Bug 1300859 Opened 3 years ago Closed 3 years ago

Measure how frequently we try to sync without a key fetch token

Categories

(Firefox :: Sync, defect, P1)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: Lina, Assigned: Lina)

References

Details

(Whiteboard: [sync-metrics])

Breaking this out of bug 1071786. Mark notes in bug 1071786, comment 15 that we already had probes for these, but removing them from Nightly removed them from all channels.
Blocks: 1071786
It would help if we talk a bit about the questions we'd like to answer with these probes.

* Are there cases where we can't save the token at all, because the login manager is broken? (Possible outcome: add UI that prompts the user to disable the offending add-on).

* Is the master password locked when we try to save or retrieve the token? (TBH, I'm not sure how the master password UI works, but a possible outcome might be to add a hint that it needs to be unlocked before they can sync).

* Is there a case where we successfully save the token, but then find it's missing when we go to retrieve it? (It would be useful to know why, of course, but then, if we knew that, we could just fix it. So the outcome is narrowing in on where to look for issues).

* Some combination of these, or others I haven't thought of?
(In reply to Kit Cambridge [:kitcambridge] from comment #1)
> It would help if we talk a bit about the questions we'd like to answer with
> these probes.
> 
> * Are there cases where we can't save the token at all, because the login
> manager is broken? (Possible outcome: add UI that prompts the user to
> disable the offending add-on).

I think this is the key issue we want to answer here - although it's possible that, say, a corrupt logins.json (or whatever it is) might cause the builtin login manager to fail, and it's also going to be difficult to identify a specific addon to blame - but measuring this sure sounds like a good start.

> * Is the master password locked when we try to save or retrieve the token?
> (TBH, I'm not sure how the master password UI works, but a possible outcome
> might be to add a hint that it needs to be unlocked before they can sync).

So there are 2 parts here:

* Being locked when we try and *write* credentials, and being shutdown before it was unlocked. In this case the user will need to reauthenticate next time the browser starts. Some UI here might make sense.

* Being locked when we try and *read* credentials. For now, we just skip syncing and hope we find it unlocked later. I'm not sure this is worth doing much about in terms of UI (although reflecting that state as a badge in the hamburger menu, much like we do for "needs reauth" might make sense. Note that I *think* we could get some interesting stats from the existing sync ping for this case (as we should find a specific "status" value indicating the MP was locked.)

> * Is there a case where we successfully save the token, but then find it's
> missing when we go to retrieve it? (It would be useful to know why, of
> course, but then, if we knew that, we could just fix it. So the outcome is
> narrowing in on where to look for issues).

That's somewhat related to the first issue above, but does make sense to measure IMO.

> * Some combination of these, or others I haven't thought of?

That's a great start IMO.
Oops, I meant to close this out earlier. We talked about this in stand-up some time ago, but it's not clear if adding these probes will tell us anything new. Thanks to the Sync ping, we already know folks run into issues with the login manager, either because of third-party password managers (bug 1166571), or problems with key3.db (bug 1295122). Those can affect password syncing and Sync authentication.

For third-party add-ons, there's not much we can do except disable them. With Web Extensions replacing add-ons in 2017, it doesn't seem valuable to invest time into workarounds. For key3.db corruption, if we knew where the error was happening, we could just fix it. :-) Unfortunately, `FxAccountsStorageManager` doesn't really have enough context to tell us *why* the token is gone.

Let's revisit if we think this is useful, but ISTM the most we'd get from these probes is, "keys aren't there anymore because reasons." That's not really actionable.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.