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.

vscode goto definition error with lsp

See original GitHub issue

This issue started to happen when vscode upgraded to Spring Boot Tools 1.8.0.

Take any boot app(or probably any java class), i.e:

@SpringBootApplication
public class Application {

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
}

Hover over any symbol with ctrl, i.e. Application to fire vscode to send Goto Definition textDocument/definition and vscode-spring-boot logs

[Error - 14:29:32] Request textDocument/definition failed.
Error: The received response has neither a result nor an error property.
	at handleInvalidMessage (/home/jvalkealahti/.vscode/extensions/pivotal.vscode-spring-boot-1.8.0/node_modules/vscode-jsonrpc/lib/main.js:517:40)
	at processMessageQueue (/home/jvalkealahti/.vscode/extensions/pivotal.vscode-spring-boot-1.8.0/node_modules/vscode-jsonrpc/lib/main.js:266:17)
	at Immediate.setImmediate (/home/jvalkealahti/.vscode/extensions/pivotal.vscode-spring-boot-1.8.0/node_modules/vscode-jsonrpc/lib/main.js:247:13)
	at runCallback (timers.js:696:18)
	at tryOnImmediate (timers.js:667:5)
	at processImmediate (timers.js:649:5)

There’s no errors in a LSP server logs. Only thing what gets logged there is:

14:29:32.713 [Simple-Language-Server main thread] INFO  o.s.i.v.c.l.u.SimpleTextDocumentService - Closed: jdt://contents/spring-boot-2.2.0.M3.jar/org.springframework.boot/SpringApplication.class?%3Dspring-cloud-dataflow-language-server%2F%5C%2Fhome%5C%2Fjvalkealahti%5C%2F.gradle%5C%2Fcaches%5C%2Fmodules-2%5C%2Ffiles-2.1%5C%2Forg.springframework.boot%5C%2Fspring-boot%5C%2F2.2.0.M3%5C%2Ffc0b424da418b242c3d953bd6bbf06f03bfb1925%5C%2Fspring-boot-2.2.0.M3.jar%3Corg.springframework.boot%28SpringApplication.class

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
martinlippertcommented, Jun 26, 2019

There is a nightly CI build for the VS Code extension available that should fix this issue. Download the vsix file from here: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html, then go to the extension tab, and select to install an extension from a file from the dropdown menu. It will replace the release version.

1reaction
sangramsinghacommented, Jun 24, 2019

I got same issue, well it didn’t cause much issue with navigating file or anything. Its just annoys me. It will take the focus out of Application output i am working on to to vscode-spring-bootoutput.

To mitigate i have switched to version 1.7.0. Thankfully it doesn’t annoys me. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Language Server Extension Guide - Visual Studio Code
With Language Servers, you can implement autocomplete, error-checking (diagnostics), jump-to-definition, and many other language features supported in VS ...
Read more >
Go To Definition in the Language Server Protocol - Strumenta
This is the editor command that allows us to quickly find where a symbol is defined elsewhere in the code.
Read more >
"Go to definition" highlight in VSCode LSP - Stack Overflow
I'm implementing a VSCode extension that registers a DefinitionProvider. The "go to definition" works, but my issue is with the highlight.
Read more >
Extension for Visual Studio Code - Sorbet
Live error squiggles for Sorbet typechecking errors (demo):. Type information and documentation on hover (demo):. Go to definition / type definition (demo):.
Read more >
'Go to Definition' for stdlib - VSCode Swift extension
This request includes the file and position in the file to locate symbol I want to go to definition of. The LSP server...
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