Steps to Reproduce:
Get the error:
Initializing SQL tools service for the mssql extension.
Note: mssql commands will be available after installing the service.
Platform: win32, x86_64 (Windows)
Installing SQL tools service to C:\Users\<username>\.vscode\extensions\ms-mssql.mssql-0.2.0\sqltoolsservice\0.2.0\Windows.
Downloading https://download.microsoft.com/download/1/2/9/129DBE92-1B54-4024-9399-CE31DF148BD8/microsoft.sqltools.servicelayer-win-x64-netcoreapp1.0.zip
[ERROR] Error: Download failed with code 403.
I am guessing this is because the download is https but only a http proxy is configured?
Adding https.proxy to the configuration file results in "unknown configuration setting" and does not make any difference to the outcome.
Hi @freeranger
http.proxy is used for http and https urls. Is you proxy url https?
If you want to manually install the service these are the steps:
1- download the service from https://download.microsoft.com/download/1/2/9/129DBE92-1B54-4024-9399-CE31DF148BD8/microsoft.sqltools.servicelayer-win-x64-netcoreapp1.0.zip
2- Unzip the files to %USERPROFILE%.vscode\extensions\ms-mssql.mssql-0.2.0\sqltoolsservice\0.2.0\Windows
Hi,
It is a http proxy, not an https one.
For other purposes - e.g npm or git, the same proxy url is used for both http and https configuration.
It works in VS Code normally for finding packages etc so much be configured correctly, but I guess that the service installation doesn't respect that?
I have installed it manually, but obviously it would be a better experience if it respected the vs code proxy and the installation worked without any manual intervention.
Thanks
The extension also gets the configured values from the workspace configuration. The same way VS code does I believe. but it might a bug setting the proxy in the http request.
@freeranger did you set anything in http.proxyAuthorization? I noticed we don't set the proxy authorization in the http request header.
Hi,
This is my entire configuration:
``Json
{
"http.proxy": "http://myproxy:myport",
"http.proxyStrictSSL": false
}
And it works for finding extensions in the market place and so on...
I have a similar issue, and I think it is related because I am also behind a proxy.
The output error is:
Initializing SQL tools service for the mssql extension.
Note: mssql commands will be available after installing the service.
Platform: win32, x86 (Windows)
Installing SQL tools service to C:\Users\[user name]\.vscode\extensions\ms-mssql.mssql-0.3.0\sqltoolsservice\0.3.0.5\Windows.
Downloading https://download.microsoft.com/download/A/A/2/AA22B2D6-94D8-4C82-A388-D0246F567BBF/microsoft.sqltools.servicelayer-win-x86-netcoreapp1.0.zip
[ERROR] Error: Request error: ECONNRESET
I do have a proxy setup just like @freeranger
@aaroncalderon if this is blocking you, could you try installing the offline package instead? You follow the steps on our release at https://github.com/Microsoft/vscode-mssql/releases/tag/v0.3.0.6. In your case it looks like you have an x86 architecture windows machine? Therefore pick the https://github.com/Microsoft/vscode-mssql/releases/download/v0.3.0.6/mssql-0.3.0-win7-x86.vsix VSIX, download to your machine and choose Install from VSIX in the options menu of the Extensions tab. Let me know if this works.
@kevcunnane I will try tomorrow, thanks for the clarification and optional method of installation.
Installing the package offline works fine but it's too bad that the extension does not use correctly the proxy settings to download the package. Is it an issue with vs code itself or with the extension ?
@TechWatching does this same issue occur for the C# extension in VSCode? We have leveraged a lot of their code for package downloading, but it's possible they fixed in an update. Could you try installing them, opening a .cs file and seeing whether they can successfully download? If so, we can look at leveraging their code to improve / fix this issue.
I am pretty sure I had no issue with C# extension but I can't confirm right now as I am not currently at work behind a proxy. I checked the C# extension repo and it seems indeed that this issue has been solved with this PR https://github.com/OmniSharp/omnisharp-vscode/pull/350/commits relative to this issue https://github.com/OmniSharp/omnisharp-vscode/issues/200.
@llali - it looks like we are actually using this same code as Omnisharp to configure our proxy. If it turns out that C# works (e.g. re-installing so it pulls down its dependencies) and ours doesn't, I'd love to understand what's different since we have the same proxy code in our HttpClient class.
I am also finding the same issue when I am behind proxy. I could fix it as pointed above by downloading the package and unzipping to the respected folder. C/C++ plugin from microsoft also downloads few things after the plugin is installed. ( It works properly behind proxy) May be you can find the solution there on how they have implemented it.
I confirm that I have not this issue with the omnisharp extension.
@kevcunnane I can confirm that I can install manually through the Install from VSIX option menu.
@TechWatching thanks, this helps. We'll take a look at the difference in their code vs. ours and see if we can resolve.
Hi @aaroncalderon
Can you please try one of the daily github builds like this one: https://github.com/Microsoft/vscode-mssql/releases/download/v0.3.0-alpha.9/mssql-0.3.0.vsix
and see if you still have problem downloading? This build downloads the service from the github releases and the official release that you were using, installs the service from download.microsoft.com. I just want to verify that the problem is not related to the download center.
Thanks for your help
@llali Should I uninstall and install again?
Do you know if there are cashed downloads that may be used instead of actually downloading the files from the internet?
I did uninstall and reinstall. I got a message telling me that it was installed successfully.
@llali I tryed to setup a connection to test some sql queries, but I was greeted with the following error messages:
Running the contributed command:extension.manageProfilesfailed.mssql: Unable to execute the command while the extension is ninitializeing. Please try again later.And the console showed the same error as before:
Initializing SQL tools service for the mssql extension.
Note: mssql commands will be available after installing the service.Platform: win32, x86 (Windows)
Installing SQL tools service to C:\Users[user name].vscode\extensions\ms-mssql.mssql-0.3.0\sqltoolsservice\0.3.0-alpha.9\Windows.
Downloading https://github.com/Microsoft/sqltoolsservice/releases/download/v0.3.0-alpha.9/microsoft.sqltools.servicelayer-win-x86-netcoreapp1.0.zip
[ERROR] Error: Request error: ECONNRESET
Hi @aaroncalderon yes you need to uninstall and install again.
So the downloading still fails with that url but it's not the same error? Can you download that manually? just checking that the url doesn't have any problem. Thanks
@aaroncalderon Can you please let me know the type of proxy you are using and also if the proxy server url protocol is https or https
Thanks
@llali The underlying error is ECONNRESET, this happens when it tries to download https://github.com/Microsoft/sqltoolsservice/releases/download/v0.3.0-alpha.9/microsoft.sqltools.servicelayer-win-x86-netcoreapp1.0.zip. So, it is basically the same issue.
When I download the file manually it owrks.
The proxy protocol is __http__.
I do not know what do you mean by:
the type of proxy
@aaroncalderon I fixed some issues related to proxy settings in this release: https://github.com/Microsoft/vscode-mssql/releases/tag/v0.3.0-alpha.13
I verified that with proxy setting in vs code, I 'm able to download the service from this url: https://download.microsoft.com/download/A/A/2/AA22B2D6-94D8-4C82-A388-D0246F567BBF/microsoft.sqltools.servicelayer-win-x86-netcoreapp1.0.zip
I still have some problem downloading from github release which I'm still investigating.
Can you please install the extension from that release and verify if you can download the service?
You need to download this url: https://github.com/Microsoft/vscode-mssql/releases/download/v0.3.0-alpha.13/mssql-0.3.0.vsix
The build is downloading the service from github release so you need to change the configuration to get the service from Microsoft download center. After you install the extension please change the config file here:
Mac: ~/.vscode/extensions/ms-mssql.mssql-0.3.0/out/src/config.json
Windows: %USERPROFILE%/.vscode/extensions/ms-mssql.mssql-0.3.0/out/src/config.json
in config.json you need to change the value of "downloadUrl" to:
Appreciate you help,
Leila
@llali It seems to have installed and downloaded with no problem with the instructions you provided.
I can confirm that v0.3.0-alpha.13 downloads additional files properly after installing from __vsix__.
Thanks @aaroncalderon for verifying.
Most helpful comment
Hi @freeranger
http.proxy is used for http and https urls. Is you proxy url https?
If you want to manually install the service these are the steps:
1- download the service from https://download.microsoft.com/download/1/2/9/129DBE92-1B54-4024-9399-CE31DF148BD8/microsoft.sqltools.servicelayer-win-x64-netcoreapp1.0.zip
2- Unzip the files to %USERPROFILE%.vscode\extensions\ms-mssql.mssql-0.2.0\sqltoolsservice\0.2.0\Windows