microsoft / vscode-go

An extension for VS Code which provides support for the Go language. We have moved to https://github.com/golang/vscode-go
Other
5.93k stars 648 forks source link

gopls does not start behind a blocking proxy #3204

Closed neclepsio closed 4 years ago

neclepsio commented 4 years ago

What version of Go, VS Code & VS Code Go extension are you using?

Describe the bug

Behind a proxy which redirects to a login page, golps does not start. Apprently, it fails checking the version. The following error is printed in developer tools console. When VS Code is started with internet connection, the server works correctly.

console.ts:137 [Extension Host] stack trace: TypeError: Invalid Version: null
    at new SemVer (c:\[...]\Microsoft VS Code\code-portable-data\extensions\ms-vscode.go-0.14.1\node_modules\semver\semver.js:314:11)
    at compare (c:\[...]\Microsoft VS Code\code-portable-data\extensions\ms-vscode.go-0.14.1\node_modules\semver\semver.js:647:10)
    at rcompare (c:\[...]\Microsoft VS Code\code-portable-data\extensions\ms-vscode.go-0.14.1\node_modules\semver\semver.js:664:10)
    at Array.sort (<anonymous>)
    at c:\[...]\Microsoft VS Code\code-portable-data\extensions\ms-vscode.go-0.14.1\out\src\goLanguageServer.js:428:18
    at Generator.next (<anonymous>)
    at fulfilled (c:\[...]\Microsoft VS Code\code-portable-data\extensions\ms-vscode.go-0.14.1\out\src\goLanguageServer.js:9:58)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
neclepsio commented 4 years ago

Upon further inspection, at goLanguageServer.js:428, versions is [null, null, ..., null], one for each line of the proxy response (the login page).

In don't think the extension should be able to login, but it should use the currently installed version.

ramya-rao-a commented 4 years ago

The latest update 0.14.2 has the fix for this, Thanks @neclepsio