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

After upgrading to 1.95.0, I am logged out of Settings Sync and cannot log in #232516

Closed
kaiyoma opened this issue Oct 29, 2024 · 93 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release settings-sync verified Verification succeeded

Comments

@kaiyoma
Copy link

kaiyoma commented Oct 29, 2024

Type: Bug

After upgrading, I am now seeing a badge on my user profile button, and it says I'm logged out (which I didn't do myself). If I click "Sign in to Sync Settings", nothing seems to happen.

Edit: I was finally able to get the sign-in page to load, and I authenticated successfully, but I'm still seeing the (1) badge on my profile button.

EDIT BY MAINTAINERS: HERE IS A WORKAROUND (YOU MAY NEED TO REPEAT THESES STEPS A FEW TIMES)

VS Code version: Code 1.95.0 (912bb68, 2024-10-28T20:16:24.561Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 2995)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.71GB (5.67GB free)
Process Argv --crash-reporter-id 4c14e0ab-6323-4be2-8ea1-b8ae8d1b35aa
Screen Reader no
VM 0%
Extensions (10)
Extension Author (truncated) Version
copy-relative-path ale 0.0.2
turbo-console-log Cha 2.10.5
githistory don 0.6.20
prettier-vscode esb 11.0.0
gc-excelviewer Gra 4.2.62
jenkins-declarative-support jmM 0.1.0
code-groovy mar 0.1.2
better-folding Moh 0.5.1
color-highlight nau 2.8.0
material-icon-theme PKi 5.12.0

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
jg8ic977:31013176
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
wkspc-ranged-t:31151552
cf971741:31144450
iacca2:31156134
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31164048

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Oct 29, 2024

Do you use GitHub or Microsoft auth with Settings Sync?

Can you follow these steps so that we can get more information on what's going on?

  • Open the Command Palette
  • Run the Developer: Set Log Level... command
  • To the right of Trace, click the double check mark button. ✔️ ✔️ (enables trace logging as the default)
  • Wait for the issue to happen...
  • Open the Output pane (ctrl+shift+u I think on Windows)
  • drop in this issue he contents of the following:
    • Microsoft Authentication or GitHub Authentication Output channel
    • Log (Settings Sync) Output channel
    • Log (Window) Output channel
  • Open the Command Palette
  • Run the Developer: Set Log Level... command
  • To the right of Info, click the double check mark button. ✔️ ✔️ (to set the default back to info)

@TylerLeonhardt TylerLeonhardt added info-needed Issue requires more information from poster and removed new release labels Oct 29, 2024
@kaiyoma
Copy link
Author

kaiyoma commented Oct 29, 2024

There's nothing in the Output pane when I try these steps:

vscode-sign-in.mp4

It seems to "think" I'm authenticated, but then it still shows the (1) badge.

@TylerLeonhardt
Copy link
Member

So are you trying to use GitHub then?

Also, what does the dropdown in the Output pane say?

@kaiyoma
Copy link
Author

kaiyoma commented Oct 29, 2024

So are you trying to use GitHub then?

Yes, I'm authenticating through GitHub.

Also, what does the dropdown in the Output pane say?

Image
Image

@TylerLeonhardt
Copy link
Member

So there's nothing in the Settings Sync Output?

And what about GitHub Authentication and Main?

@kaiyoma
Copy link
Author

kaiyoma commented Oct 29, 2024

This is all I see under "Settings Sync", even after trying to sign in multiple times:

2024-10-29 16:09:42.385 [info] Using settings sync service https://vscode-sync.trafficmanager.net/
2024-10-29 16:09:42.385 [info] Auto Sync is enabled.
2024-10-29 16:09:42.386 [info] Auto Sync: Suspended until auth token is available.

Nothing relevant under "GitHub" or "Main".

@TylerLeonhardt
Copy link
Member

If you sign out of your GitHub account and sign in again, does anything happen?

Image

@TylerLeonhardt
Copy link
Member

