Crashing language server (terraform-ls)
See original GitHub issueAfter an update to the latest version (v2.12.1) my Terraform language server does not work anymore. As a consequence, I do not have auto-completion like I used to just over a week ago. Also, the following error message appears:
The Language Server:
file:///<path-pointing-to-my-terraform-project> server crashed 5 times in the last 3 minutes.
The server will not be restarted.
These are the VSCode settings I specified in the settings.json file:
...
"terraform.languageServer": {
"external": true,
"pathToBinary": "C:\\Portable\\terraform\\terraform.exe",
"args": [
"serve"
],
"maxNumberOfProblems": 100,
"trace.server": "off"
},
...
Is it normal that the path displayed in the error message and the one I set in the settings.json file are different?
Can you help me troubleshoot the error?
I’m using a Win10 x64 workstation.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Terraform Language Server v.0.16.0 keeps crashing ... - GitHub
0.16.0 keeps crashing, and auto-completion stopped working,. Workaround while the new language server is fixed: Revert back to v.0.15.0.
Read more >VS Code Terraform Language Server crash. - Reddit
I just realized that the Terraform-ls server is crashing all the time. First I was wondering, why doesn't autocomplete and snippets work?
Read more >terraform-ls - Homebrew Formulae
terraform -ls. Install command: brew install terraform-ls. Terraform Language Server. https://github.com/hashicorp/terraform-ls. License: MPL-2.0.
Read more >Language Server Protocol Support in BBEdit 14
Warning: customizing server initialization or workspace configurations can cause the language server to crash or otherwise behave unexpectedly. We cannot ...
Read more >HashiCorp Terraform (Preview) - Visual Studio Marketplace
The HashiCorp Terraform Extension for Visual Studio Code (VS Code) with the Terraform Language Server adds editing features for Terraform ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have created https://github.com/hashicorp/vscode-terraform/issues/667 to address the proxy related issues.
The field is under
terraform.languageServersection and the description already mentions this, so I’m not sure what more can be done in this area? 🤔https://github.com/hashicorp/vscode-terraform/blob/ab57089375e2c5f989bf854ca47e45335e3ac1d6/package.json#L101
Yes - these are two different things. We do not bundle the language server with Terraform itself, at least not at this point.
No need to apologize - I’m just curious what motived you to set this config option? The extension should just install the LS automatically after first activation and it should not need any manual configuration at all.
Is there any piece of documentation that needs updating, or adding somewhere?
I’m assuming that’s the (unfortunately vague) message from a popup. I haven’t quite figured out where that one comes from and how to make it more useful, but I’ve seen it before.
I wonder if this could be related to the way you run VS Code or the network you’re on?
Generally the extension needs to:
releases.hashicorp.com- if you’re behind any kind of restrictive corporate firewall that blocks requests to that domain then I imagine that might confuse the updater.lspdirectory within the extension dir (i.e.$HOME/.vscode/extensions/hashicorp.terraform-2.12.1) and be able to write files into that directory