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

[Regression] PHP language server fails to start #5373

Closed
ghost opened this issue Jun 14, 2017 · 2 comments
Closed

[Regression] PHP language server fails to start #5373

ghost opened this issue Jun 14, 2017 · 2 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Milestone

Comments

@ghost
Copy link

ghost commented Jun 14, 2017

Steps to reproduce:

  1. Create a php workspace, enable php language server
  2. Open .php file

There's an error :

Error fetching server capabilities php. org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Argument 2 passed to LanguageServer\LanguageServer::initialize() must be an instance of LanguageServer\Protocol\ClientCapabilities, string given, called in /home/user/che/ls-php/php-language-server/vendor/felixfbecker/advanced-json-rpc/lib/Dispatcher.php on line 164

This can be reproduced with the latest master.

@ghost ghost added kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. team/ide labels Jun 14, 2017
@musienko-maxim musienko-maxim added severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. and removed severity/P1 Has a major impact to usage or development of the system. labels Jun 14, 2017
@riuvshin riuvshin added this to the 5.12.0 milestone Jun 14, 2017
@musienko-maxim
Copy link
Contributor

Related selenium test: PhpProjectDebuggingTest

@slemeur slemeur changed the title PHP language server fails to start [Regression] PHP language server fails to start Jun 14, 2017
@kaloyan-raev
Copy link
Contributor

I hit this too and did some debugging. The LSP protocol specifies that the InitializeParams.capabilities field is mandatory. It can be an empty object, but not undefined/null. So the PHP language server expects it in the initialize request and fails if it is not present in the JSON message body.

On the Che side the ServerInitializerImpl sets an empty ClientCapabilities object as the InitializeParams.capabilities, but then the InitializeParams object is serialized to something like this:

{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "initialize",
  "params": {
    "processId": 24734,
    "rootPath": "/home/user/projects/myproj",
    "clientName": "EclipseChe"
  }
}

i.e. the capabilities object is missing.

@evidolob evidolob self-assigned this Jun 14, 2017
evidolob pushed a commit that referenced this issue Jun 14, 2017
Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
evidolob added a commit that referenced this issue Jun 14, 2017
…ss (#5376)

Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
riuvshin pushed a commit that referenced this issue Jun 14, 2017
…ss (#5376)

Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
JPinkney pushed a commit to JPinkney/che that referenced this issue Aug 17, 2017
…onymous class (eclipse-che#5376)

Signed-off-by: Yevhen Vydolob <evidolob@codenvy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Projects
None yet
Development

No branches or pull requests

4 participants