Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code. Error while turning on Settings Sync: Authentication failed

I am getting Error while turning on Settings Sync: Authentication failed. when I try:

Settings Sync: Turn On... > Sign in & Turn on > {account name} (GitHub) Last Used with sync.

Settings Sync: Show Log shows:

[settingssync] [info] Using settings sync service https://vscode-sync.trafficmanager.net/
[settingssync] [info] Auto Sync is disabled.
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/manifest","status":401,"execution-id":"bbf1a818-0556-46db-aa3b-2da51e10ef6f"}
[settingssync] [info] Settings Sync auth token failed github false
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/resource/settings","status":401}
[settingssync] [info] Settings Sync auth token failed github true
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/resource/keybindings","status":401}
[settingssync] [info] Settings Sync auth token failed undefined true
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/resource/snippets","status":401}
[settingssync] [info] Settings Sync auth token failed undefined true
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/resource/extensions","status":401}
[settingssync] [info] Settings Sync auth token failed undefined true
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/resource/globalState","status":401}
[settingssync] [info] Settings Sync auth token failed undefined true
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/resource/machines/latest","status":401}
[settingssync] [info] Settings Sync auth token failed undefined true
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/manifest","status":401,"execution-id":"b3162617-22cb-4db6-8604-d43771bb972d"}
[settingssync] [info] Settings Sync auth token failed github true

How can I fix this error or remove syncing with GitHub account to be able to re-configure sync.

Settings Sync: Turn On... > Sign in & Turn on > Sign in with GitHub instead {account name} (GitHub) Last Used with sync.

Reinstalling VSCode with removing user preferences %AppData%\Code did not help.

like image 409
Victor S. Avatar asked Sep 06 '25 02:09

Victor S.


2 Answers

This just happened to me on a fresh install on a fresh machine. I intentionally tried to sync first thing, before installing anything locally to keep it 'clean' and consistent. It had been working fine on 3 other machines. Whether coincidence or not, I was also using my GitHub linked account. Here is how I fixed:

  1. With account set to 'GitHub: Logged In' in a broken state, I went to 'Setting Sync: Configure' and de-selected 'Settings, Key Bindings'.
  2. Wait a few mins and my sync of Extensions (and other) succeeded, the logs showed a clean operation.
  3. Re-enabled 'Settings' and it succeeded after a couple minutes as well. I verified this both in logs and by looking at my 'Preferences: Open Settings.json' which had been empty and was now populated from sync.'

Wild theory, something about the settings.json coming in first, before the extensions was blowing up VS trying to sync settings for extensions not installed... but this makes no real sense obviously, it shouldn't care about json config nodes for extensions that are not yet installed.

##Also, sidenote:

As a final step, I tried Re-enabling 'Key Bindings' (of which I have no special config afaik) and it may still be erroring out? It is according to the logs.

But leaving it with all sync settings enabled seemed to be working aside from some noise in the logs.

Seems like a bug of some sort here with the 'Sync Settings' feature, but I can't identify it well enough to report =(

like image 147
Joseph M. Deming Avatar answered Sep 08 '25 18:09

Joseph M. Deming


Make sure settings.json is empty, and try again. This worked for me!


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!