Closed
Bug 830270
Opened 12 years ago
Closed 10 years ago
Removing Sync account does not remove synced tabs
Categories
(Firefox for Android Graveyard :: Android Sync, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
Firefox 34
People
(Reporter: suirtemedb, Assigned: vivek, Mentored)
References
Details
(Keywords: papercut, Whiteboard: [lang=java][good second bug])
Attachments
(1 file)
Due to my Nexus S still showing up under my synced tabs even though it wasn't there for months I decided to delete my sync account and recreate a new one. After deleting it and setting it up again on my laptop I go over to my Nexus 7. I have to manually delete sync, and sign up again with my laptop. The only problem is that it still lists the devices that I haven't owned for months and nothing I attempt removes them.
Updated•12 years ago
|
Component: General → Android Sync
Product: Firefox for Android → Mozilla Services
Version: Firefox 21 → unspecified
Comment 1•12 years ago
|
||
Hmm, there are a few things I can think of that might be involved:
1) Deleting sync might mean that remote records in the tabs DB on each device are never purged. Cleaning DBs on sync removal and cleaning the tabs DB periodically from Fennec would address this.
2) We might have a clients record TTL issue. Old devices are supposed to drop out of the list of clients after 1 or 3 weeks (Android or desktop, respectively). We could verify that clients records are, in fact, being purged.
Thanks for the report. I will try to look at 1) in the near future; QA could you test 2)?
Comment 2•12 years ago
|
||
Harshit, are you interested in addressing this? There are a bunch of ways you could do this, but I think there is already an "Android Accounts changed" observer somewhere in Fennec. If that observer finds that the last Sync account is deleted, it could try to delete all remote tabs in the database.
Updated•12 years ago
|
Whiteboard: [mentor=nalexander][lang=java][good first bug]
Comment 3•12 years ago
|
||
So, at
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/AboutHomeContent.java#143
we register a callback that updates the layout of about:home when sync accounts are updated. We should make sure this removes the Sync portion of about:home (I think it does) and then we should also try to be clever about cleaning the tabs and clients DB.
I suggest writing some code that carefully cleans the tabs and clients DB, then trying to tie it in to this callback.
Updated•12 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•12 years ago
|
Product: Mozilla Services → Android Background Services
Hello. I was wondering if my partner and I could work on this issue for a class project. Please let me know if this bug is still open. Thank you so much.
Comment 5•12 years ago
|
||
(In reply to Tsai from comment #4)
> Hello. I was wondering if my partner and I could work on this issue for a
> class project. Please let me know if this bug is still open. Thank you so
> much.
Definitely still open! Read through the comments and see where you get; you can leave questions on the ticket and I'll reply as quickly as I can. Thanks for helping.
Updated•12 years ago
|
QA Contact: lala.pashayan
Comment 6•12 years ago
|
||
Hi Lala, any progress here?
Updated•11 years ago
|
Comment 8•11 years ago
|
||
Vivek: this might be a good next bug for you; involved, but you're providing great patches on other tickets...
Flags: needinfo?(vivekb.balakrishnan)
Whiteboard: [mentor=nalexander][lang=java][good first bug] → [mentor=nalexander][lang=java][good second bug]
Assignee | ||
Comment 9•11 years ago
|
||
I'm interested in working on this.
Flags: needinfo?(vivekb.balakrishnan)
Comment 10•11 years ago
|
||
Feel free to work on this and to attach a patch and we'll happily review it for feedback. There seems to be several interested parties working on this so don't mind the already assigned member.
Comment 11•11 years ago
|
||
AaronMT: I invited Vivek to work on this because he's been doing great work on some other tickets. Clearing the assigned fields since Lala hasn't commented in many months.
Assignee: lala.pashayan → nobody
QA Contact: lala.pashayan
Comment 12•11 years ago
|
||
There are a few parts to this.
1. Add a function that deletes the entire clients database (corresponds to remote Sync devices) and the non-local tabs (the tabs from remote devices) from the tabs database. Non-local tabs have client_guid == null; see http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/db/BrowserContract.java#298.
See http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/sync/repositories/android/FennecTabsRepository.java#272 for how to delete things from the databases (but don't try to use that wipe function directly, since it's tied up in other machinery.)
2. Add static member functions to both Fx- and Sync- AccountDeletedService to invoke your database cleaning functions, and add them to the list of things invoked:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/fxa/receivers/FxAccountDeletedService.java#57
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/sync/receivers/SyncAccountDeletedService.java#76
3. Test with a new Sync account. (Testing with old sync is tricky right now :)
Updated•10 years ago
|
Mentor: nalexander
Whiteboard: [mentor=nalexander][lang=java][good second bug] → [lang=java][good second bug]
Comment 13•10 years ago
|
||
Attachment #8446221 -
Flags: review?(nalexander)
Updated•10 years ago
|
Assignee: nobody → vivekb.balakrishnan
Comment 14•10 years ago
|
||
Comment on attachment 8446221 [details] [review]
Link to Github pull-request: https://github.com/mozilla-services/android-sync/pull/467
Really nice work, vivek. Awesome to see an *ooooold* ticket get some love. I've left a ton of tiny comments on the Github PR, and a few larger remarks. Flag me for re-review when it's ready.
Thanks! Great job!
Attachment #8446221 -
Flags: review?(nalexander) → feedback+
Flags: needinfo?(vivekb.balakrishnan)
Assignee | ||
Comment 15•10 years ago
|
||
Hi Nick,
I've updated the pull request with feedback comments.
Flags: needinfo?(vivekb.balakrishnan)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(nalexander)
Comment 16•10 years ago
|
||
(In reply to vivek from comment #15)
> Hi Nick,
> I've updated the pull request with feedback comments.
Sorry, I don't have time to get to this before I leave on vacation tomorrow. I'll be back mid-August. In the meantime, perhaps rnewman can look at this.
Flags: needinfo?(nalexander) → needinfo?(rnewman)
Updated•10 years ago
|
Attachment #8446221 -
Flags: feedback?(rnewman)
Flags: needinfo?(rnewman)
Comment 17•10 years ago
|
||
Comment on attachment 8446221 [details] [review]
Link to Github pull-request: https://github.com/mozilla-services/android-sync/pull/467
Looks good; just nits.
Attachment #8446221 -
Flags: feedback?(rnewman) → feedback+
Updated•10 years ago
|
Status: NEW → ASSIGNED
Flags: needinfo?(rnewman)
Summary: Removing sync does not remove synced tabs. → Removing Sync account does not remove synced tabs
Updated•10 years ago
|
Attachment #8446221 -
Flags: review+
Comment 19•10 years ago
|
||
Comment 20•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Comment 21•10 years ago
|
||
rnewman landed this, but didn't include a file (for reasons unknown):
https://hg.mozilla.org/integration/fx-team/rev/d7585d5adb6a
Comment 22•10 years ago
|
||
Updated•10 years ago
|
Status: RESOLVED → VERIFIED
Updated•7 years ago
|
Product: Android Background Services → Firefox for Android
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•