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

vscode goto definition error with lsp #309

Closed
jvalkeal opened this issue Jun 23, 2019 · 6 comments
Closed

vscode goto definition error with lsp #309

jvalkeal opened this issue Jun 23, 2019 · 6 comments
Milestone

Comments

@jvalkeal
Copy link

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
@sangramsingha
Copy link

sangramsingha commented 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. :-D

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Kris De Volder:)

Testing before deliver... still getting error in latest snapshot. Taking another look.

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Kris De Volder:)

Not really made any additional changes but this morning's snapshot seems to have the fix and it seems to be working. Not sure what went wrong before, probably an issue related to building or downloading an old artefact.

Working now, so delivering this.

@ghost
Copy link

ghost commented Jun 26, 2019

I have the same issues, vscode-spring-boot-1.8.0. I don't know how to resolve it.

@martinlippert
Copy link
Member

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.

@sangramsingha
Copy link

Thanks..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants