-
Notifications
You must be signed in to change notification settings - Fork 131
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 Language Server v.0.16.0 keeps crashing after upgrade to v.2.10.1 #479
Comments
Hi @haflidif Thanks! |
I see several issues in the output like this below:
|
Thank you, this is useful, that is most certainly a bug. I think I have an idea of how to fix it, but would you mind sharing your whole log as a gist (minus any sensitive data), so I can better understand how did you run into this? |
@radeksimko here is the gist: https://gist.github.com/haflidif/a048389575ae9e0d2c6d4ec1b3f41345 this is when I just opened new main.tf file within a module, and also this notification pops up: |
I'd still appreciate the whole log including the beginning, especially because the language server performs certain important operations upon launch (e.g. walking through workspace hierarchy, checking TF version and available schema) and the beginning of the log would therefore help me understand the outcome of these operations. That gist unfortunately only contains a few more lines above the panic trace. I'd like to see the log starting with Knowing all these details is important so that I can reproduce the bug and ensure the real root cause is fixed, as opposed to just ignoring a nil somewhere. Also if you're worried about sensitive data you may encrypt it using my GPG key: https://keybase.io/radeksimko |
@radeksimko I'm facing the same issue. I had to remove some sensitive information from the logs but I hope this helps. |
@radeksimko Sorry for the missunderstanding on the log file - but I've updated the log file and removed the sensitive information: https://gist.github.com/haflidif/a048389575ae9e0d2c6d4ec1b3f41345 hope this helps |
I have prepared a snapshot build with some added logging and a patch which should avoid the crash. terraform-ls_v0.16.0-SNAPSHOT-01e7770_darwin_amd64.zip terraform-ls_v0.16.0-SNAPSHOT-01e7770_SHA256SUMS
Can either/both of you try it out locally by unzipping the binary somewhere and set that path in the VS Code settings here {
"terraform.languageServer": {
"pathToBinary": "/path/to/terraform-ls",
and (after reloading VS Code):
I still wasn't able to reproduce this yet unfortunately. |
I have this problem too, I tried the new LS as you suggested, got this:
|
@kasvtv I can see this is being triggered by aws provider with a legacy address (something that Terraform <= 0.12 would produce) and one that isn't pinned to particular version - these are some useful data points. I just made another small change based on this data and prepared a new snapshot build: terraform-ls_v0.16.0-SNAPSHOT-04638ce_darwin_amd64.zip terraform-ls_v0.16.0-SNAPSHOT-04638ce_SHA256SUMS
Can you give that one a try? |
I was having the same problems while yesterday everything was alright, is there anything I could do to try helping? |
@aylton-almeida you can try out the last snapshot build by unzipping the binary somewhere and set that path in the VS Code settings here {
"terraform.languageServer": {
"pathToBinary": "/path/to/terraform-ls", and (after reloading VS Code):
|
@radeksimko Just did it, everything seems to be working fine on Windows. Here goes the log
|
OK, I finally managed to reproduce it! 🎉 Thank you all for your help and sharing! The (false) assumption LS makes is that anybody on 0.13+ uses the explicit provider declarations, such as terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
}
}
} While this is generally encouraged, it's not strictly required (yet). You may be able to just revert back to the stable 0.16.0 version if you specify the provider source explicitly in your configuration. I will however obviously fix the bug so that a crash doesn't occur in such cases. |
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. |
After upgrading to Terraform Extension v.2.10.1 to the new language server that comes with the extension: v.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.
Download version v.0.15.0 https://github.com/hashicorp/terraform-ls/releases/tag/v0.15.0 and configured terraform.languageServer in the settings.json file to use those binaries.
The text was updated successfully, but these errors were encountered: