Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync device is duplicated when Google Account cookies are deleted #41615

Closed
3 of 6 tasks
AlexeyBarabash opened this issue Oct 14, 2024 · 2 comments · Fixed by brave/brave-core#25971
Closed
3 of 6 tasks

Comments

@AlexeyBarabash
Copy link
Contributor

AlexeyBarabash commented Oct 14, 2024

Description

This issue is derived from #41196 to be specified at the PR. I need this to avoid the case when #41196 will be closed but not all the causes would be fixed.

When Google Account cookies are deleted, Sync Client ID gets regenerated and the device is duplicated on other synced device list.

The call stack of what had happened:

#2 0x61f515dba9d4 syncer::KeepAccountKeyedPrefValuesOnlyForUsers()
#3 0x61f515db915e syncer::SyncTransportDataPrefs::KeepAccountSettingsPrefsOnlyForUsers()
#4 0x61f515e30806 syncer::SyncUserSettingsImpl::KeepAccountSettingsPrefsOnlyForUsers()
#5 0x61f515ddb97b syncer::(anonymous namespace)::MaybeClearAccountKeyedPreferences()
#6 0x61f515ddbaa8 syncer::SyncServiceImpl::OnAccountsInCookieUpdatedWithCallback()
#7 0x61f515ddbc8b syncer::SyncServiceImpl::OnAccountsInCookieUpdated()
#8 0x61f5139a4d53 signin::IdentityManager::OnGaiaAccountsInCookieUpdated()
#9 0x61f5139c69f6 base::RepeatingCallback<>::Run()
#10 0x61f5139c7444 GaiaCookieManagerService::OnListAccountsSuccess()
#11 0x7dc343c10435 GaiaAuthFetcher::OnListAccountsFetched()
#12 0x7dc343c0d34b GaiaAuthFetcher::OnURLLoadComplete()
#13 0x7dc343b894bc base::OnceCallback<>::Run()
#14 0x7dc343b89ce9 network::(anonymous namespace)::SimpleURLLoaderImpl::FinishWithResult()
#15 0x7dc343b89e6d network::(anonymous namespace)::SimpleURLLoaderImpl::MaybeComplete()
#16 0x7dc343b8533f network::(anonymous namespace)::SimpleURLLoaderImpl::OnComplete()
#17 0x7dc343bd133c network::mojom::URLLoaderClientStubDispatch::Accept()

#2 0x75e9eaf4ed9f GaiaAuthFetcher::CreateAndStartGaiaFetcher()
#3 0x75e9eaf50735 GaiaAuthFetcher::StartListAccounts()
#4 0x64f162015095 GaiaCookieManagerService::StartFetchingListAccounts()
#5 0x64f162016d8b base::internal::Invoker<>::RunOnce()
#6 0x64f161f74270 base::OnceCallback<>::Run()
#7 0x64f163df7627 WaitForNetworkCallbackHelperChrome::DelayNetworkCall()
#8 0x64f163d3f1e2 ChromeSigninClient::DelayNetworkCall()
#9 0x64f162011cb0 GaiaCookieManagerService::TriggerListAccounts()
#10 0x64f162012cc0 GaiaCookieManagerService::OnCookieChange()
#11 0x64f1620b2feb network::mojom::CookieChangeListenerStubDispatch::Accept()

Steps to reproduce

I. Scenario with manual logout from GMail

  1. Add devices A and B into the sync chain
  2. On device B login into GMail
  3. On device B logout from GMail
  4. Restart browser on Device B
  5. Unexpected device B is duplicated at A's list

II. Scenario with Delete sites data option

  1. Add devices A and B into the sync chain
  2. On device B login into GMail
  3. On device B go to brave://settings/content/siteData and choose
Delete data sites have saved to your device when you close all windows
Sites will probably work as you expect but won't remember you after you close all Brave windows
  1. Restart browser on Device B
  2. Unexpected device B is duplicated at A's list

Actual result

Device is duplicated at A's list

Expected result

Device is not duplicated at A's list

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.72.0 Chromium: 130.0.6723.31 (Developer Build) (64-bit)

Channel information

  • release (stable)
  • beta
  • nightly

Reproducibility

  • with Brave Shields disabled
  • with Brave Rewards disabled
  • in the latest version of Chrome

Miscellaneous information

No response

@AlexeyBarabash AlexeyBarabash self-assigned this Oct 14, 2024
AlexeyBarabash added a commit to brave/brave-core that referenced this issue Oct 18, 2024
)

* Fixed device duplication when Google Account cookies are deleted; fixes brave/brave-browser#41615
@brave-builds brave-builds added this to the 1.73.x - Nightly milestone Oct 18, 2024
@kjozwiak
Copy link
Member

The above requires 1.71.116 or higher for 1.71.x verification 👍

@GeetaSarvadnya GeetaSarvadnya added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Oct 21, 2024
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Oct 21, 2024

Verification PASSED on

Brave | 1.71.116 Chromium: 130.0.6723.58 (Official Build) (64-bit)
-- | --
Revision | 789393dd90da88a1f9abf5a7d05fd8ccff76afa2
OS | Windows 10 Version 22H2 (Build 19045.5011)

Verified test plan from brave/brave-core#25971 (comment).

Scenario 1 - Logout of Gmail - PASSED

Reproduced "Scenario 1 - logout of Gmail" - Device B was duplicated on device A's list using STR from brave/brave-core#25971 (comment) and 1.71.114:

Device A Device B
Image Image

Using same STR and 1.71.116:

  1. Add devices A and B into the sync chain
  2. On device B login into GMail
  3. On device B logout from GMail
  4. Restart browser on Device B
  5. Confirmed device B is not duplicated at A's list
  6. Wait a minute or two and refresh sync page on Device A just to double check
Device A Device B
Image Image
Scenario 2 - with "Delete data sites..." option - PASSED

Reproduced "Scenario 2 - with Delete data sites... option" - Device B was duplicated on device A's list using STR from brave/brave-core#25971 (comment) and 1.71.114:

Device A Device B Device B
Image Image Image

Using same STR and 1.71.116:

  1. Add devices A and B into the sync chain
  2. On device B login into GMail
  3. On device B go to brave://settings/content/siteData and choose
Delete data sites have saved to your device when you close all windows
Sites will probably work as you expect but won't remember you after you close all Brave windows
  1. Restart browser on Device B
  2. Expected device B is not duplicated at A's list
  3. Wait a minute or two and refresh sync page on Device A just to double check
Device A Device B Device B
Image Image Image

@GeetaSarvadnya GeetaSarvadnya added QA Pass-Win64 and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment