Vscode: Error while starting Sync: failed because of Unauthorized (401).

Created on 27 May 2020  路  8Comments  路  Source: microsoft/vscode

VSCode sync was working fine, until all of a sudden one time it popped up and said something about the sync being too large, and that it had automatically disabled sync :frowning:

When I tried to re-enable sync, I found that there was no way that I could

  • VSCode Version: 1.46.0-insider
  • OS Version: Fedora 31

Steps to Reproduce:

  1. Sign out of VSCode
  2. Click turn on preferences sync, sign in, then sign in with GitHub

This error appears:

Error while starting Sync: Request 'https://vscode-sync.trafficmanager.net/v1/manifest' failed because of Unauthorized (401).

The same error still appears after trying to enable preferences sync a different way, by signing in with github and _then_ trying to enable preferences sync as separate steps.

I even uninstalled and reinstalled, and removed ~/.config/Code - Insiders and ~/.vscode-insiders, and the issue still existed!!! Also somehow I stayed signed in to vscode after all that, how does that work? Where is the signed-in account stored, I'd like to clear that out.

I have _no idea_ what sudden change there was that caused this to break. I really really wish that I could clear out the place where vscode stores account information. It seems really messed up that after uninstalling and removing both of those folders that I stayed signed in, and I suspect that that is related to what is causing this issue


Does this issue occur when all extensions are disabled?: Yes

*duplicate

Most helpful comment

Getting this too on the latest insiders. Signing in with a Microsoft account works.

All 8 comments

TL;DR where does vscode store account information? If I know where that is, clearing that out may fix my issue (just a hunch)

I noticed that it works when I sign into microsoft with my github account:

  • In the sign in options in VSCode _don't_ click "github", click microsoft
  • In the microsoft login page put in your github email
  • Then it tries to sign in with github, click "email me a code"
  • Then put in the code, and it will sign in with github

That process works for me for some reason

Getting this too on the latest insiders. Signing in with a Microsoft account works.

Getting this too on the latest insiders. Signing in with a Microsoft account works.

Got this in insider too, with github account

this appears to have hit me also but apparently due to frequency of requests

Version: 1.46.0-insider
Commit: b26e0bcf39c1b8faaf770265391b5a387d1d9172
Date: 2020-05-26T17:07:53.549Z
Electron: 8.3.0
Chrome: 80.0.3987.165
Node.js: 12.13.0
V8: 8.0.426.27-electron.0
OS: Darwin x64 19.5.0

VSCode appears to have been attempting to sync every few hundred milliseconds and based on the message it appears some rate limiting kicked in and disabled my accounts sync authorization.

Note - all this occurred while the laptop closed overnight (it should have been asleep). Based on the attached log is looks like the sync interval decreased from every several 10s of seconds down to eventually attempting to sync every 200ms - surprised it took at as long as it did to turn off

userDataSync.Log

Any remediation to re-enable my account for sync once the issue is resolved?

/duplicate

Sorry for this and we are currently working on it #98625

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shanalikhan picture shanalikhan  路  3Comments

NikosEfthias picture NikosEfthias  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

curtw picture curtw  路  3Comments

borekb picture borekb  路  3Comments