Closed Bug 728612 Opened 12 years ago Closed 12 years ago

Tab sync: upload Fennec's open tabs for display in Tabs From Other Computers

Categories

(Firefox for Android Graveyard :: Android Sync, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla18

People

(Reporter: tech4pwd, Assigned: nalexander)

References

()

Details

(Whiteboard: [parity-xul][parity-chrome])

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:13.0a1) Gecko/13.0a1 Firefox/13.0a1
Build ID: 20120218031156

Steps to reproduce:

Fennec doesn't appear in the list of sync'd devices.
OS: Windows 7 → Android
Hardware: x86 → ARM
Summary: Fennec doesn't appear in Tabs from other Computers → Fennec doesn't appear in Tabs From Other Computers List
Component: General → Firefox Sync: UI
Product: Fennec Native → Mozilla Services
Version: Trunk → unspecified
OS: Android → All
Hardware: ARM → All
Component: Firefox Sync: UI → Android Sync
QA Contact: general → android-sync
Android Sync doesn't yet upload a client record (Bug 709347).

Even then, it shouldn't (and perhaps won't) appear in Tabs From Other Devices, because it doesn't upload tabs, either (Bug 709403).

Keeping this open rather than duping: gives other people something to find, and saves me picking one of those two bugs to be the target :)
Status: UNCONFIRMED → NEW
Depends on: 709347, 709403
Ever confirmed: true
Priority: -- → P2
Assignee: nobody → johnath
Sent mail to mconnor and jay to get to a decision on whether this is expected feature parity or out of scope for fennec native 1.0.
Splitting this to only reflect upload of tabs, not download.
Depends on: 730039
No longer depends on: 709403
Summary: Fennec doesn't appear in Tabs From Other Computers List → Tab sync: upload Fennec's open tabs for display in Tabs From Other Computers
(In reply to Johnathan Nightingale [:johnath] from comment #2)
> Sent mail to mconnor and jay to get to a decision on whether this is
> expected feature parity or out of scope for fennec native 1.0.

Sync has been marketed as a primary feature of Fennec. I'd imagine a quite negative response in the Android Market should it fall short of what was available in the XUL carnation.
Sync is a primary feature of Fennec, but I don't believe this particular feature of sync is a blocker, and Jay emailed to say he agrees. Clearing the beta keyword.
Assignee: johnath → nobody
sync retriage: staying p2
Priority: P2 → P1
tracking-fennec: --- → ?
Whiteboard: [parity-xul][parity-chrome]
This is easy to do, but absolutely depends on Bug 730039, which is tracking 16+ but otherwise untouched since mid-June.
OK, time for this bug to take flight, adding the second half of the tabs repository.

Who's back from vacation? :D
Assignee: nobody → nalexander
It's easiest to test this with two Android devices; I had trouble viewing Tabs From Other Computers on desktop.

1. pair Device A with Sync account.
2. in Fennec, open several tabs -- about 4 or 5 should work.  Only do this until you see a 'clients, tabs' sync, like in https://bugzilla.mozilla.org/show_bug.cgi?id=780279#c3 -- you should see logs like

...
I FxSync(9158)                fennec_ncalexan :: SyncAdapter :: Forced sync: overruling remaining backoff of 83096128ms.
...
I FxSync(9158)                fennec_ncalexan :: Utils :: Asked to sync 'clients, tabs' and to skip ''.
...

(Fennec doesn't update the tabs database all that frequently.  If you just add lots of tabs, some will not be written to disk and won't get synced.  Sad face.)

3. pair Device B to same Sync account.
4. force sync Device B.
5. in Fennec, expand the tabs panel and select the "Computers" icon.
6. verify Device A's tabs appear with correct client name.

Now, let's check that we don't sync tabs too frequently:

7. back on Device A, force sync, and then force sync again.
8. look in the logs for

...
I FxSync(30559)               fennec_ncalexan :: GlobalSession :: Running next stage syncTabs (org.mozilla.gecko.sync.stage.FennecTabsServerSyncStage@4180b848)...
...
I FxSync(30559)               fennec_ncalexan :: ServerSyncStage :: Received 2 and sent 0 records in 0.60 seconds.

(twice).  You should see 0 records sent the second time: that means we're getting remote records but not sending a local record, which is good 'cuz nothing's changed!
(In reply to Nick Alexander :nalexander from comment #11)
> It's easiest to test this with two Android devices; I had trouble viewing
> Tabs From Other Computers on desktop.

That sounds like a bug. Desktop logs, please!
(In reply to Gregory Szorc [:gps] from comment #13)
> (In reply to Nick Alexander :nalexander from comment #11)
> > It's easiest to test this with two Android devices; I had trouble viewing
> > Tabs From Other Computers on desktop.
> 
> That sounds like a bug. Desktop logs, please!

Just checked: desktop logs are clean.

I was about to complain, but then I figured I would test further myself before bugging you, and things started to work.  I re-started desktop Aurora with another profile, paired to the sync account, and found that Tabs from Other Computers worked; then I re-started with the original profile and voila, Tabs from Other Computers worked here.  If I see it again, I'll file.
New testing instructions (that don't rely on Bug 780279 landing):

1. pair Android Device with Sync account.
2. in Fennec, open several tabs -- 3 should work.  Using the tab interface, switch between them.  Only do this until you see a logs like

V GeckoTabsAccessor(27792)    zerdatime 1023304984 - start of persistLocalTabs
V GeckoTabsAccessor(27792)    zerdatime 1023305160 - end of persistLocalTabs

That means Fennec has actually written tab data to disk (which Sync can now propagate).  (Fennec doesn't update the tabs database all that frequently.  If you just add lots of tabs, some will not be written to disk and won't get synced.  Sad face.)

3. force sync; you should get logs like

I FxSync(27792)               fennec_ncalexan :: GlobalSession :: Running next stage syncTabs (org.mozilla.gecko.sync.stage.FennecTabsServerSyncStage@417a0c28)...
I FxSync(27792)               fennec_ncalexan :: ServerSyncStage :: Received 2 and sent 1 records in 0.43 seconds.
I FxSync(27792)               fennec_ncalexan :: ServerSyncStage :: Advancing session.
I FxSync(27792)               fennec_ncalexan :: GlobalSession :: Running next stage syncPasswords (org.mozilla.gecko.sync.stage.PasswordsServerSyncStage@417a0c70)...

4. verify that FxSync reports sending 1 record in tabs stage.
5. in Desktop firefox, open Tabs from Other Computers.
6. verify Fennec appears, with correct tabs.  (This can be a little sketchy since Fennec doesn't always propagate current information.  If you sync right after persistLocalTabs, we should be good.)

7. back on Device A, force sync, and then force sync again.
8. look in the logs for

I FxSync(27792)               fennec_ncalexan :: GlobalSession :: Running next stage syncTabs (org.mozilla.gecko.sync.stage.FennecTabsServerSyncStage@417edf90)...
I FxSync(27792)               fennec_ncalexan :: ServerSyncStage :: Received 2 and sent 0 records in 0.41 seconds.
I FxSync(27792)               fennec_ncalexan :: ServerSyncStage :: Advancing session.
I FxSync(27792)               fennec_ncalexan :: GlobalSession :: Running next stage syncPasswords (org.mozilla.gecko.sync.stage.PasswordsServerSyncStage@417ae8e0)...

(twice).  You should see 0 records sent the second time: that means we're getting remote records but not sending a local record, which is good 'cuz nothing's changed!
https://hg.mozilla.org/integration/mozilla-inbound/rev/d7353d4880bf
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/d7353d4880bf
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Mozilla Services → Android Background Services
tracking-fennec: ? → ---
Product: Android Background Services → Firefox for Android
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.