question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocomplete not working correctly - Failed to parse file '/terraform/model/providers/kubernetes-alpha.json': null

See original GitHub issue

I’ve tried everything short of re-installing Arch, I am only seeing this issue with one of my machines, but it is driving me nuts and I could use some support.

Prerequisites

  • Ensure you have latest version of plugin installed
  • Search for possible issue duplicates

Installation details

  • IDE version (Help->About->Copy to Clipboard)
GoLand 2020.3.4
Build #GO-203.7717.58, built on March 15, 2021
Licensed to Stephen Schlie
Subscription is active until November 1, 2021.
Runtime version: 11.0.10+8-b1145.96 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.11.11-arch1-1
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 32
Registry: ide.completion.variant.limit=500, suggest.all.run.configurations.from.context=true
Non-Bundled Plugins: org.intellij.plugins.hcl
Current Desktop: KDE
  • intellij-hcl plugin version (Settings->Plugins) 0.7.10
  • Terraform version (terraform -v) v0.14.9

Terraform Configuration Files

terraform {
  required_providers {
    google = {
      source = "hashicorp/google"
      version = ">=3.63.0"
    }
  }
}

provider "google" {
  project = "my-project"
  region  = "us-west1"
  zone    = "us-west1-a"
}

Exception

https://gist.github.com/heschlie/90d567b16d8d42e4024859e030468f1d https://gist.github.com/heschlie/53613423a11af1c29bd9b7dfbb8ed97d

Expected Behavior

when typing resource "google_, I would expect it to pop up an autocomplete list, and narrow down as I type, just like my other installs do.

Actual Behavior

Instead I either get nothing, or I have to pres ctrl-space several times in a row before the dialog pops up.

Steps to Reproduce

  1. open any .tf file
  2. start typing
  3. See a lack of autocomplete options

I don’t expect this to be easily reproducable, the error at the top of the gist I think is the culprit, as it happens as soon as you launch the IDE.

Failed to parse file '/terraform/model/providers/kubernetes-alpha.json': null I have no idea why it is looking for this file, and I definitely don’t have a terrform dir in my root drive.

EDIT: This seems to be limited to the google provider

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cjkentcommented, Jun 22, 2021

I’m seeing this problem with the latest EAP:

IntelliJ IDEA 2021.2 EAP (Ultimate Edition) Build #IU-212.4321.30, built on June 20, 2021 IntelliJ IDEA EAP User Expiration date: July 20, 2021 Runtime version: 11.0.11+9-b1504.3 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.7

The result is that Terraform support is totally broken - valid .tf files are shown with errors. Opening the same file in the current stable IntelliJ version works fine.

The file kubernetes-alpha.json referenced in the stack trace doesn’t exist in my project. Like the original reporter, I don’t even have a terraform directory in my project root.

0reactions
VladRassokhincommented, Sep 9, 2021

@esciara How google-beta is related to issue “Autocomplete not working correctly - Failed to parse file ‘/terraform/model/providers/kubernetes-alpha.json’”? Please open separate issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Null in Parse JSON when Upload in Forms is Optional
The flow works if a user does upload a file but fails when a user does not upload a file. Before the flow...
Read more >
Flow Parse JSON Null Error Fix - April Dunnam
The ability to make an HTTP request and parse json is a powerful functionality in Flow. But what do you do if you...
Read more >
Null error while parsing JSON file in Flutter - Stack Overflow
final File file = File('assets/data/character_data.json'); jsonData = await file.readAsString();. Change to: String data = await rootBundle.
Read more >
Parsing JSON with null-able properties in Logic Apps - Adatis
Logic App Example. Our Example logic app to parse JSON is very simple. It uses two components, and single HTTP trigger (Trigger is...
Read more >
Power Automate: PARSE JSON action with value or null
Power automate is endless fun! Today we are going to explore a very "simple" issue which are 2 issues actually: how to define...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found