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.

URI "vscode-remote://wsl%2Bubuntu-20.04/home/`{path to my working directory}`" is not valid

See original GitHub issue

Versions

This bug is reproducible in:

  • the latest version of the extension (below)
  • the latest version of the language server (below)

Extension

2.2.0

Language Server

0.27.0

VS Code

Version: 1.67.0 (user setup)
Commit: 57fd6d0195bb9b9d1b49f6da5db789060795de47
Date: 2022-05-04T12:06:02.889Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT x64 10.0.19043

Operating System

Edition	Windows 10 Enterprise
Version	21H1
Installed on	‎21/‎10/‎2020
OS build	19043.1645
Experience	Windows Feature Experience Pack 120.2212.4170.0

using wsl2 with Ubuntu:

Linux XLW-5CD0118341 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 20.04.3 LTS

Terraform Version

1.1.6

Steps To Reproduce

simply open vscode, or open any .tf file inside vscode

my terraform project directory is a subdirectory of my vscode workspace, however it is merely a directory with many .tf files and has no structure worth note

Expected Behavior

The extension should work

Actual Behavior

The extension throws an error

Additional context

output logs:

2022/05/11 18:17:10 opts.go:218: Received request batch of size 1 (qlen=0)
2022/05/11 18:17:10 opts.go:218: Dequeued request batch of length 1 (qlen=0)
2022/05/11 18:17:10 rpc_logger.go:29: Incoming request for "workspace/executeCommand" (ID 41): {"command":"4.terraform-ls.module.callers","arguments":["uri=vscode-remote://wsl%2Bubuntu-20.04/home/{path to directory containing .tf files}"]}
2022/05/11 18:17:10 rpc_logger.go:45: Error for "workspace/executeCommand" (ID 41): [-32098] URI "vscode-remote://wsl%2Bubuntu-20.04/home/{path to directory containing .tf files}" is not valid
2022/05/11 18:17:10 opts.go:218: Completed 1 requests [0s elapsed]

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
flo-everett-xerocommented, May 12, 2022

Hi - as it turns out, i had the extension installed in “Local” but not in “Ubuntu-20.04”. installing the extension there fixed the problem, and i no longer get the errors. the extension still doesn’t seem to give me any intellisense or code completion, but at least it no longer throws errors every time i open a file! thanks for your help

0reactions
jpograncommented, May 13, 2022

I’m sorry for the initial experience here, but this does help us prevent it in the future.

We did attempt to get VS Code to install the extension in the Remote instance in #989, which according to documentation should have prevented your experience. Obviously I’ll take a second look at this to try to prevent this from occurring again. At the very least a README update is in order.

Regarding the HCL Extension you uninstalled, I’m happy to report that today (as of a few minutes ago) we officially published an update to that extension and there will no longer be a conflict activating the Terraform Extension while the HCL Extension is installed. We’re going to publishing more information about that separately, but wanted to let you know here first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add a directory to the PATH? - Ask Ubuntu
Using ~/.profile to set $PATH. A path set in .bash_profile will only be set in a bash login shell ( bash -l )....
Read more >
URI that maps to local file names - manpages.ubuntu!
If the $filename argument is relative, then the name is resolved relative to the current directory, i.e. this constructor is really the same...
Read more >
Cannot determine current directory - java - Stack Overflow
My old terminal from where I was executing Java commands is not in a valid directory. The file descriptor is invalid since the...
Read more >
How do I shorten the current directory path shown on terminal?
Since bash 4, to shorten the depth of directory in command-line is done by using PROMPT_DIRTRIM in the .bashrc file.
Read more >
How to change directory in Linux terminal - nixCraft
My Dell Laptop came preinstalled with Ubuntu Linux, and I am a new Linux desktop user. How do I change directories in the...
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