chrishasz / spgo

SPGo: A Lightweight, Open Source, SharePoint IDE for Visual Studio Code
https://www.chrishasz.com/spgo
MIT License
60 stars 11 forks source link

SPGo Can't Authenticate in VSCode October 2019 Release #103

Closed crayolakat closed 4 years ago

crayolakat commented 4 years ago

Hi,

After updating VSCode to version 1.40 (October 2019 release), I am unable to authenticate my SharePoint credentials. For example, when trying to populate workspace or publish files, I am prompted for credentials, but they are unable to be verified so nothing happens. If I try again, I am prompted for credentials again, but the issue persists.

I am able to use SPGo with no problem after reverting back to VSCode version 1.39.2 (September 2019 release).

This problem is occurring on a Windows 10 system, with VSCode version 1.40.

chrishasz commented 4 years ago

Hello @crayolakat - Thanks for reaching out. I have a couple questions for you below to help me troubleshoot this issue.

  1. do you see any errors in the SPGo output window?
  2. Can you post your spgo.json file? (Feel free to 'xxx' out company details in the URL)
  3. What kind of SharePoint server are you working with (on prem, SPO), and what method of authentication are you using?
crayolakat commented 4 years ago
  1. I don't see any errors in the SPGo output window. The "Populating workspace" or "Publishing file" prompts will spin in the output window for 1-2 seconds, then disappear
  2. My spgo.json file: { "sourceDirectory": "src", "sharePointSiteUrl": "https://xxx.sharepoint.com/teams/xxx/xxx/xxx", "publishingScope": "Major", "authenticationType": "Digest", "remoteFolders": [ "SiteAssets/**/*", "SitePages/**/*", "_catalogs/masterpage" ] }
  3. I am working with SharePoint Online, and the authentication goes through Microsoft 365.

Thank you!

chrishasz commented 4 years ago

@crayolakat I am still unable to reproduce this locally. Can you help me with a few more questions:

  1. I would like to see the logs from opening SPGo, logging in, and finally issuing the failed command? You can just close and reopen VSCode so the logs are minimum sized.
  2. I have seen this error from before when a SharePoint site is misspelled. I doubt there is a misspelling, but are there any special characters in the SharePoint URL?
  3. I see that you have Office365. Do you use Modern/Digest authentication, or some other method such as App Password?
crayolakat commented 4 years ago
  1. See SPGo output log below. I have issued a failed Populate Workspace command:

SPGo enabled. ================================ ERROR ================================

Error: write EPROTO 1638222184:error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL:../../third_party/boringssl/src/ssl/handshake_client.cc:568:

Error Detail: ---------------------- {"name":"RequestError","message":"Error: write EPROTO 1638222184:error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL:../../third_party/boringssl/src/ssl/handshake_client.cc:568:\n","cause":{"errno":"EPROTO","code":"EPROTO","syscall":"write"},"error":{"errno":"EPROTO","code":"EPROTO","syscall":"write"},"options":{"body":"\n <s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\"http://www.w3.org/2005/08/addressing\" xmlns:u=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">\n <s:Header>\n <a:Action s:mustUnderstand=\"1\">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue</a:Action>\n <a:ReplyTo>\n <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>\n </a:ReplyTo>\n <a:To s:mustUnderstand=\"1\">https://msauth.xxx.com/adfs/services/trust/13/usernamemixed</a:To>\n <o:Security s:mustUnderstand=\"1\" xmlns:o=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\n <o:UsernameToken u:Id=\"uuid-7b105801-44ac-4da7-aa69-a87f9db37299-1\">\n <o:Username>xxx@xxx.com</o:Username>\n <o:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">xxx</o:Password>\n </o:UsernameToken>\n </o:Security>\n </s:Header>\n <s:Body>\n <trust:RequestSecurityToken xmlns:trust=\"http://docs.oasis-open.org/ws-sx/ws-trust/200512\">\n <wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\n <wsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n <wsa:Address>urn:federation:MicrosoftOnline</wsa:Address>\n </wsa:EndpointReference>\n </wsp:AppliesTo>\n <trust:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</trust:KeyType>\n <trust:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</trust:RequestType>\n </trust:RequestSecurityToken>\n </s:Body>\n </s:Envelope>\n","strictSSL":false,"simple":false,"headers":{"Content-Length":1701,"Content-Type":"application/soap+xml; charset=utf-8"},"uri":"https://msauth.xxx.com/adfs/services/trust/13/usernamemixed","method":"POST","resolveWithFullResponse":false,"transform2xxOnly":false}} ===============================================================================

  1. There are no special characters in the SharePoint URL

  2. We use Digest authentication

Thank you!

crayolakat commented 4 years ago

In the above output log, the follow error occurred after the Populate Workspace command prompted me to log into SharePoint

chrishasz commented 4 years ago

@crayolakat I believe this issue is related to how node/VSCode is negotiating TLS/SSL with your SharePoint instance.

Before when we have had SSL support issues with SPGo in VSCode, the solution has been to set the proxy property to off. You can do this by navigating to Files -> Preferences -> Settings, and then typing HTTP: Proxy Support into the search box at the top, and then selecting off from the dropdown. You may need to restart VSCode for this to take full effect.

please let me know if this works.

crayolakat commented 4 years ago

@chrishasz This did not work. I am still receiving the same error in console

crayolakat commented 4 years ago

Issue is not longer present with SPGo version 1.6.0 and VSCode version 1.42.0. Closing issue. Thank you!!

jackf723 commented 1 year ago

I think this issue is re-present with latest version of VSCode and an ADFS authentication. I enter my username and password when asked, using domain\username conventions, and it just drops me back into the workspace without authenticating. SPGo problem or SharePoint server policy problem? I unfortunately have nothing to show for the extension output as nothing's showing up in the logs.

JaoCoronado commented 2 months ago

I have been experiencing a recurring authentication issue when trying to complete the workspace. When I enter the credentials, the message that is displayed to me is: ‘Invalid user credentials. Please reset your credentials through the command menu and try again.’ This same message appears when I attempt to reset the credentials with SPGo: Reset Credentials.

I look forward to your collaboration.

Thank you.

Captura de pantalla 2024-06-26 120259