Closed Bug 716815 Opened 14 years ago Closed 14 years ago

Wooly bug report: error on initial sync leads to credentials not being saved

Categories

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

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rnewman, Assigned: rnewman)

Details

Subsequent syncs will look like Bug 716812. I believe this happens if some exception is thrown during the first sync, or the credentials save step. The account exists but its 'decorations' do not.
Tested on Galaxy Nexus, Android 4.0.1 Toggling the "Sync Fennec" box throws a client error saying "Sync is experience problems, back shortly." but android log shows: 01-10 00:19:48.894: DEBUG/SyncAdapter(28143): AccountManager.get(android.app.Application@418344c8) 01-10 00:19:48.909: INFO/SyncAdapter(28143): Got onPerformSync. Extras bundle is Bundle[{}] 01-10 00:19:48.917: DEBUG/SyncAdapter(28143): Extras clusterURL: null 01-10 00:19:48.917: INFO/SyncAdapter(28143): Account name: tchungloaner@sync.com 01-10 00:19:48.917: INFO/SyncAdapter(28143): AccountManagerCallback invoked. 01-10 00:19:48.917: INFO/SyncAdapter(28143): Waiting on sync monitor. 01-10 00:19:48.917: DEBUG/SyncAdapter(28143): Username: null 01-10 00:19:48.917: DEBUG/SyncAdapter(28143): Server: null 01-10 00:19:48.917: DEBUG/SyncAdapter(28143): Password? true 01-10 00:19:48.917: DEBUG/SyncAdapter(28143): Key? false 01-10 00:19:48.917: ERROR/SyncAdapter(28143): No Sync Key: aborting sync. 01-10 00:19:48.917: INFO/SyncAdapter(28143): Notifying sync monitor. 01-10 00:19:48.933: DEBUG/SyncManager(181): failed sync operation tchungloaner@sync.com (org.mozilla.firefox_sync), org.mozilla.fennec_rnewman.db.browser, SERVER, earliestRunTime 168374971, SyncResult: stats [ numAuthExceptions: 1] 01-10 00:19:48.933: DEBUG/SyncManager(181): not retrying sync operation because the error is a hard error: tchungloaner@sync.com (org.mozilla.firefox_sync), org.mozilla.fennec_rnewman.db.browser, SERVER, earliestRunTime 168375112
I want to punch Android so hard. Auth tokens are automatically cached by AccountManager. When they are, you get an empty bundle back when you request a token. That is, the first time we ask for the user's credentials, we get all of them; the second time, we only get their password. The workaround is to do what I *had* been doing, which is invalidating the auth token at the start of each sync, and requesting a new one. This makes me feel dirty, but hey, it doesn't seem to take much time: the auth token is locally generated.
Assignee: nobody → rnewman
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Mozilla Services → Android Background Services
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.