Sync fails with no way to recover after token expires
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
High
|
Bill Filler | ||
| | sync-monitor |
High
|
Unassigned | ||
| | signon-plugin-oauth2 (Ubuntu) |
High
|
Alberto Mardegan | ||
| | sync-monitor (Ubuntu) |
High
|
Renato Araujo Oliveira Filho | ||
| | sync-monitor (Ubuntu RTM) |
High
|
Unassigned | ||
Bug Description
I have two accounts on my krillin which I sync to google.
Opened calendar and hit 'sync' button. Navigated around a bit in the app, it died (will file separate bug for that) and I restarted it. Tried syncing again. Got a sync fail popup.
ubuntu-
ProblemType: Bug
DistroRelease: Ubuntu RTM 14.09
Package: sync-monitor 0.1+15.
Uname: Linux 3.4.67 armv7l
ApportVersion: 2.14.7-0ubuntu8
Architecture: armhf
Date: Mon Feb 9 21:11:51 2015
InstallationDate: Installed on 2015-02-09 (0 days ago)
InstallationMedia: Ubuntu Utopic Unicorn (development branch) - armhf (20150209-030204)
SourcePackage: sync-monitor
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- PS Jenkins bot: Approve (continuous-integration) on 2015-03-23
- Ubuntu Phablet Team: Pending requested 2015-02-10
-
Diff: 816 lines (+480/-30)16 files modifiedCMakeLists.txt (+2/-0)
authenticator/CMakeLists.txt (+41/-0)
authenticator/main.cpp (+90/-0)
authenticator/main.qml (+196/-0)
authenticator/sync-monitor-helper.qrc (+5/-0)
authenticator/syncmonitorhelper.desktop.in (+7/-0)
authenticator/syncmonitorhelper.url-dispatcher (+5/-0)
debian/control (+15/-0)
debian/sync-monitor-helper.install (+3/-0)
po/CMakeLists.txt (+9/-2)
po/sync-monitor.pot (+50/-23)
src/CMakeLists.txt (+2/-0)
src/sync-account.cpp (+18/-1)
src/sync-account.h (+2/-3)
src/sync-daemon.cpp (+32/-1)
src/sync-daemon.h (+3/-0)
syncevolution log is ~4M
| Changed in sync-monitor (Ubuntu): | |
| assignee: | nobody → Renato Araujo Oliveira Filho (renatofilho) |
| importance: | Undecided → High |
| tags: | added: ww09 |
I believe this was caused due the online account token became invalid (has expired), we need to find a way to notify online-accounts about that. And request a new one.
| Changed in ubuntu-system-settings-online-accounts: | |
| importance: | Undecided → High |
I found the problem in fact this error was already documented in sync-monitor, this error can happen if the network became unstable during a sync.
The current solution is retry sync if this happen during a fast sync. But not after a slow sync.
But since this sync happen during the first sync and the first sync is always a slow sync, the sync-monitor did not try to re-sync it.
To solve this problem I change the code to retry the sync one more time even if the last sync was a slow sync or not.
| summary: |
- Sync fail 403 on krillin 231 + Sync fails with no way to recover after token expires |
| Changed in sync-monitor: | |
| importance: | Undecided → High |
| Changed in sync-monitor (Ubuntu RTM): | |
| importance: | Undecided → High |
| Changed in canonical-devices-system-image: | |
| importance: | Undecided → High |
| Changed in sync-monitor: | |
| status: | New → In Progress |
| tags: | added: calendar |
| Changed in canonical-devices-system-image: | |
| milestone: | none → ww09-2015 |
| status: | New → In Progress |
| Changed in canonical-devices-system-image: | |
| assignee: | nobody → Bill Filler (bfiller) |
| Alberto Mardegan (mardy) wrote : | #6 |
I've been debugging the issue here, according to the steps (and the logs) which Renato provided me with.
So, a problem arises if the access token has expires and the refresh token (which can be used to request a new access token without UI interactions) is still valid, but the client application has been revoked access from https:/
Feb 13 15:02:15 ubuntu-phablet signonpluginpro
Feb 13 15:02:15 ubuntu-phablet signonpluginpro
Feb 13 15:02:15 ubuntu-phablet signonpluginpro
Feb 13 15:02:15 ubuntu-phablet signonpluginpro
Feb 13 15:02:15 ubuntu-phablet signonpluginpro
Feb 13 15:02:15 ubuntu-phablet signonpluginpro
Feb 13 15:02:15 ubuntu-phablet signonpluginpro
Feb 13 15:02:16 ubuntu-phablet signonpluginpro
Feb 13 15:02:16 ubuntu-phablet signonpluginpro
So, this is a but in signon-
| affects: | ubuntu-system-settings-online-accounts → signon-plugin-oauth2 (Ubuntu) |
| Changed in signon-plugin-oauth2 (Ubuntu): | |
| assignee: | nobody → Alberto Mardegan (mardy) |
| status: | New → In Progress |
| Changed in canonical-devices-system-image: | |
| milestone: | ww09-2015 → ww13-2015 |
| Changed in sync-monitor (Ubuntu): | |
| status: | New → Fix Released |
| Changed in sync-monitor: | |
| status: | In Progress → Fix Released |
| Changed in signon-plugin-oauth2 (Ubuntu): | |
| status: | In Progress → Fix Released |
| Changed in canonical-devices-system-image: | |
| status: | In Progress → Fix Released |


Also attaching calendar log in case it's interesting...