Shopify / Shopify/theme-tools

Shopify Liquid VS code extension error Request textDocument/hover failed

Open
#862 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Windows
Dominant language
TypeScript
Stars
234
Forks
92
Avg merge
1d 3h
Merged PRs (30d)
6

Description

Describe the bug
Whenever my mouse hovers over any code in my liquid code files I get the error message Request textDocument/hover failed popping up in the bottom right. When you click check the out put it gives the following Message: Request textDocument/hover failed with message: [UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")
Code: -32603

Source
if I hover over the p element in this example but does the same for any other.

<p> "hello world" </p>

Expected behaviour
It is meant to give you information about the element that you are hovering over.

Actual behaviour
Just gives an insufferable error message that you can't stop from showing up.

Debugging information

  • OS Windows
  • OS Version: Windows 11 Pro 64-bit
  • Theme Check Version [e.g. 3.7.0]

Additional context
I have checked the file path it gives me which is just the file path to where it is installed on my computer and at no point does it contain "//". I don't even want the information to show up when I hover over different elements the error is just doing my head in. I would like to add as well this only happens in liquid files no error messages like this show up in HTML, CSS or JS files.

Also when it is a HTML element in a liquid file it does show the information about it like for example if I hover over a "option" element it gives me this "The option element represents an option in a select element or as part of a list of suggestions in a datalist element." but still throughs up the error in the bottom right.

Image

Image

PS. Sorry if this is in the wrong place quite new to github and if it is please help by pointing me to the correct place to get help with this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the textDocument/hover request in a Liquid file on Windows and trace the URI error reported in the language-server path; done when hovering no longer raises the error and still provides the expected element information.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.