vscode: Settings sync stopped working after latest update Request ... failed because of Unauthorized (401)

Issue Type: Bug

I use Settings sync with Microsoft account. Everything worked fine previously, however few hours ago I started to receive notification that sync is suspended.

I tried to turn in on - same message. Signed out and signed in to Microsoft account - same error.

Notification:

Settings sync is suspended because of successive authorization failures. Please sign in again to continue synchronizing
Output: Log (Settings Sync)
[2021-01-13 00:21:34.793] [userDataSync] [info] Auto Sync: Started
[2021-01-13 00:21:34.793] [userDataSync] [info] Auto Sync: Triggered by Interval
[2021-01-13 00:21:34.859] [userDataSync] [info] Request failed {"url":"https://vscode-sync-insiders.trafficmanager.net/v1/manifest","status":401,"execution-id":"2b49b00f-ce1b-44eb-b42e-4c2c13aa02bf","operation-id":"7aa0ef42a17f4c849e57d933cf86705c"}
[2021-01-13 00:21:34.859] [userDataSync] [info] Auto Sync: Suspended until auth token is available.
[2021-01-13 00:21:34.859] [userDataSync] [info] Auto sync: Cancelled sync that is in progress
[2021-01-13 00:21:34.859] [userDataSync] [info] Auto Sync: Stopped
[2021-01-13 00:21:34.859] [userDataSync] [error] Unauthorized (UserDataSyncError) syncResource:unknown operationId:7aa0ef42a17f4c849e57d933cf86705c: Request 'https://vscode-sync-insiders.trafficmanager.net/v1/manifest' failed because of Unauthorized (401).
    at y.request (file:///C:/Users/andrii_dieiev/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:172458)
    at async y.manifest (file:///C:/Users/andrii_dieiev/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:170190)
    at async s.createSyncTask (file:///C:/Users/andrii_dieiev/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:150531)
    at async t.doSync (file:///C:/Users/andrii_dieiev/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:145159)
[2021-01-13 00:28:05.650] [userDataSync] [info] Auto Sync: Started
[2021-01-13 00:28:05.650] [userDataSync] [info] Auto Sync: Triggered by Interval
[2021-01-13 00:28:05.976] [userDataSync] [info] Request failed {"url":"https://vscode-sync-insiders.trafficmanager.net/v1/manifest","status":401,"execution-id":"6e5a00f1-7917-4d0e-beac-46a11dfaecbe","operation-id":"8bf208c9b8464eb6b2be8c2ea64bffd6"}
[2021-01-13 00:28:05.976] [userDataSync] [info] Auto Sync: Suspended until auth token is available.
[2021-01-13 00:28:05.976] [userDataSync] [info] Auto sync: Cancelled sync that is in progress
[2021-01-13 00:28:05.976] [userDataSync] [info] Auto Sync: Stopped
[2021-01-13 00:28:05.976] [userDataSync] [error] Unauthorized (UserDataSyncError) syncResource:unknown operationId:8bf208c9b8464eb6b2be8c2ea64bffd6: Request 'https://vscode-sync-insiders.trafficmanager.net/v1/manifest' failed because of Unauthorized (401).
    at y.request (file:///C:/Users/andrii_dieiev/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:172458)
    at async y.manifest (file:///C:/Users/andrii_dieiev/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:170190)
    at async s.createSyncTask (file:///C:/Users/andrii_dieiev/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:150531)
    at async t.doSync (file:///C:/Users/andrii_dieiev/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:145159)
Output: Microsoft Authentication

timestamps looks off by 2 hours, but are recent

[Info  - 22:19:30.600] Refreshing token...
[Info  - 22:19:31.256] Token refresh success
[Info  - 22:19:31.269] Token available from cache, expires in 3598987 milliseconds
[Info  - 22:19:31.282] Token available from cache, expires in 3598974 milliseconds
[Info  - 22:19:48.450] Token available from cache, expires in 3581806 milliseconds
[Info  - 22:19:53.751] Token available from cache, expires in 3576505 milliseconds
[Info  - 22:19:55.462] Token available from cache, expires in 3574794 milliseconds
[Info  - 22:19:55.851] Token available from cache, expires in 3574405 milliseconds
[Info  - 22:19:55.924] Token available from cache, expires in 3574332 milliseconds
[Info  - 22:20:03.973] Token available from cache, expires in 3566283 milliseconds
[Info  - 22:20:09.782] Logging out of session 'f8cdef31-a31e-<redacted>/1:live.com:0003BF<redacted>/761b7ba9-<redacted>'
[Info  - 22:20:19.288] Logging in...
[Info  - 22:21:34.417] Exchanging login code for token
[Info  - 22:21:34.787] Exchanging login code for token success
[Info  - 22:21:34.789] Login successful
[Info  - 22:21:34.789] Token available from cache, expires in 3598998 milliseconds
[Info  - 22:21:34.791] Token available from cache, expires in 3598996 milliseconds
[Info  - 22:21:34.791] Token available from cache, expires in 3598996 milliseconds
[Info  - 22:21:34.791] Token available from cache, expires in 3598996 milliseconds
[Info  - 22:21:34.860] Token available from cache, expires in 3598927 milliseconds
[Info  - 22:27:58.781] Token available from cache, expires in 3215006 milliseconds
[Info  - 22:28:03.394] Token available from cache, expires in 3210393 milliseconds
[Info  - 22:28:05.648] Token available from cache, expires in 3208139 milliseconds
[Info  - 22:28:05.977] Token available from cache, expires in 3207810 milliseconds
[Info  - 22:37:52.257] Token available from cache, expires in 2621530 milliseconds
[Info  - 22:37:54.106] Token available from cache, expires in 2619681 milliseconds
[Info  - 22:37:54.390] Token available from cache, expires in 2619397 milliseconds
[Info  - 22:38:47.637] Token available from cache, expires in 2566150 milliseconds
[Info  - 22:38:51.974] Token available from cache, expires in 2561813 milliseconds
[Info  - 22:38:52.49] Token available from cache, expires in 2561738 milliseconds

VS Code version: Code - Insiders 1.53.0-insider (e17aea136d32fdb06d9b32184b04ccd36bb51e9c, 2021-01-12T08:23:24.929Z) OS version: Windows_NT x64 10.0.19041

System Info
Item Value
CPUs Intel® Core™ i7-8700 CPU @ 3.20GHz (12 x 3192)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.72GB (16.86GB free)
Process Argv –crash-reporter-id cf52dbde-2c94-45c3-9bf3-45d8b9966b04
Screen Reader no
VM 0%
Extensions (26)
Extension Author (truncated) Version
vscode-css-modules and 1.2.3
markdown-preview-github-styles bie 0.1.6
vscode-css-modules cli 0.2.3
bracket-pair-colorizer-2 Coe 0.2.0
vscode-svgviewer css 2.0.0
vscode-eslint dba 2.1.14
gitlens eam 11.1.3
toggle-excluded-files eam 1.7.0
EditorConfig Edi 0.16.4
LogFileHighlighter emi 2.10.0
vscode-pull-request-github-insiders Git 2021.1.16382
vscode-test-explorer hbe 2.19.4
rest-client hum 0.24.4
vscode-peacock joh 3.9.1
remote-ssh ms- 0.62.0
remote-ssh-edit ms- 0.62.0
remote-wsl ms- 0.52.0
azure-account ms- 0.9.4
hexeditor ms- 1.3.0
js-debug-nightly ms- 2021.1.817
debugger-for-edge msj 1.0.15
material-icon-theme PKi 4.5.0
copy-relative-path-posix rss 0.0.4
vscode-jest-test-adapter rtb 0.2.0
quokka-vscode Wal 1.0.335
markdown-pdf yza 1.4.4
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
openlogontheside:30221882
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30208930
wsl2prompt:30219162
vstry914:30244316
pythonvsdeb440:30224570
unusedpromptcf:30219165
folderexplorer:30219166
openfilemenu:30219168
pythonvsded773:30223139
core-portspanelcf:30233468

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 31
  • Comments: 39 (8 by maintainers)

Most upvoted comments

We have rolled out a configuration change across all regions to mitigate the issue. I have validated that I was able to enable settings sync after signing in with my Microsoft account in the stable version of VS Code. Everyone impacted, could please sign out/sign in and try to enable settings sync and let me know if you are still seeing the error. Apologies for the inconvenience.

Since we have not received any new reports after we have rolled out the configuration change to mitigate the problem, I will go ahead and close this issue. We have reviewed the service code/telemetry and will make some immediate improvements to both the service, and our monitoring system to make sure that such issues do not occur in the future and in case it does, it is timely detected. Apologies for the inconvenience.

Works for me now! TY @lszomoru 😃

It is working for me now.

Seems to work now after signing out and in again. Cheers

@lszomoru now it works on same PC that initial report was from. Thanks! 🎉 Version: 1.53.0-insider (user setup) Commit: e17aea136d32fdb06d9b32184b04ccd36bb51e9c Date: 2021-01-12T08:23:24.929Z OS: Windows_NT x64 10.0.19041

Should I close this one or it should stay open for situation monitoring?

It works for me too. Thanks!