Shopify / Shopify/ruby-lsp

`Error: Unable to resolve text model content for resource embedded` when hovering HTML

Open
#2,784 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug help-wanted pinned vscode
Dominant language
Ruby
Stars
2k
Forks
281
Avg merge
2h 14m
Merged PRs (30d)
6

Description

Description
Ruby LSP Information
VS Code Version

1.94.2

Ruby LSP Extension Version

0.8.8

Ruby LSP Server Version

0.20.1

Ruby LSP Addons
  • Ruby LSP Rails
Ruby Version

3.3.5

Ruby Version Manager

rbenv

Installed Extensions
Click to expand
  • vscode-erb-beautify (0.5.0)
  • vscode-django (1.15.0)
  • vscode-markdownlint (0.56.0)
  • python-environment-manager (1.2.4)
  • python-extension-pack (1.7.0)
  • EditorConfig (0.16.4)
  • copilot (1.242.1180)
  • copilot-chat (0.22.2024100702)
  • vscode-github-actions (0.27.0)
  • go (0.42.1)
  • haskell (2.4.4)
  • language-haskell (3.6.0)
  • vsc-python-indent (1.18.0)
  • rainbow-csv (3.12.0)
  • git-graph (1.30.0)
  • data-workspace-vscode (0.5.0)
  • mssql (1.25.0)
  • sql-bindings-vscode (0.4.0)
  • sql-database-projects-vscode (1.4.3)
  • debugpy (2024.12.0)
  • isort (2023.10.1)
  • pylint (2024.0.0)
  • python (2024.16.1)
  • vscode-pylance (2024.10.1)
  • datawrangler (1.12.0)
  • jupyter (2024.9.1)
  • jupyter-keymap (1.1.2)
  • jupyter-renderers (1.0.19)
  • cmake-tools (1.19.52)
  • cpptools (1.22.10)
  • cpptools-extension-pack (1.3.0)
  • cpptools-themes (2.0.0)
  • hexeditor (1.10.0)
  • makefile-tools (0.11.13)
  • powershell (2024.2.2)
  • vscode-speech (0.10.0)
  • autodocstring (0.6.1)
  • vscode-powerquery (0.1.60)
  • scala (0.5.8)
  • metals (1.40.0)
  • ruby-lsp (0.8.8)
  • rewrap (1.16.3)
  • cmake (0.0.17)
  • vim (1.28.1)
  • jinja (0.0.8)
  • five-server (0.3.1)
  • dark-ruby-theme (1.2.0)
  • markdown-pdf (1.5.0)
Ruby LSP Settings
Click to expand
Workspace
{}
User
{
  "enableExperimentalFeatures": true,
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": true,
    "foldingRanges": true,
    "formatting": true,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": true,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": true,
    "definition": true,
    "workspaceSymbol": true,
    "signatureHelp": true,
    "typeHierarchy": true
  },
  "featuresConfiguration": {},
  "addonSettings": {
    "rubocop": {
      "lint": true,
      "format": true
    },
    "erb": {
      "lint": true,
      "format": true
    }
  },
  "rubyVersionManager": {
    "identifier": "auto"
  },
  "customRubyCommand": "",
  "formatter": "rubocop",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true
}
Reproduction steps
  1. Start the Ruby LSP using VSCode
  2. Open an ERB file
  3. Hover over an HTML tag
  4. No documentation provided and error thrown. The Ruby LSP output is as follows:
2024-10-25 15:21:20.805 [info] (top_flickr_api) [Error - 3:21:20 PM] Request textDocument/hover failed.
2024-10-25 15:21:20.805 [info] (top_flickr_api) Error: Unable to resolve text model content for resource embedded-content://html/file%3A///home/username/courses/top/rails/top_flickr_api/app/views/layouts/application.html.erb.html
    at q8e.u (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1279:21909)
    at async q8e.r (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1279:20939)
    at async nfi.acquire (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:25:3125)
    at async G8e.createModelReference (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1279:22405)

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

Start by reproducing the textDocument/hover request in an ERB file and inspect the embedded-content resource referenced in the VS Code error. Trace how hovering an HTML tag resolves that resource; done means HTML hover requests return documentation without the resolution error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.