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

WSL2 - opening VSCode workspace - initialization error - Unsupported or invalid URI #1875

Open
1 task
jeremy-brooks opened this issue Nov 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jeremy-brooks
Copy link

jeremy-brooks commented Nov 7, 2024

Extension Version

v2.33.0

VS Code Version

Version: 1.95.1 (user setup)
Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
Date: 2024-10-31T05:14:54.222Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

Operating System

Windows 10 with WSL2 running Ubuntu 20 and VSCode wsl remote extension

Terraform Version

Terraform 1.9.8

Steps to Reproduce

Install Extension from Within WSL:

Open VSCode from the WSL terminal directly from the folder containing the workspace code my-workspace.
Once VSCode is open and connected to WSL, install the HashiCorp extension from within the WSL environment.

Expected Behaviour

Extension installs and initialises normally

Actual Behaviour

Extension initialisation fails with output:

2024/11/07 07:48:51 opts.go:215: Posting server notification "telemetry/event" {"v":1,"name":"initialize","properties":{"experimentalCapabilities.referenceCountCodeLens":false,"experimentalCapabilities.refreshModuleCalls":true,"experimentalCapabilities.refreshModuleProviders":true,"experimentalCapabilities.refreshTerraformVersion":true,"lsVersion":"0.35.0","options.commandPrefix":false,"options.excludeModulePaths":false,"options.experimentalFeatures.prefillRequiredFields":false,"options.experimentalFeatures.validateOnSave":false,"options.ignoreSingleFileWarning":false,"options.indexing.ignoreDirectoryNames":false,"options.indexing.ignorePaths":false,"options.rootModulePaths":false,"options.terraform.logFilePath":false,"options.terraform.path":false,"options.terraform.timeout":"","options.validation.earlyValidation":true,"root_uri":"invalid"}}
2024/11/07 07:48:51 rpc_logger.go:48: Error for "initialize" (ID 0): [-32602] Unsupported or invalid URI: "file://wsl%24/Ubuntu-20.04/home/jeremybrooks/edf-workspace" This is most likely client bug, please report it.
2024/11/07 07:48:51 opts.go:215: Completed 1 requests [19.4614ms elapsed]
Failure to start terraform-ls. Please check your configuration settings and reload this window
Client: Starting --> Stopped
[Error - 7:48:51 AM] terraform client: couldn't create connection to server.
  Message: Unsupported or invalid URI: "file://wsl%24/Ubuntu-20.04/home/username/my-workspace" This is most likely client bug, please report it.
  Code: -32602 
INVALID_URI_WSL
[Error - 7:48:53 AM] Server process exited with code 1.
Initialization error handled by handler

Terraform Configuration

No response

Project Structure

No response

Gist

No response

Anything Else?

No response

Workarounds

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@jeremy-brooks jeremy-brooks added the bug Something isn't working label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant