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

No authentication provider 'microsoft' is currently registered #106321

Closed
carlocardella opened this issue Sep 9, 2020 · 18 comments
Closed

No authentication provider 'microsoft' is currently registered #106321

carlocardella opened this issue Sep 9, 2020 · 18 comments
Assignees
Labels
authentication Issues with the Authentication platform author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded

Comments

@carlocardella
Copy link
Member

Version: 1.49.0-insider (user setup)
Commit: e4256dd1a02339bb1d56647ecd9134bf38bc7c03
Date: 2020-09-04T18:49:12.955Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Steps to Reproduce:

  • This is happening only on one machine (details above) with the latest Insiders
  • The Stable version works fine, settings sync included
  • The same Insiders version works fine on other machines

I see this:

image

Troubleshooting done so far:

  • Started using --disable-extensions
  • Started using --log trace hoping to find more details in the logs
  • Completely removed Insiders
    • deleted C:\Users\carloc\AppData\Local\Programs\Microsoft VS Code Insiders
    • deleted C:\Users\carloc\.vscode-insiders
    • deleted C:\Users\carloc\AppData\Roaming\Code - Insiders
  • Reinstalled Insiders using the latest x64 msi (downloaded today), no other extensions installed

The devtools console shows this:

log.ts:197   ERR No authentication provider 'microsoft' is currently registered.: Error: No authentication provider 'microsoft' is currently registered.
    at E.getSessions (file:///C:/Users/carloc/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:4407:7)
    at async e.getAccounts (file:///C:/Users/carloc/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:6019:534)
    at async e.update (file:///C:/Users/carloc/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:6019:334)
    at async e.initialize (file:///C:/Users/carloc/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:6018:345)
    at async e.waitAndInitialize (file:///C:/Users/carloc/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:6017:711)
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/semver-umd.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/index.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/ExperimentationService.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/TasApiFeatureProvider.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/FilteredFeatureProvider.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/BaseFeatureProvider.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/AxiosHttpClient.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/ExperimentationServiceAutoPolling.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/ExperimentationServiceBase.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/MemoryKeyValueStorage.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/PollingService.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/carloc/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/code/electron-browser/workbench/main.js.map: 

Seems clear the problem is with this specific installation/machine, but I've not been able to figure out what is wrong.
Interestingly, this Insiders instance was working file last Friday, when I left the machine running untouched through the long weekend and this morning I found it as described.

What else can I try?

@vscodebot
Copy link

vscodebot bot commented Sep 9, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@carlocardella
Copy link
Member Author

The SourceMap error does not bug me, I didn't even notice it before looking at the devtools console.
What I care about is the missing authentication provider: with that error I simply cannot enable settings sync, not even using Github (which works fine to authenticate the RP Extension)

@RMacfarlane
Copy link
Contributor

@carlocardella Can you copy-paste the logs from the output panel with "Microsoft Authentication" selected? This message is shown when trying to refresh the token repeatedly fails, so there is not valid authentication information available. Has anything changed about your network on the machine that shows this?

@carlocardella
Copy link
Member Author

No networking changes that I am aware of, and the Stable release on this same machine works fine, the problem is only with Insiders.

Here's the output from Insiders:

[Info  - 14:20:49.556] Refreshing token...
[Error  - 14:20:49.810] Refreshing token failed
[Error  - 14:20:49.810] Refreshing token failed
[Info  - 14:20:54.813] Refreshing token...
[Error  - 14:20:55.150] Refreshing token failed
[Error  - 14:20:55.150] Refreshing token failed
[Info  - 14:21:15.165] Refreshing token...
[Error  - 14:21:15.415] Refreshing token failed
[Error  - 14:21:15.415] Refreshing token failed
[Error  - 14:21:15.415] Token refresh failed after 3 attempts
[Info  - 14:21:15.416] Token expired or unavailable, trying refresh
[Info  - 14:21:15.416] Refreshing token...
[Error  - 14:21:15.765] Refreshing token failed
[Error  - 14:21:15.765] Refreshing token failed
[Info  - 14:21:15.767] Token expired or unavailable, trying refresh
[Info  - 14:21:15.767] Refreshing token...
[Error  - 14:21:16.148] Refreshing token failed
[Error  - 14:21:16.148] Refreshing token failed
[Info  - 14:21:21.107] Token expired or unavailable, trying refresh
[Info  - 14:21:21.107] Refreshing token...
[Error  - 14:21:21.359] Refreshing token failed
[Error  - 14:21:21.359] Refreshing token failed
[Info  - 14:51:15.422] Refreshing token...
[Error  - 14:51:15.693] Refreshing token failed
[Error  - 14:51:15.693] Refreshing token failed

This is from Stable on the same machine:

[Info  - 13:16:46.934] Refreshing token...
[Info  - 13:16:47.302] Token refresh success
[Info  - 13:16:47.305] Token available from cache, expires in 3598997 milliseconds
[Info  - 13:16:47.305] Token available from cache, expires in 3598997 milliseconds
[Info  - 14:16:16.289] Refreshing token...
[Info  - 14:16:16.571] Token refresh success
[Info  - 14:16:16.574] Token available from cache, expires in 3598997 milliseconds
[Info  - 14:16:16.574] Token available from cache, expires in 3598997 milliseconds
[Info  - 15:12:58.121] Token available from cache, expires in 197450 milliseconds
[Info  - 15:15:45.557] Refreshing token...
[Info  - 15:15:45.751] Token refresh success
[Info  - 15:15:45.754] Token available from cache, expires in 3598996 milliseconds
[Info  - 15:15:45.754] Token available from cache, expires in 3598996 milliseconds

@cabemo
Copy link

cabemo commented Sep 13, 2020

I was having the same problem for github (i.e. No authentication provider 'github' is currently registered). I was installing the snap package. I removed it and installed the .deb package and works fine with both microsoft and github providers. Hope it helps.

@carlocardella
Copy link
Member Author

Thanks, that's interesting to know, unfortunately my problem is on Windows and with a fresh install, no additional extensions, I just run the MSI and launch vscode insiders right after that, no third party extension can cause this as there is none installed

@carlocardella
Copy link
Member Author

I investigated this further, I compared a working instance (Stable) and this broken one (Insiders): both issue a POST to https://login.microsoftonline.com/organizations/oauth2/v2.0/token, the broken request receives a 400 back with this description:

{"error":"invalid_grant","error_description":"AADSTS700003: Device object was not found in the tenant 'f8cdef31-a31e-4b4a-93e4-5f571e91255a' directory.\r\nTrace ID: 6a98c866-d152-4b8c-9323-c267643a4d00\r\nCorrelation ID: 7783e740-4e79-4c3c-82c5-32224fdfd7bf\r\nTimestamp: 2020-09-17 01:38:41Z","error_codes":[700003],"timestamp":"2020-09-17 01:38:41Z","trace_id":"6a98c866-d152-4b8c-9323-c267643a4d00","correlation_id":"7783e740-4e79-4c3c-82c5-32224fdfd7bf","error_uri":"https://login.microsoftonline.com/error?code=700003","suberror":"device_authentication_failed"}

@carlocardella
Copy link
Member Author

I spent some more time inspecting the http requests and responses on the working and bad instances and was finally able to track the problem down to the cached credentials in Windows Credential Manager. I have deleted the two items highlighted and after restarting vscode insiders sync was working again.
I have no idea what happened to those cached credentials but at this point I don't really care to continue investigate (assuming it is even possible to find out more), I'm happy to be able to use Insiders again 😄
I hope this helps someone else.

image

@RMacfarlane
Copy link
Contributor

Thanks @carlocardella for the time investigating this!

I just pushed a change to automatically delete the stored credentials if we get a bad response back on refresh and show a notification about it.

@RMacfarlane RMacfarlane added the bug Issue identified by VS Code Team member as probable bug label Sep 18, 2020
@RMacfarlane RMacfarlane added this to the September 2020 milestone Sep 18, 2020
@RMacfarlane RMacfarlane added the authentication Issues with the Authentication platform label Sep 18, 2020
@steelx
Copy link

steelx commented Sep 28, 2020

Im facing this same issue on PopOs 20.04 ? How do I fix this

@mjbvz mjbvz added the author-verification-requested Issues potentially verifiable by issue author label Oct 1, 2020
@github-actions
Copy link

github-actions bot commented Oct 1, 2020

Unable to locate closing commit in issue timeline. You can manually reference a commit by commenting \closedWith someCommitSha.

@github-actions github-actions bot removed the author-verification-requested Issues potentially verifiable by issue author label Oct 1, 2020
@alexr00 alexr00 added the author-verification-requested Issues potentially verifiable by issue author label Oct 2, 2020
@github-actions
Copy link

github-actions bot commented Oct 2, 2020

Unable to locate closing commit in issue timeline. You can manually reference a commit by commenting \closedWith someCommitSha.

@github-actions github-actions bot removed the author-verification-requested Issues potentially verifiable by issue author label Oct 2, 2020
@rzhao271
Copy link
Contributor

rzhao271 commented Oct 2, 2020

\closedWith 403a689

@rzhao271 rzhao271 added the author-verification-requested Issues potentially verifiable by issue author label Oct 2, 2020
@github-actions
Copy link

github-actions bot commented Oct 2, 2020

This bug has been fixed in to the latest release of VS Code Insiders!

@carlocardella, you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text /verified to let us know. If not, please ensure you're on version 0ecb64a of Insiders (today's or later - you can use Help: About in the command pallete to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@carlocardella
Copy link
Member Author

I no longer have a repro to confirm the specific problem has gone, anyway I am on the latest insiders and everything is working fine

@PulsGarney
Copy link

On Mac, when I try to sync settings, which requires login first, I get this error: Error while starting Settings Sync: No authentication provider 'github' is currently registered. Which is quite similar to this one. expect @carlocardella seems already get the Github logged in.

Both of the auto-redirect and manually copy paste generated token did not work.
I've already checked Keychain access, seems like there is nothing related to vscode.
Any idea on how to solve this? please.

image

@RMacfarlane
Copy link
Contributor

@PulsGarney This sounds like a different problem, so I have created a new issue to track it: #108319

@PulsGarney
Copy link

@PulsGarney This sounds like a different problem, so I have created a new issue to track it: #108319

Okay, Thank you

@roblourens roblourens added the verified Verification succeeded label Oct 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
authentication Issues with the Authentication platform author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

11 participants