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

Upgrading leaves server binary un-executable on macOS Catalina #341

Closed
radeksimko opened this issue Jun 5, 2020 · 3 comments
Closed

Upgrading leaves server binary un-executable on macOS Catalina #341

radeksimko opened this issue Jun 5, 2020 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@radeksimko
Copy link
Member

When the extension downloads new archive and extracts the new binary, it makes the binary un-executable for me and I get the following errors:

Launching language server: /Users/radeksimko/.vscode/extensions/hashicorp.terraform-2.0.0-rc.0/lsp/terraform-ls serve
[Error - 5:09:34 PM] Connection to server is erroring. Shutting down server.
[Error - 5:09:34 PM] Connection to server is erroring. Shutting down server.
[Error - 5:09:34 PM] Connection to server is erroring. Shutting down server.
[Error - 5:09:34 PM] Connection to server is erroring. Shutting down server.

also see #329 (comment)

I tried to inspect the differences between two binaries (one fresh installed and the one upgraded) and I couldn't find any significant difference, other than timestamp metadata and the fact that one binary is executable and the other one is just getting killed:

➜  lsp shasum -a 256 terraform-ls-broken
d0efcfe20817fa857456982662bc37dfed3caaccca0a38ee7fbe688e40c47838  terraform-ls-broken
➜  lsp shasum -a 256 terraform-ls-working
d0efcfe20817fa857456982662bc37dfed3caaccca0a38ee7fbe688e40c47838  terraform-ls-working
➜  lsp xattr -l terraform-ls-broken
➜  lsp xattr -l terraform-ls-working
➜  lsp ls -l terraform-ls-*
-rwxr-xr-x  1 radeksimko  staff  8336048 Jun  5 17:09 terraform-ls-broken
-rwxr-xr-x  1 radeksimko  staff  8336048 Jun  5 17:11 terraform-ls-working
➜  lsp ./terraform-ls-broken -v
[1]    58618 killed     ./terraform-ls-broken -v
➜  lsp ./terraform-ls-working -v
0.3.1

My assumption is that it may be getting killed by the System Integrity Protection, but don't have any way of proving it.

@radeksimko
Copy link
Member Author

Just confirmed that upgrade from 0.3.1 (which I manually placed in the extension dir) to 0.3.2 went smooth (i.e. the upgrade doesn't produce any un-executable binary anymore in rc.2)

@CallMeLaNN
Copy link

CallMeLaNN commented Jun 21, 2020

I saw this error after a few auto updates but I just realize it still doesn't even work with v2.0.1 and terraform-ls 0.3.2. So I start digging further...

After comparing new working project and my existing one, actually terraform.languageServer settings cause the error. The funny part is VS code doesn't hint the unused settings not even grey it out because this extension have difficulty to run when the server crash.

Actually my project created since early Feb when the language server introduced for TF 0.12. So the "terraform.indexing" { "enabled": false } and "terraform.languageServer": { "enabled": true } is there for some time.

At first I thought that my issue is similar (I'm using macOS Catalina too) to some issues reported as you pointed out to here but since it has the same generic error, I just share it.

Maybe I missed something during a few updates but I think silent change in the settings is hard to trace and always being forgotten. Probably it is good for the server to reveal the reason of non 0 exit/unhandled error too.

@ghost
Copy link

ghost commented Jul 10, 2020

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 context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 10, 2020
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