-
Notifications
You must be signed in to change notification settings - Fork 180
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
"Couldn't start client Terraform LS" error despite installing language server via extension/brew #707
Comments
Same issue… Couldn't start client Terraform LS Uninstalled everything (Plugin, VSCode, Terraform, Terraform-LS) Reinstalled everything (Homebrew) Same error every time... terraform -version Terraform v1.0.3 on darwin_amd64 provider registry.terraform.io/hashicorp/azurerm v2.70.0 VSCode Version: 1.58.2 HashiCorp Terraform Plugin Version: 2.14.0 macOS Big Sur Version: 11.5.1 |
Thank you for these reports. @balaji-dutt @TonyRobillard I see both of you are on macOS. Just to rule out or confirm that's in any way related - are you running on any latest Apple device with M1 processor based on ARM? Can either/both of you also attach the full screenshot of the error and where it appears? Can you also try opening the Thanks. |
I'm using an Intel processor based Mac.
Here is a screenshot of the error and in the background is the output from the In addition if I try to run the command "Terraform: validate" I get the following error on screen and with some additional error messages in the
|
Thank you for these additional details. Can you also check if there is |
I've sent the details via @radeksimko . I don't think there is sensitive data in there, but figure it would be better kept off a public channel. |
I'm seeing this too, using latest versions of VS Code, Terraform and the TF extension - here's my
|
I was able to get it to work. |
I think this is the correct solution. However it's a bit frustrating that there is no visible error message that single files are not supported. |
Agreed. |
In my case this seems to be caused by the
if I comment that out |
There seem to be at least two problems in play here. Single file Editing@balaji-dutt was kind enough to send me their log - and spotted a relevant error message in the log:
We do not support editing single files yet as the message suggests - but you are absolutely right that this should be surfaced to the user and they should not need to look for it in any log. Crash on tuple highlightingAs kindly reported by @kerin LS certainly shouldn't be crashing under any circumstances - so this is a bug. I am guessing that it's getting triggered by the I will look into the crash at first because that seems more serious at this point. Thank you all so far for all your cooperation, I appreciate it! |
The main root cause of the crash should now be fixed in I'm going to keep this issue open until we address the vague error message when LS crashes though. |
Running into this issue on arch (amd64) (version logs (unlikely to be useful; included anyways just in case)
When I tried to execute the binary manually, it failed to run. I checked the elf header and it appears to be a binary for arm, not amd.
When I installed 2.20.0, I got an amd64 binary as expected (and the plugin worked).
replacing the binary with a manually compiled one at git clone https://github.com/hashicorp/terraform-ls
cd terraform-ls
git checkout v0.27.0
go build
mv terraform-ls /home/wade/.vscode-oss/extensions/hashicorp.terraform-2.20.1/bin/terraform-ls |
Based on the file paths, it looks like you installed the extension into VS Codium or similar build of VS Code, which generally doesn't install from the MS Marketplace. The latest builds on OpenVSX - which you likely used - are currently broken, because of an older version of ovsx was used which doesn't support multi-platform extensions. We are currently blocked by eclipse/openvsx#450 Since v2.20.0 we embed the LS binary in the extension itself (within vsix), so folks who consume the extension via official VS Code builds and MS Marketplace should no longer face this error. We track OpenVSX publishing under #1064 @allawesome497 We also provide |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Extension version:
My Environment
Expected Behavior
Terraform: Enable Language Server
, the command should validate open.tf
files.Actual Behavior
Terraform: Enable Language Server
, I get an error message "Couldn't start client Terraform LS".Steps to reproduce the problem (?)
.tf
file (?)0.20.0
version of Terraform language server. Reload VSCodeOR
brew install hashicorp/tap/terraform-ls
settings.json
as follows:.tf
file (?)The text was updated successfully, but these errors were encountered: