Skip to content
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

terraform-ls: cannot execute binary file #1103

Closed
1 of 2 tasks
sarayourfriend opened this issue May 11, 2022 · 7 comments
Closed
1 of 2 tasks

terraform-ls: cannot execute binary file #1103

sarayourfriend opened this issue May 11, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@sarayourfriend
Copy link

Versions

This bug is reproducible in:

  • the latest version of the extension (below)
  • the latest version of the language server (below) (Not sure how to answer this one, see workarounds below)

Extension

v2.20.1

Language Server

I'm not sure what version of terraform-ls is being shipped with the inspection because the binary is not able to be executed.

VS Code

Version: 1.67.1
Commit: da15b6fd3ef856477bf6f4fb29ba1b7af717770d
Date: 2022-05-10T21:35:59.370Z
Electron: 17.4.3
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Linux x64 5.17.5-arch1-1

Operating System

➜  ~ uname -a
Linux saras-laptop 5.17.5-arch1-1 #1 SMP PREEMPT Wed, 27 Apr 2022 20:56:11 +0000 x86_64 GNU/Linux

Terraform Version

➜  ~ terraform version
Terraform v1.1.9
on linux_amd64

Steps To Reproduce

terraform-ls should be an executable binary.

Note, running chmod +x on the binary file did not help.

Actual Behavior

The binary is not executable.

Additional context

The workaround I'm using currently (which is working great, BTW, amazing work on the extension, the experience with and without it is night and day) is to install terraform-ls from the AUR and update my VSCode settings with the following:

    "terraform.languageServer": {
        "external": true,
        "pathToBinary": "/usr/bin/terraform-ls",
        "args": [
            "serve"
        ],
        "maxNumberOfProblems": 100,
        "trace.server": "off"
    }
@sarayourfriend sarayourfriend added the bug Something isn't working label May 11, 2022
@radeksimko
Copy link
Member

Hi @sarayourfriend
A few questions so we can try to reproduce the problem.

  • Can you confirm you're running on 64bit Intel-based CPU (amd64/x64)?
  • Can you confirm you installed the official MS build of VS Code from https://code.visualstudio.com/Download
  • Can you confirm you installed the extension from the official Marketplace?

In general VS Code decides what build of the extension (along with the relevant build of LS) to pick. There are some known issues with the last uploaded builds in OpenVSX which some 3rd party VS Code builds likely use. We're trying to resolve that as part of #1064 but waiting for ovsx maintainers currently.

@sarayourfriend
Copy link
Author

Can you confirm you're running on 64bit Intel-based CPU (amd64/x64)?

Yes, an i7 11th gen mobile.

The rest, no I am not, I'm using the version available from the Arch repositories, which I believe is indeed the OSS version of VSCode (no MS binary additions).

Feel free to close this if the issue is already documented with my setup. Thanks for the fast response!

@radeksimko
Copy link
Member

Understood. It would be still good to know if this is at all related to #1064 and whether publishing correct packages to OpenVSX will resolve your issues.

The version you mentioned (2.20.1) would suggest it is - as that is the latest extension version we published there (unlike 2.22.0 on the official MS Marketplace) and I know for a fact the package uploaded for that version is unfortunately broken.

If you agree, we can close this as a duplicate of #1064

@sarayourfriend
Copy link
Author

Ah, okay! I'm fine closing this issue. I will keep an eye out for updates to the extension in OpenVSX and if it isn't fixed on the next release there then I'll make a not here about it 😁

@radeksimko
Copy link
Member

FWIW in the meantime you may be able to downgrade to 2.19.0 which was the last version built as universal (rather than platform specific) - but of course managing LS on your own like you mentioned is also a good workaround.

As mentioned in the linked issue we are currently blocked by eclipse/openvsx#450

@radeksimko radeksimko closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2022
@tagirb
Copy link

tagirb commented May 24, 2022

As a workaround one can download the platform-specific terraform-ls binary archive from hashicorp/terraform-ls release page and replace the broken binary in the VS Code extensions directory (on my Linux it is ~/.vscode-oss/extensions/hashicorp.terraform-2.20.1/bin).

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants