Skip to content

vscode goto definition error with lsp #309

Closed

Description

@jvalkeal

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

Activity

  1. sangramsingha commented on Jun 24, 2019

    @sangramsingha

    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

  2. added this to the 4.3.1.RELEASE milestone on Jun 24, 2019
  3. spring-projects-issues commented on Jun 24, 2019

    @spring-projects-issues

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

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

  4. spring-projects-issues commented on Jun 25, 2019

    @spring-projects-issues

    (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.

  5. martinlippert commented on Jun 26, 2019

    @martinlippert
    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.

  6. sangramsingha commented on Jun 26, 2019

    @sangramsingha

    Thanks..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions