Closed Bug 573160 Opened 15 years ago Closed 10 years ago

Tabs synced from previous account exist after switching to a different account

Categories

(Firefox :: Sync, defect, P4)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Mardak, Unassigned, Mentored)

References

Details

(Whiteboard: [good first bug][lang=js][sync:tabs])

The tabs engine keeps a local cache of tabs and doesn't seem to clear it when starting over.
Actually.. the tab data does seem to get cleared.. or should be. But extra records are showing up. I'm guessing that somehow the tab tracker is marking the old client id as changed as well as the new id so it ends up sending 2 sets of the same tabs.. ?
Target Milestone: --- → 1.5
Flags: blocking-fx-sync1.5+
Not blocking 1.5, but we should ensure that Engine.resetClient nukes changed ids and anything else we track.
Flags: blocking-fx-sync1.5+
Priority: -- → P3
Target Milestone: 1.5 → 1.6
I is this a dupe of bug 565430
Not sure if it's a dupe, Tracy, but it certainly needs to be addressed.
Target Milestone: 1.6 → ---
I'm gonna make a go at it.
Assignee: nobody → gps
It has been hypothesized that the root cause is that TabsStore.createRecord() does not verify the incoming ID matches the client id and that we should add this check and noop if they don't match.
Assignee: gps → nobody
Whiteboard: [good first bug][mentor=gps][lang=js]
Assignee: nobody → marioalv.mozilla
Status: NEW → ASSIGNED
Hi everyone. I'll be working on this bug. Any more ideas about where to start / what other parts on the code we could check would be greatly appreciated.
(In reply to Mario Alvarado [:marioalv] from comment #7) > Hi everyone. > I'll be working on this bug. > Any more ideas about where to start / what other parts on the code we could > check would be greatly appreciated. See comment #6. This code is in services/sync/modules/engines/tab.js. I doubt the about:sync-tabs code is coming into play. But, if you want to look at that, it's in browser/base/content/sync/aboutSyncTabs.*
Hi. Thanks for your suggestions, Gregory. Now, I'm not really sure what are the steps to reproduce this error, so this is what I did. My set up is: 2 sync profiles: PA and PB and two computers: WIN and MAC. 1. Create 2 Sync profiles: PA and PB. 2. Log in to Sync profile PB in WIN. 3. Visit a couple of websites, like mozilla.org and wikipedia.org 4. Log in to Sync profile PB in MAC. 5. From the Firefox menu, expand History: wikipedia.org and mozilla.org appear in the recent visited sites list. 6. Go to History -> Tabs from other computers: wikipedia.org and mozilla.org appear on the list of tabs form other computers. 7. Log out from Sync profile PB in MAC. 8. Log in to Sync profile PA in MAC. 9. From the Firefox menu, expand History: wikipedia.org and mozilla.org appear in the recent visited sites list, although these sites were visited in other computer (WIN) an with other Sync account (PB). 10. Go to History -> Tabs from other computers: wikipedia.org and mozilla.org do not appear on the list of tabs form other computers. Is this the right way to reproduce the error? I'm guessing the websites visited in Sync profile PB with WIN computer should not appear after switching Sync accounts from PB to PA in MAC. Is this the error we need to fix? Thanks.
Mario, I believe bug 565430 fixed the scenario you described, if when you say log in or log out to mean link to an account or unlink from an account. Mardak, this was meant for the case when you unlink from say account, XYZ, on "machine A," then link to a completely different account, LMNOP, on "machine A". Somehow local cache retained TFoC, yes?
Hi. I tried what you suggested, Tracy. I think I could not reproduce the error. I'm not really sure what the word "exist" means in this bug title. Where should I look for in order to check if the tabs from a previously linked account "exist"? Firefox History? Firefox Sync "Tabs from other computers"? Any other place? From comment #1, what does "But extra records are showing up." mean? Where are those extra records showing up? These are the steps / results from my test. My set up is: 2 sync accounts: SA and SB, one Firefox profile and one computer. Just to be clear, in my previous comment, by "Sync profile" I meant "Sync account" (not to be mistaken with a Firefox profile), by "log in" I meant the "Sign in" option from Sync and by "log out" I meant "Unpair this device" option from Sync. I used only one Firefox profile in all the steps from comment #9 as well as in this new test. 1. Create 2 Sync accounts: SA and SB. 2. In Firefox, sign in to Sync account SB. 3. Visit a couple of websites, like mozilla.org and wikipedia.org. Don't close the tabs in any of the further steps. 4. Go to Tools -> Sync now (we need to make sure the previous visited websites are sync'ed in your Sync account SB). 5. Unpair your device from your Sync account SB (this means "do a sign out from your Sync account SB"). 6. Leaving the previoulsy opened tabs, sign in to Sync account SA. 7. Go to History -> Tabs from other computers: wikipedia.org and mozilla.org do not appear on the list of tabs from other computers. Thanks for your help.
ok, so yes, step 7 you are seeing correct behavior. I think you should be using two unique Firefox Profiles. SA and SB should be created with different Firefox Profiles. That will correctly represent two different clients. Also you don't want all the same tabs open on both clients. TFoC won't show a tab, or the device it is coming from, SB for example, if that tab is already open in current client, SA. Try that, then you might see a duplicate listing in Tabs From other Computers. If so, that is this bug. A good way to distinguish what each device is in TFoC is to rename each connected device uniquely. That can done in Preferences > Sync > Computer Name:
Hi. New tests to reproduce the bug. Still no visible errors as far as I understand. 1. Create and execute Firefox profile FP01. 2. Create a Sync account SA and sign in in the FP01 profile. 3. In FP01, visit a couple of websites like mozilla.org and wikipedia.org 4. Close the mozilla.org tab. 5. Sync Firefox instance with FP01 + SA data: Tools -> Sync now. 6. Create and execute Firefox profile FP02. 7. Create a Sync account SB and sign in in the FP02 profile. 8. In FP02, visit other websites like theoatmeal.com, 9gag.com and 2leep.com 9. Close the 2leep.com tab. 10. Sync Firefox instance with FP02 + SB data: Tools -> Sync now. 11. From profile FP01, go to History -> Tabs From Other Devices. 12. No tabs from other devices appear. 13. From profile FP02, go to History -> Tabs From Other Devices. 14. No tabs from other devices appear. Further testing steps 15. Unlink both sync accounts from both profiles. 16. Sign in to both sync accounts again: FP01 with SA and FP02 with SB. 17. The results were the same as the previous steps: no mixed Tabs From Other Devices. More tests: 18. Close the Firefox instance with the FP02 + SB combination. 19. Unlink the sync account SA from FP01. 20. Link the FP01 with sync account SB. 21. From profile FP01, go to History -> Tabs From Other Devices. 22. Websites theoatmeal.com and 9gag.com appear on the list (which I think is correct because those tabs were not closed in the Firefox sesion with FP02 + SB). At this point, is there something wrong that should have appeared? Thanks.
Blocks: 821020
Whiteboard: [good first bug][mentor=gps][lang=js] → [good first bug][mentor=gps][lang=js][sync:tabs]
Assignee: marioalv.mozilla → nobody
Status: ASSIGNED → NEW
Mentor: gps
Whiteboard: [good first bug][mentor=gps][lang=js][sync:tabs] → [good first bug][lang=js][sync:tabs]
This needs to be reproduced in FxA Sync and the new Sync UI, otherwise we should close it. Vasilica, could you please attempt to reproduce this?
Flags: needinfo?(vasilica.mihasca)
Flags: firefox-backlog+
Priority: P3 → P4
I was unable to reproduce this bug on Firefox 46.0a1 and Firefox 45.0a2, therefore I am marking this as Resolved WFM. Reporter, please feel free to reopen it if you are still having this issue on the latest Firefox version.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(vasilica.mihasca)
Resolution: --- → WORKSFORME
Awesome, Vasilica. Thank you.
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.