New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 921553 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Validate/fix auth error handling in SyncAuthManager

Project Member Reported by treib@chromium.org, Jan 14

Issue description

Handling of auth errors in SyncAuthManager is inconsistent at best, and I believe buggy in some cases (or at least, things work correctly only by chance).

Some issues/oddities:

- IdentityManager keeps track of the auth error state of the refresh token. However, SyncAuthError doesn't use that, and so doesn't expose these auth error, with the exception of CREDENTIALS_REJECTED_BY_CLIENT which corresponds to "Sync paused". (We do expose auth errors we get in AccessTokenFetched(), so maybe this is okay?)

- When the CREDENTIALS_REJECTED_BY_CLIENT error gets cleared, then that does *not* in itself trigger a new access token request [1]. Things seem to be working out only because we keep trying to fetch access tokens the whole time due to syncer::CONNECTION_AUTH_ERROR.

- Corollary to the above: We keep trying to fetch access tokens the whole time we're in the "Sync paused" state. That's pointless at best, and potentially harmful (we might get throttled/backed-off etc).

[1] https://cs.chromium.org/chromium/src/components/browser_sync/sync_auth_manager.cc?rcl=e5d14a874ac175c2014d3538908ed227228f1706&l=310
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60640b6a57d8c213d2f3c57d3e92f4532b39dc84

commit 60640b6a57d8c213d2f3c57d3e92f4532b39dc84
Author: Marc Treib <treib@chromium.org>
Date: Tue Jan 15 07:37:19 2019

Cleanup in SyncAuthManager::OnRefreshTokenUpdatedForAccount

With the various IdentityManager changes, the code here had gotten a bit
convoluted/redundant.

Bug: 921553
Change-Id: I7036d185050efd4c1f6f3823379c1d453ebe7024
Reviewed-on: https://chromium-review.googlesource.com/c/1409194
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622767}
[modify] https://crrev.com/60640b6a57d8c213d2f3c57d3e92f4532b39dc84/components/browser_sync/sync_auth_manager.cc

Sign in to add a comment