SendTab device list will be empty is sync isn't configured
Categories
(Firefox :: Firefox Accounts, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: markh, Assigned: lina)
References
Details
Attachments
(2 files)
Currently we populate the fxa device list via sync, but that's not going to work if sync isn't enabled - we will need to get it directly from fxa.
| Assignee | ||
Comment 2•6 years ago
|
||
Mark, while I'm here, should we drop support for old Send Tab clients (I guess just Fennec at this point?), or support both and combine the list we get from FxA with Sync?
| Reporter | ||
Comment 3•6 years ago
|
||
(In reply to Lina Cambridge (she/her) [:lina] from comment #2)
Mark, while I'm here, should we drop support for old Send Tab clients (I guess just Fennec at this point?), or support both and combine the list we get from FxA with Sync?
Good question - in bug 1579445 I suggested to Ed that instead of doing a sync we just hit fxa, and he indicated that would cause issues. Ed, what was the reason we still went via sync in that bug?
| Assignee | ||
Comment 4•6 years ago
|
||
Calling getDeviceList() after every UIState.ON_UPDATE might hammer the server—but maybe we could do caching, like we do for profiles? IIUC, it would also mean we couldn't send tabs to Fennec, but maybe we're OK with dropping support at this point?
Comment 5•6 years ago
|
||
I'd like to see a FxAccountsDevice.js module that's sync aware but where the canonical source of truth is the FxA devices (and listens to sync events!). Bonus point would be to move the device registration logic in there also.
For caching I've proposed adding an eTag server-side but it never got traction: https://github.com/mozilla/fxa/issues/524, but I don't think it's entirely necessary anyway.
| Assignee | ||
Comment 6•6 years ago
|
||
This commit contains no functional changes, just moving code around to
make the next patch in this series easier to write.
| Assignee | ||
Comment 7•6 years ago
|
||
Instead of using the list of FxA devices from the Sync clients engine,
we now fetch the list of Send Tab devices from FxA. This works like
this:
FxAccountsDevicecaches the device list in memory, and limits
requests to once every 10 minutes. (We don't serialize the requests,
however, so FxA and Sync fetching the device list concurrently
might still send multiple requests).FxAccountsDevicefires a new observer notification when the cached
list is invalidated, after a device is connected or disconnected.
This notifies Send Tab and FxA when to refresh their lists. Using the
device connected and disconnected notifications might mean that the
consumers will fetch a stale cached list, depending on if the
FxAccountsDeviceor the consumer observer fires first.- The Send Tab UI refreshes FxA devices in the background. Matching
FxA devices to Sync client records is best effort, and only impacts
the fallback case if the target doesn't support FxA commands.
Depends on D47520
| Assignee | ||
Comment 8•6 years ago
|
||
I haven't fixed the tests yet, but does this look sensible?
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Comment 9•6 years ago
|
||
| Assignee | ||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8d090eb60c78
https://hg.mozilla.org/mozilla-central/rev/0e871ed50b6c
Description
•