Issue metadata
Sign in to add a comment
|
Enrollment/Device sync requests often result in authenication error |
||||||||||||||||||||||
Issue descriptionIf an enrollment or device sync is requested soon after logging in (maybe other times), the first attempt usually fails with the error [ERROR:cryptauth_device_manager_impl.cc(666)] GetMyDevices API failed: [authentication error] or [WARNING:cryptauth_enroller_impl.cc(139)] SetupEnrollment API failed with error: [authentication error] The CryptAuth client is currently not waiting for a non-empty access token to be retrieved. The culprit appears to be the use of kImmediate instead of kWaitUntilAvailable here: https://cs.chromium.org/chromium/src/components/cryptauth/cryptauth_client_impl.cc?l=296&rcl=eebbaf9cc76e0993b1edb05473a8989a7a99a6d4
,
Sep 20
,
Sep 20
Requesting merge to M-70. This CL is needed to fix a regression in M-70 which occurred due to https://chromium-review.googlesource.com/c/chromium/src/+/1107715. User-visible bug is that multi-device features fail to work for first-time users (i.e., users who have just signed into a Chromebook for the first time).
,
Sep 20
,
Sep 21
This bug requires manual review: M70 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 24
,
Sep 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/60a34b2b7a302b6a2b0933abffc6d7eb42c0b0cf commit 60a34b2b7a302b6a2b0933abffc6d7eb42c0b0cf Author: Kyle Horimoto <khorimoto@google.com> Date: Mon Sep 24 21:29:36 2018 Wait for access token before making CryptAuth API calls Before the CryptAuthClient attempts to make an API call, it fetches an OAuth2 access token. However, currently the client does not wait for the access token to become available before proceeding. This can lead to empty access token strings and errors such as [ERROR:cryptauth_device_manager_impl.cc(666)] GetMyDevices API failed: [authentication error] and [WARNING:cryptauth_enroller_impl.cc(139)] SetupEnrollment API failed with error: [authentication error]. Here, we change PrimaryAccountAccessTokenFetcher's mode from |kImmediate| to |kWaitUntilAvailable|. From PrimaryAccountAccessTokenFetcher's header file: |kImmediate|: Makes one-shot immediate request. |kWaitUntilAvailable|: Waits for the primary account to be available before making the request. In particular, "available" is defined as the moment when (a) there is a primary account and (b) that account has a refresh token. TBR=nohle@google.com (cherry picked from commit 34485d36a31e8b475e3dcc2be66eaab1ed73b23a) Bug: 887136 Change-Id: I745e0bb3f3ef1bc3226e46147fcb699c101d12dd Tested: Manual Reviewed-on: https://chromium-review.googlesource.com/1235284 Reviewed-by: Kyle Horimoto <khorimoto@chromium.org> Commit-Queue: Josh Nohle <nohle@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#592640} Reviewed-on: https://chromium-review.googlesource.com/1241564 Cr-Commit-Position: refs/branch-heads/3538@{#604} Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811} [modify] https://crrev.com/60a34b2b7a302b6a2b0933abffc6d7eb42c0b0cf/components/cryptauth/cryptauth_client_impl.cc
,
Sep 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/60a34b2b7a302b6a2b0933abffc6d7eb42c0b0cf Commit: 60a34b2b7a302b6a2b0933abffc6d7eb42c0b0cf Author: khorimoto@google.com Commiter: khorimoto@chromium.org Date: 2018-09-24 21:29:36 +0000 UTC Wait for access token before making CryptAuth API calls Before the CryptAuthClient attempts to make an API call, it fetches an OAuth2 access token. However, currently the client does not wait for the access token to become available before proceeding. This can lead to empty access token strings and errors such as [ERROR:cryptauth_device_manager_impl.cc(666)] GetMyDevices API failed: [authentication error] and [WARNING:cryptauth_enroller_impl.cc(139)] SetupEnrollment API failed with error: [authentication error]. Here, we change PrimaryAccountAccessTokenFetcher's mode from |kImmediate| to |kWaitUntilAvailable|. From PrimaryAccountAccessTokenFetcher's header file: |kImmediate|: Makes one-shot immediate request. |kWaitUntilAvailable|: Waits for the primary account to be available before making the request. In particular, "available" is defined as the moment when (a) there is a primary account and (b) that account has a refresh token. TBR=nohle@google.com (cherry picked from commit 34485d36a31e8b475e3dcc2be66eaab1ed73b23a) Bug: 887136 Change-Id: I745e0bb3f3ef1bc3226e46147fcb699c101d12dd Tested: Manual Reviewed-on: https://chromium-review.googlesource.com/1235284 Reviewed-by: Kyle Horimoto <khorimoto@chromium.org> Commit-Queue: Josh Nohle <nohle@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#592640} Reviewed-on: https://chromium-review.googlesource.com/1241564 Cr-Commit-Position: refs/branch-heads/3538@{#604} Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
,
Sep 24
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by bugdroid1@chromium.org
, Sep 20