@sandy081 any thoughts? SteVen was talking to me about a similar issue yesterday.

@kaiyoma
Copy link
Author

kaiyoma commented Oct 30, 2024

@TylerLeonhardt I'm already signed out. Attempting to sign in doesn't seem to do anything (no trace messages, no authentication web page, no activity of any kind).

@kaiyoma
Copy link
Author

kaiyoma commented Oct 30, 2024

Here's a screencast of what I'm seeing: https://www.youtube.com/watch?v=HgiSn-rrvic

@TylerLeonhardt
Copy link
Member

That's very helpful to understand what you're seeing. Thanks! @sandy081 looks like auth isn't getting called by Settings Sync, can you chime in here?

@WangJincheng4869
Copy link

After updating the new version, clicking the login button does not respond, and the browser cannot be called to complete the login.

@TylerLeonhardt
Copy link
Member

If you downgrade to 1.94 does that work again?
https://code.visualstudio.com/updates/v1_94

@kands-code
Copy link

I'm having a similar problem, I can log in fine, but when I close the VSCode and then reopen it, VSCode says I'm logged out and need to log in again. I sync via my GitHub account.

@kands-code
Copy link

I have two devices, logged into the same account, and I've noticed that when I log in on one device account, the account on the other device logs out and needs to be logged in again when I close VSCode and then reopen it.

However, it cannot be reliably reproduced, and I am unsure of what is causing it.

@zhanxiaoge
Copy link

I encountered this issue after updating today as well. After logging in successfully, it keeps reverting to logged out after a while. I have rolled back to version 1.94.2.

@supergoku1028
Copy link

I'm having a similar problem, I can log in fine, but when I close the VSCode and then reopen it, VSCode says I'm logged out and need to log in again. I sync via my GitHub account.

i have this problem too.

@ghost
Copy link

ghost commented Oct 30, 2024

+1 On this issue. I sign in using my Microsoft account.

Then I Go to a terminal to a directory open it up in code which opens up a new session, it says I need to sign in again to do the sync.

I am more than happy to provide you debug logs if you haven't got them already from users in this issue.

@NoahELE
Copy link

NoahELE commented Oct 30, 2024

I have similar problems, but using the command Developer: Reload Window seems to resolve this.

If I close and reopen VSCode, the Accounts icon menu will say Sign in to Sync Settings. However, reload instead of reopen VSCode makes the sync work again.

@toymil
Copy link

toymil commented Oct 30, 2024

I was having this problem minutes ago, but it just resolved itself after I close and reopen vscode for about 5 times ... What???

nvm, the login state will drop after a while.

@ghost
Copy link

ghost commented Oct 30, 2024

I have similar problems, but using the command Developer: Reload Window seems to resolve this.

If I close and reopen VSCode, the Accounts icon menu will say Sign in to Sync Settings. However, reload instead of reopen VSCode makes the sync work again.

Yep, this somehow fixes the issue.

@TylerLeonhardt
Copy link
Member

Talked over this with @sandy081 a bit... our suspicion is that Settings Sync is timing out waiting for auth to be available. The auth comes from the Extension Host... so the machine is slowed down for any reason or if the ExtHost is slowed down for any reason (some heavy extension, for example), then perhaps that is timing out.

This is supported by Developer: Reload Window resolving this - essentially rolling the dice again.

Now, we need your help to narrow down the issue... so I have a couple questions:

  1. How many accounts are you logged into in VS Code? (Open the Account menu and tell me how many you see at the top of the menu)
  2. We don't have any repro steps that put us into this bad state besides "it just sort of happens" so if you do find some pattern for when this happens, please let us know!
  3. Can you follow these steps so that we can get more information on what's going on?
    • Open the Command Palette (cmd/ctrl+shift+p)
    • Run the Developer: Set Log Level... command
    • To the right of Trace, click the double check mark button. ✔️ ✔️ (enables trace logging as the default)
    • Open the Output pane (ctrl+shift+u I think on Windows) and click on the dropdown on the right
    • drop in this issue he contents of the following:
      • Window Output channel
      • Extension Host Output channel

