-
Notifications
You must be signed in to change notification settings - Fork 179
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
Language server fails to start - Windows 10 #1301
Comments
Hi @iamlorax, can you post the Terraform config section in your settings? Also, what scope (user, workspace, etc) your settings are in? I think there is a configuration error that is preventing the extension from starting successfully |
@jpogran There are not terraform configs in the workspace settings. |
@iamlorax Just for clarity, would you mind clarifying what OS are you running this on? Ideally if you could take a screenshot of the I see the for VS Code you mention Similarly, can you also obtain version of the LS using the command below? > c:\Users\radeksimko\.vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\bin\terraform-ls.exe version
I am not super familiar with the compatibility constraints between the two architectures on Windows, but this stands out to me at the least. That said, you seem to have the default settings in place, and so if architecture mismatch (between your OS and I do not have access to 32bit Windows myself unfortunately. If you could reproduce this on a different platform and/or architecture, e.g. Linux/x64, that would help confirm or reject the theory. |
System Information I must have downloaded the incorrect Terraform by mistake. I now have the 64-bit version but that did not resolve the issue. Terraform-ls |
Thank you for providing this promptly, that means we can basically rule out architecture mismatch as root cause. If you're able to run LS manually from PowerShell, then there must be some differences between how it runs through VS Code, but presumably not the arguments - as the log suggests the One possibility that comes to mind is permissions, but when I tried to reproduce that, I received the following in the log:
where Just for avoidance of doubt - can you do integrity check on the LS binary? i.e. confirm that the SHA256 hash matches the following? PS C:\Users\radeksimko> Get-FileHash c:\Users\...\.vscode\extensions\hashicorp.terraform-2.25.2-win32-x64\bin\terraform-ls.exe
Algorithm Hash Path
--------- ---- ----
SHA256 18CD480A2A0BDDC8C7D853C2B03E6A3CF09EF7948EE798845FFAAC6B3435E6C2 C:\Users\radeksimko\.vscode\e... If the output matches - i.e. you have the exact same binary, then the only possible next step I can think of is on us - to try to log some more details in the error message about the circumstances of the failure, if the NodeJS/Windows API provides us any. 🤔 vscode-terraform/src/handlers/errorHandler.ts Lines 14 to 17 in 4b3ac6c
|
Output Looks like the hash does match. |
Marking this issue as stale due to inactivity over the last 30 days. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. Thank you for understanding. |
Issue Description
I am unable to run the extension after a fresh install and am getting the error listed below:
Connection to server got closed. Server will not be restarted.
Running the same command in powershell works as intended:
c:\Users******.vscode\extensions\hashicorp.terraform-2.25.1-win32-x64\bin\terraform-ls.exe serve
2022/12/14 14:51:37 serve_command.go:101: Starting terraform-ls 0.30.1
2022/12/14 14:51:37 service.go:99: Preparing new session ...
2022/12/14 14:51:37 langserver.go:94: Starting server (pid 2488; concurrency: 4) ...
Environment Information
Terraform Information
Version: Not found (Terraform v1.3.6)
Platform: Not found (windows_386)
Outdated: false
Visual Studio Code
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
Extension Logs
Launching language server: c:\Users******.vscode\extensions\hashicorp.terraform-2.25.1-win32-x64\bin\terraform-ls.exe serve
Failure to start terraform-ls. Please check your configuration settings and reload this window
[Error - 2:39:06 PM] Connection to server got closed. Server will not be restarted.
The text was updated successfully, but these errors were encountered: