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.

Request textDocument/hover failed error from LWC Language Server in VSCode

See original GitHub issue

Summary

Persistent errors in VSCode coming from the LWC Language Server

Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read property 'forEach' of undefined
  Code: -32603 

this is occurring for myself on two different computers in two different projects.

I am also gettting

Request textDocument/definition failed.
  Message: Request textDocument/definition failed with message: Cannot read property 'find' of undefined
  Code: -32603

in another project from the LWC Language Server

Steps To Reproduce:

  1. Open a LWC component in VSCode (does not need forEach method)
  2. Error pops up in Output section of VSCode: “Request textDocument/hover failed”
  3. Error is persistent, keeps occurring as i’m writing code

Expected result

No errors

Actual result

Error messages are continually popping up

Additional information

Screen Shot 2022-03-16 at 10 43 15 AM

Salesforce Extension Version in VS Code: v54.4.1

SFDX CLI Version: sfdx-cli/7.139.0 darwin-x64 node-v16.14.0

OS and version: macOS Monteray

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
mallik-svmxcommented, Mar 18, 2022

I see the issue on my vscode, and its very annoying.

8reactions
randi274commented, Apr 6, 2022

The fix for this has been merged in, and should be available in the following release of the extensions (likely next Wednesday).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Language Server Extension Guide - Visual Studio Code
Learn how to create Language Servers to provide rich language features in Visual Studio Code.
Read more >
vscode language server verbose log shows Sending request ...
vscode language server verbose log shows Sending request 'textDocument/hover - (9)' but server does not get the message. Save this question. ...
Read more >
@salesforce/lwc-language-server - npm
This project is an implementation of the Language Server Protocol for LWC projects. Features. Component template validation; Basic directive ...
Read more >
SFDX in VS Code no longer working as expected
indexStaticResources (c:\Users\james\.vscode\extensions\salesforce.salesforcedx-vscode-lightning-47.9.0\node_modules\lwc-language-server\lib ...
Read more >
User Manual - rust-analyzer
Toolchain; VS Code; rust-analyzer Language Server Binary ... If you get an error saying No such file or directory: 'rust-analyzer' , see 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