hashicorp / vscode-terraform

HashiCorp Terraform VSCode extension
https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform
Mozilla Public License 2.0
929 stars 180 forks source link

Connection to server is erroring. Shutting down server. terraform-ls: 1: Syntax error: word unexpected (expecting ")") #1268

Closed brovoca closed 2 years ago

brovoca commented 2 years ago

Versions

Extension

2.21.1

VSCodium

Version: 1.72.2
Release: 22289
Commit: 378660f7dd07287aa34acf90e8fec157425c1ac8
Date: 2022-10-16T23:03:19.989Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.0-52-generic
Sandboxed: No

Operating System

Linux <redacted> 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Terraform Version

1.3.4

Steps To Reproduce

  1. I've created an empty folder with a main.tf
  2. I check the TF output and see that it has crashed.

Expected Behavior

The LS should provide the promised features

Actual Behavior

The LS crashes:

Launching language server: /home/user/.vscode-oss/extensions/hashicorp.terraform-2.21.1/bin/terraform-ls serve
[Error - 3:31:19 PM] Connection to server is erroring. Shutting down server.
/home/user/.vscode-oss/extensions/hashicorp.terraform-2.21.1/bin/terraform-ls: 1: Syntax error: word unexpected (expecting ")")

Additional context

dbanck commented 2 years ago

Hi @brovoca!

I'm confused about your extension version 2.21.1. Neither on the VS Code marketplace nor on Open VSX have we released such extension version. Where did you install it from?

brovoca commented 2 years ago

Hey @dbanck!

Oh, that's strange... Below are the details I am able to get from the extension, but now I see that Open VSX has 2.20.0 as the latest one... Please note I'm using VSCodium

Name: HashiCorp Terraform
Id: hashicorp.terraform
Description: Syntax highlighting and autocompletion for Terraform
Version: 2.21.1
Publisher: hashicorp
VS Marketplace Link: https://open-vsx.org/vscode/item?itemName=hashicorp.terraform
brovoca commented 2 years ago

Really strange, I uninstalled the extension and re-installed it, and now I have 2.20.0 and it's not crashing anymore.

dbanck commented 2 years ago

I'm happy to hear that it's now working for you.

There were some problems regarding publishing platform-specific extensions back in May. But the affected versions were unpublished again. So do you remember when you first installed the extension, or is it somehow bundled with the editor?

We're hoping to publish the newest versions to Open VSX soon. However, in the meantime, you can update the Terraform language server manually as described here if you want to use the latest version.

brovoca commented 2 years ago

Sorry Daniel, I have no clue when I installed/upgraded this extension. It might have been in May, but I can't be sure. It didn't come bundled at least. Thank you for your assistance!

dbanck commented 2 years ago

No problem! I'm going to close this for now, but if this is still an issue please respond and we'll re-open.

dbanck commented 2 years ago

Hi again,

I'm happy to report that the latest version 2.25.0 of the extension is now available on OpenVSX as well: https://open-vsx.org/extension/hashicorp/terraform

Future versions should be published automatically whenever we release an update.

brovoca commented 2 years ago

Superb! Thanks :D

github-actions[bot] commented 1 year ago

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. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.