@sandy081 will take a look at this deeper tomorrow morning, but in the meantime the workaround is to:

  • Open the Command Palette (cmd/ctrl+shift+p)
  • Run Developer: Reload Window until things work again

(I'll include this in the original issue for users to find it)

@vs-code-engineering vs-code-engineering bot removed the info-needed Issue requires more information from poster label Oct 30, 2024
@TylerLeonhardt TylerLeonhardt added bug Issue identified by VS Code Team member as probable bug settings-sync labels Oct 30, 2024
@sandy081
Copy link
Member

@RokeJulianLockhart

This comment has been minimized.

@sandy081
Copy link
Member

This is a personal testing build and not an official release. Please use the build specific to your platform from the comment and test the bug and let me know if it is fixed so that we can release the fix in official build.

@bruno-ribeiro-mck
Copy link

After installing the test build I'm no longer facing the issue which was reproing pretty much 100% of the time for me. Closed and reopened the application multiple times and did a few reloads and everything worked as expected. (1) badge quickly flashes but then disappears and settings sync is on.

@ziyouchutuwenwu
Copy link

i tried [linux-x64] build, it seems to be ok,

@hellorayza
Copy link

john-ray@john-ray-pc:~$ snap install ./下载/code-stable-x64-1731324196.snap 
错误:cannot find signatures with metadata for snap
         "./下载/code-stable-x64-1731324196.snap"

after install debx64 and login Inside version the console output window print:
and standard version sutck in [info] [perf] Render performance baseline is 23ms.
Both of them I tried to reopen and relogin , however profiles and plugins not come back.

2024-11-12 09:32:45.762 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.python' wants API proposal 'contribIssueReporter' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2024-11-12 09:32:45.762 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.debugpy' wants API proposal 'contribIssueReporter' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2024-11-12 09:32:45.987 [info] Started local extension host with pid 175797.
2024-11-12 09:32:46.295 [info] Settings Sync: Updating due to initialize
2024-11-12 09:32:46.295 [info] Settings Sync: Updating authentication providers. Authentication Providers from store: [{"id":"github","scopes":["user:email"]},{"id":"microsoft","scopes":["openid","profile","email","offline_access"]}]
2024-11-12 09:32:46.295 [info] Settings Sync: Authentication providers updated ["github","microsoft"]
2024-11-12 09:32:46.295 [info] Settings Sync: Updating the current account
2024-11-12 09:32:46.295 [info] Settings Sync: Updating the current account using current session dd9ac135ad84bff4 github ["github"]
2024-11-12 09:32:46.586 [info] Settings Sync: Updated the current account hellorayza
2024-11-12 09:32:46.586 [info] Settings Sync: Updating the token for the account hellorayza
2024-11-12 09:32:46.586 [info] Settings Sync: Token updated for the account hellorayza
2024-11-12 09:32:46.587 [info] Settings Sync: Updating the account status to available
2024-11-12 09:32:46.587 [info] Settings Sync: Account status changed from unavailable to available
2024-11-12 09:32:48.772 [info] [perf] Render performance baseline is 23ms
2024-11-12 09:41:43.832 [error] TreeError [DebugRepl] Tree input not set: Error: TreeError [DebugRepl] Tree input not set
    at Xd.B (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:417:28286)
    at Xd.updateChildren (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:417:28193)
    at SZ.value (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2020:35518)
    at x.B (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:30:747)
    at x.C (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:30:817)
    at x.fire (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:30:1034)
    at gme.setVisible (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:533:2801)
    at vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:615:11845
    at Array.map (<anonymous>)
    at eh.setVisible (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:615:11836)


@cmmata
Copy link

cmmata commented Nov 12, 2024

I have just installed linux-deb-x64, and settings sync is back again. But profiles continue to be missing.

@sandy081
Copy link
Member

But profiles continue to be missing.

@cmmata This seems to be a different issue. Can you please file new issue for that with necessary steps to reproduce.

@sandy081
Copy link
Member

Thanks for the confirmation. We will be releasing another recovery in couple of days with this fix.

sandy081 added a commit that referenced this issue Nov 12, 2024
@cmmata
Copy link

cmmata commented Nov 12, 2024

But profiles continue to be missing.

@cmmata This seems to be a different issue. Can you please file new issue for that with necessary steps to reproduce.

@sandy081 I can create a new issue if that helps, of course. But I see that this is already commented on this issue:

Happy to help creating a new issue, but I think we missed profiles due to the settings sync bug. At least, I had settings sync and profiles working past week, and after updating VSCode I lost both features at the same time.

Do you think it's better to create a new one with a fresh context anyway?

@sandy081
Copy link
Member

This bug is about Settings Sync not getting started and therefore no data gets synced. Once settings sync has started sync should work. If you do not see data is getting synced then this is a separate issue. I would recommend to use the above build and reproduce the problem and file a new issue with following data

  • Steps to Repro
  • Settings Sync Log.

@rzhao271 rzhao271 added the verified Verification succeeded label Nov 13, 2024
@martenson
Copy link

first, the workaround with window reload worked, thanks!

We don't have any repro steps that put us into this bad state besides "it just sort of happens" so if you do find some pattern for when this happens, please let us know!

new laptop, second thing after browser to install was vscode, and the sync was not available telling me there are "no auth providers"

@sandy081
Copy link
Member

@martenson Can you please try the the build shared here and let us know if it worked?

@martenson
Copy link

martenson commented Nov 13, 2024

@sandy081 that seems to work better 👍, it defaults to auth using github (not giving me a choice) -- unclear to me if that is due to me being unable to clear vscode's prefs properly from the default channel or for a different reason

@TylerLeonhardt
Copy link
Member

@martenson I think you may want to look at this section of the docs for switching accounts with Settings Sync: https://code.visualstudio.com/docs/editor/settings-sync#_switching-accounts

@dmke
Copy link

dmke commented Nov 14, 2024

Another tidbit:

I was observing the following error (Code 1.95.2):

2024-11-14 10:19:40.695 [trace] Keybindings: Merging remote keybindings with local keybindings...
2024-11-14 10:19:40.697 [error] TypeError: Cannot read properties of null (reading '0')
    at Mh (file:///usr/share/code/resources/app/out/vs/code/electron-utility/sharedProcess/sharedProcessMain.js:98:76718)
    at Tg (file:///usr/share/code/resources/app/out/vs/code/electron-utility/sharedProcess/sharedProcessMain.js:98:74237)
    at async zh.qb (file:///usr/share/code/resources/app/out/vs/code/electron-utility/sharedProcess/sharedProcessMain.js:98:79653)
    at async zh.eb (file:///usr/share/code/resources/app/out/vs/code/electron-utility/sharedProcess/sharedProcessMain.js:98:38185)
2024-11-14 10:19:40.697 [error] keybindings: Cannot read properties of null (reading '0')

This was caused by the following entry in my keybindings.json:

{ "key": "f5", "command": null, "when": "!inDebugMode" },

Changing it to the following solved the issue for me:

{ "key": "f5", "command": "", "when": "!inDebugMode" },

@sandy081
Copy link
Member

@dmke Please file a separate issue for that

@dmke
Copy link

dmke commented Nov 14, 2024

@sandy081, there's no issue anymore. This solved the "I am logged out of Settings Sync and cannot log in" problem described in this issue.

@bpasero bpasero unpinned this issue Nov 15, 2024
@CompactProducer
Copy link

@sandy081, there's no issue anymore. This solved the "I am logged out of Settings Sync and cannot log in" problem described in this issue.

I no longer see this issue. I'm glad that it's been fixed.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release settings-sync verified Verification succeeded
Projects
None yet
Development

No branches or pull requests