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

502 error code after update to 1.20.1 #17772

Closed
EdCallahan opened this issue Aug 7, 2023 · 3 comments · Fixed by #17828
Closed

502 error code after update to 1.20.1 #17772

EdCallahan opened this issue Aug 7, 2023 · 3 comments · Fixed by #17828

Comments

@EdCallahan
Copy link

  • MSSQL Extension Version: 1.20.1
  • VSCode Version: 1.80.1
  • OS Version: Win11

This is a continuation of the getProxyAgentOptions error error I previously reported.

I was able to get version 1.20.0 working using the advise at #17755 (comment)

After VSCode updated the extension to 1.20.1 today, when I try to establish a SQL Connection I now get a 502 error:

Installing SQL tools service to c:\Users\EVCallahan\.vscode\extensions\ms-mssql.mssql-1.20.1\sqltoolsservice\4.8.1.2\Windows.
Downloading https://github.com/Microsoft/sqltoolsservice/releases/download/4.8.1.2/microsoft.sqltools.servicelayer-win-x64-net7.0.zip
failed (error code '502')
[ERROR] Error: 502

Manually downloading https://github.com/Microsoft/sqltoolsservice/releases/download/4.8.1.2/microsoft.sqltools.servicelayer-win-x64-net7.0.zip and extracting the content to C:\Users\<username>\.vscode\extensions\ms-mssql.mssql-1.20.1\sqltoolsservice\4.8.1.2\Windows and restarting VSCode worked around the problem

Steps to Reproduce:

  1. Allow VSCode to update mssql extension from 1.20.0 to 1.20.1
  2. Try to establish SQL Connection with mssql.connect

image

@cheenamalhotra
Copy link
Member

Hi @EdCallahan

It seems your proxy is denying the connection. Does removing proxy settings in settings.json help?

@EdCallahan
Copy link
Author

It seems your proxy is denying the connection. Does removing proxy settings in settings.json help?

Hi @cheenamalhotra, I appreciate your responsiveness to this issue.

I can download the ZIP file fine via my proxy, using my web browser for instance. So I don't think the proxy is denying the connection. I think the extension is having a hard time determining the correct proxy settings, or otherwise isn't using the proxy.

I've been doing some debugging. The problem exists when I have the following line in my settings.json:

"http.proxySupport": "on"

When I remove that line the problem goes away.

For your reference my other proxy settings in settings.json are (IP address partially masked):

    "http.proxy": "http://199.17.xxx.xxx:xxxx",
    "http.proxyStrictSSL": false,

I find it surprising, but removing all the proxy statements from my json file does alleviate the problem without any ill effect I've noticed so far.

It appears that when mssql is forced to use the settings.json for proxy information it fails, but succeeds when relying on the OS? The settings in both look identical to my eye.

@cheenamalhotra
Copy link
Member

Thanks for validating @EdCallahan
We'll keep note of this and hopefully resolve this soon, in the meantime, please choose the settings that work best for you.

cc @cssuh for consideration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
3 participants