Closed Bug 932256 Opened 11 years ago Closed 10 years ago

Android Share via "Firefox Sync" displays old sync account's data

Categories

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

Firefox 24
All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 963446

People

(Reporter: natanji, Unassigned, Mentored)

Details

(Whiteboard: [lang=java][good next bug])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release) Build ID: 20130917081302 Steps to reproduce: I set up a sync account (via an own Weave server) around a year ago to keep Firefox on my Android, Desktop and Laptop in sync. I recently changed the server, so I naturally had to re-setup the sync accounts on all of these devices. So far I have it only set up on Android and Laptop, and I opted for a completely new account (instead of migrating the old one) on a new Weave server; different account name/email address even. I created the account on Laptop, deleted the Firefox Sync account in Android settings, and then paired the Android in the usual way (by entering the 3*4 character code that was displayed on Android in the Laptop's Firefox). I then tried to send a tab from my Android to my Laptop to try out if sync works, via Firefox for Android's "Share" function in the menu (the one with the small paper aiplane). I selected "Firefox Sync" in the list of Android share providers. Actual results: The Firefox Sync "share window" opened, displaying the title of the webpage, the URL... and below that, BOTH the Laptop AND the Desktop as devices to send the tab to! This should be impossible since the Desktop was not paired with the new server's account yet. The Laptop device even had the old "Device Name", which I had changed on the new server compared to what it was on the old server. This shows that even though I deleted the Firefox Sync account from Android *completely*, the old sync account's data was still being used by Firefox Sync. Expected results: The old sync account's data should be completely deleted when deleting the Firefox account in Android settings. Thus Firefox for Android should either display only the Laptop (if initial sync for the new account is finished) or no other device (if initial sync is not finished yet) in the Share window. (note: the rest of the Android sync doesn't work so far either, but I cannot discount the possibility that my new Weave server is not working properly yet, so with this I am only reporting the part that clearly should not happen regardless of my Weave server)
To add to this: my sync had failed on Android due to not accepting the new server's SSL certificate into the Android CA store yet. After the sync completed now, everything is working as it should and only the new Laptop's "Device Name" shows up in the "Send Tab" dialogue. So after the first *successful* sync with the new server, the bug's effects disappear, thankfully.
Component: General → Android Sync
Product: Firefox for Android → Android Background Services
Thanks for a great bug report! I believe this is a near-duplicate of Bug 830270. While this looks serious, it's less bad than it may appear. The old account data is *not* being transferred to the new account at all. What is happening is that when you delete your old Android account, we're not purging the "clients" database from the phone, and therefore those old device records appear in the Send Tab list. I don't have time to work on this right now, but what should happen is that at or around http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/sync/receivers/SyncAccountDeletedService.java#71 we should delete the "clients" database using wipeDB from http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/sync/repositories/android/ClientsDatabaseAccessor.java#153 Thanks again!
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → Android
Hardware: x86_64 → All
Whiteboard: [mentor=nalexander][lang=java][good first bug]
Hello, I'm new to the Mozilla developer network and I'd like to contribute to this bug. What I'd like to know is how to get set up to fix this bug.
> Hello, > > I'm new to the Mozilla developer network and I'd like to contribute to this > bug. What I'd like to know is how to get set up to fix this bug. Hi bbelland, I'm happy to mentor, but I'd just like to make it clear that this is a trickier bug than what I think a good first bug is :) My thinking about first bugs has changed, so I'm going to call this a good second (or third, fourth, etc) bug. This is based on https://wiki.mozilla.org/Contribute/Coding/Mentoring#Good_First_Bug. So, the first steps for all Fennec bugs are building Fennec. This is documented at https://wiki.mozilla.org/Mobile/Fennec/Android#Building_Fennec You can ask for help in #mobile on irc.mozilla.org; I'm usually around about 10-6 PST. You can also ask the mobile-firefox-dev list. Let me know how that works out for you!
Whiteboard: [mentor=nalexander][lang=java][good first bug] → [mentor=nalexander][lang=java][good second bug]
Mentor: nalexander
Whiteboard: [mentor=nalexander][lang=java][good second bug] → [lang=java][good second bug]
Nick, dupe with bug 963446?
Flags: needinfo?(nalexander)
I think so, although that is Firefox Accounts and this would also apply to Old Sync. But Old Sync is dead (long live Old Sync) so dupe indeed.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(nalexander)
Resolution: --- → DUPLICATE
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.