Auto re-login needs a very long time
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version:
Version: 1.84.2 Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e Date: 2023-11-09T10:52:57.054Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin arm64 23.1.0
- OS Version:
Apple M1 Max 64 GB Version 14.1 (23B74)
Steps to Reproduce:
- Restart vscode with all windows closed but dock light still on
- Or restart vscode with all process quited
The GitHub Account will auto re-login in 1 second, regardless of whether I'm using (enabled or disabled) Copilot. The Microsoft Account needs maybe 30 seconds to be active, before that, there is always a blue light on settings icon to remind me login to sync settings.
I am sure the network is good because if i manually re-login, microsoft web page is very fast. Full HTTP workflow:
- vscode Request an UUID
- Microsoft webpage opened in Chrome
- Chrome Download HTML from server
- Chrome Render HTML
- Login
- Chrome call vscode
In these steps, except the 1st, others are very fast.
I think we can do an alt way: remove the blue light on settings icon before it is really failed.
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 AuthenticationOutput channel -
GitHub AuthenticationOutput channel -
Log (Settings Sync)Output channel -
Log (Main)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)
GitHub Authentication:
2023-12-04 10:44:30.671 [info] Reading sessions from keychain...
2023-12-04 10:44:30.671 [info] Getting sessions for all scopes...
2023-12-04 10:44:30.671 [info] Getting sessions for read:user...
2023-12-04 10:44:30.671 [info] Getting sessions for user:email...
2023-12-04 10:44:30.671 [info] Getting sessions for all scopes...
2023-12-04 10:44:30.698 [info] Got stored sessions!
2023-12-04 10:44:30.698 [info] Got 1 verified sessions.
2023-12-04 10:44:30.698 [info] Got 1 sessions for ...
2023-12-04 10:44:30.698 [info] Got 1 sessions for read:user...
2023-12-04 10:44:30.698 [info] Got 0 sessions for user:email...
2023-12-04 10:44:30.698 [info] Got 1 sessions for ...
2023-12-04 10:44:30.777 [info] Getting sessions for read:user...
2023-12-04 10:44:30.778 [info] Got 1 sessions for read:user...
2023-12-04 10:44:31.756 [info] Getting sessions for user:email...
2023-12-04 10:44:31.756 [info] Got 0 sessions for user:email...
2023-12-04 10:44:31.757 [info] Getting sessions for read:user...
2023-12-04 10:44:31.757 [info] Got 1 sessions for read:user...
2023-12-04 10:44:31.758 [info] Getting sessions for user:email...
2023-12-04 10:44:31.759 [info] Got 0 sessions for user:email...
2023-12-04 10:44:31.759 [info] Getting sessions for read:user...
2023-12-04 10:44:31.759 [info] Got 1 sessions for read:user...
Microsoft Authentication: Cannot find this channel Log (Settings Sync):
2023-12-04 10:44:29.681 [info] Using settings sync service https://vscode-sync.trafficmanager.net/
2023-12-04 10:44:29.681 [info] Auto Sync is enabled.
2023-12-04 10:44:29.681 [info] Auto Sync: Suspended until auth token is available.
Log (Main):
2023-12-04 10:44:29.270 [info] update#setState idle
2023-12-04 10:44:59.188 [info] update#setState checking for updates
2023-12-04 10:45:00.146 [info] update#setState idle
Only if i click manually login to sync, Microsoft Authentication channel will appear. And the 1st floor of this issue, i said:
The Microsoft Account needs maybe 30 seconds to be active, before that, there is always a blue light on settings icon to remind me login to sync settings.
But actually, it is the best appearance, usually, it always needs my manual login.
After i manually login:
2023-12-04 10:48:09.931 [info] Getting sessions for all scopes...
2023-12-04 10:48:09.931 [info] Got 17 sessions for all scopes...
2023-12-04 10:48:09.933 [info] [email offline_access openid profile] Creating session
2023-12-04 10:50:04.151 [info] [email offline_access openid profile] '{{SOME_UUID_FOR_PRIVACY}}/1:live.com:{{SOME_ID_FOR_PRIVACY}}/{{SOME_UUID_FOR_PRIVACY}}' session successfully created!
2023-12-04 10:50:04.153 [info] [email offline_access openid profile] Getting sessions
2023-12-04 10:50:04.153 [info] [email offline_access openid profile] Got 18 sessions
Got {{nums}} sessions Nums become more and more after each time i restart whole vscode.
I may be can understand why (in the perspective of an end user), then, can i manually edit the saved auth file to edit which session to keep and which to forget?
The left window created before the right window
The Left is what i said:
The Microsoft Account needs maybe 30 seconds to be active, before that, there is always a blue light on settings icon to remind me login to sync settings.
The Right is what i said:
But actually, it is the best appearance, usually, it always needs my manual login.
Same with #issuecomment-1837772841 , two window of the same process, it still increasing
The fact that you have 20 sessions is so wrong... though it's not clear how you got into this state. Can you please sign out of your Microsoft via the account menu (the person icon) and then reload the window and then include these logs again?
After sign-out, it successfully fixed.
2023-12-05 15:09:07.403 [info] Getting sessions for all scopes...
2023-12-05 15:09:07.403 [info] Got 1 sessions for all scopes...
2023-12-05 15:09:07.404 [info] [email offline_access openid profile] Getting sessions
2023-12-05 15:09:07.404 [info] [email offline_access openid profile] Got 1 sessions
But as you say, i don't know how i entered this state too. Now i cannot reproduce it, how can you fix it as an issue? Only let people sign-out and re-login manually?
Some more addons: I installed OneDrive, 365 Suites and kept login. With no Apple keyChain Passwords and Fully using all parts of Google Chrome. Kept login to Microsoft Web in Chrome with "remember me". After sign-out in VSCode, OneDrive logged out too.
After login back in OneDrive and 365 Suites, VSCode doesn't reproduce this issue too.
It appears again, then i manually sign out to fix it:
2023-12-07 17:01:43.274 [info] Getting sessions for all scopes...
2023-12-07 17:01:43.274 [info] Got 1 sessions for all scopes...
2023-12-07 17:01:43.276 [info] [email offline_access openid profile] Getting sessions
2023-12-07 17:01:43.276 [info] [email offline_access openid profile] Got 1 sessions
2023-12-08 09:21:43.245 [info] Getting sessions for all scopes...
2023-12-08 09:21:43.245 [info] Got 1 sessions for all scopes...
2023-12-08 09:21:43.245 [info] [email offline_access openid profile] Getting sessions
2023-12-08 09:21:43.245 [info] [email offline_access openid profile] Got 1 sessions
2023-12-08 09:56:41.594 [info] [email offline_access openid profile] Creating session
2023-12-08 09:56:51.044 [info] [email offline_access openid profile] '{{HIDDEN_FOR_PRIVACY}}/1:live.com:{{HIDDEN_FOR_PRIVACY}}/{{HIDDEN_FOR_PRIVACY}}' session successfully created!
2023-12-08 09:56:51.048 [info] [email offline_access openid profile] Getting sessions
2023-12-08 09:56:51.048 [info] [email offline_access openid profile] Got 2 sessions
2023-12-08 09:57:18.598 [info] Getting sessions for all scopes...
2023-12-08 09:57:18.598 [info] Got 2 sessions for all scopes...
2023-12-08 09:57:21.243 [info] [email offline_access openid profile] '{{HIDDEN_FOR_PRIVACY}}/1:live.com:{{HIDDEN_FOR_PRIVACY}}/{{HIDDEN_FOR_PRIVACY}}' Logging out of session
2023-12-08 09:57:21.243 [info] [email offline_access openid profile] '{{HIDDEN_FOR_PRIVACY}}/1:live.com:{{HIDDEN_FOR_PRIVACY}}/{{HIDDEN_FOR_PRIVACY}}' Logged out of session successfully!
2023-12-08 09:57:21.243 [info] [email offline_access openid profile] '{{HIDDEN_FOR_PRIVACY}}/1:live.com:{{HIDDEN_FOR_PRIVACY}}/{{HIDDEN_FOR_PRIVACY}}' Logging out of session
2023-12-08 09:57:21.263 [info] [email offline_access openid profile] '{{HIDDEN_FOR_PRIVACY}}/1:live.com:{{HIDDEN_FOR_PRIVACY}}/{{HIDDEN_FOR_PRIVACY}}' Logged out of session successfully!
2023-12-08 09:57:21.263 [info] [email offline_access openid profile] Getting sessions
2023-12-08 09:57:21.263 [info] [email offline_access openid profile] Got 0 sessions
2023-12-08 09:57:24.200 [info] [email offline_access openid profile] Creating session
2023-12-08 09:57:30.362 [info] [email offline_access openid profile] '{{HIDDEN_FOR_PRIVACY}}/1:live.com:{{HIDDEN_FOR_PRIVACY}}/{{HIDDEN_FOR_PRIVACY}}' session successfully created!
2023-12-08 09:57:30.399 [info] [email offline_access openid profile] Getting sessions
2023-12-08 09:57:30.399 [info] [email offline_access openid profile] Got 1 sessions
It appears again
what is it that appears? Can you send a screenshot?
@jyxjjj I don't think you have the important DEBUG logs turned on. Can you confirm:
- 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...
- Share those logs again
@jyxjjj I don't think you have the important DEBUG logs turned on. Can you confirm:
Open the Command Palette
Run the
Developer: Set Log Level...commandTo the right of
Trace, click the double check mark button. ✔️ ✔️ (enables trace logging as the default)Wait for the issue to happen...
Share those logs again
Yes, I was confused too, i am sure I turned trace log on, but it only shows info, whatever i restart it how many times.
@jyxjjj if you do it right, you should see a Check mark next to Trace after restarting VS Code:
I didn't see any trace log even i can see this check mark. i am sure those logs above are copied after here has a check mark.
@sandy081 do you know why might my trace logs statements aren't showing up in the Output even though the user has Trace enabled?
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
After once system upgrade, i found a new logic:
- When VSCode started, Microsoft Authentication Plugin has not been activated, (i don't know if it is a plugin or feature.) Then the blue light was there on settings(people) icon.
- The log output window has no Microsoft Authentication Channel.
- Last time, "got 1 session".
- Click the login menu, now appeared "got 2 sessions".
Before 4, i fully quit VSCode for 5 times and restart, step 1, 2 still here. Before system upgrade, (maybe due to reboot?):
- Connect to a remote environment via SSH.
- Close WiFi(by sleep the mac).
- Recover the mac network.
- Didn't click the "Reload Window" Button. (DON'T CLICK)
- Reboot via System Upgrade.
And, system upgrade is maybe one of the way to reproduce it, i am not sure if there is other way to.
@TylerLeonhardt Please check what log level is configured for your extension, may be it is overriden?
I think i found how to reproduce?
But why it didn't activate automatically?
I totally found the trace log on my friend's installation.
I think it has no difference with i submitted above.
Because after [info] Got 1 sessions for all scopes... it doesn't give any more.
Read stored session
Queued refreshing token
Refreshing token
Attempting to parse token response.
Token response parsed successfully.
Setting refresh timeout for 2801333.333333333 milliseconds
Setting token
Token refresh success
Stored token
It seems like a correct thing.
Then i found this screenshot, It seems logged successfully, but the blue light didn't disappear.
Oh yeah the screenshot is not completely , there was a GitHub account above the first line.
Hi @jyxjjj sorry for the delay here... have you still been seeing this issue?
Hi @jyxjjj sorry for the delay here... have you still been seeing this issue?
@TylerLeonhardt Yes, I have even give up🤷♂️
Sorry to hear that, @jyxjjj. I would love to get to the bottom of this if you are willing to help me out. I'd like to understand if you're still seeing the Microsoft Account not activating or if you're having the issue with the ever increasing number of sessions.
@TylerLeonhardt yeah, and still due to the plugin did not automatic load.
It is enabled but still not loaded automatically.
Could you please check the difference between it and GitHub's one?
And when i click Sign in to Sync Settings (1), #issuecomment-1837756557 continues.
I don't know how to continue to check this issue at all.