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.

Language Server for PHP not work

See original GitHub issue

I am using online version of Codenvy (https://codenvy.io/). I created new PHP workspace from default PHP stack (eclipse/php). I created new project and added new PHP file (hello.php). If I open it, it display popup “Initializing Language Server for hello.php”. After about 15 seconds, it display red popup “Initializing Language Server for hello.php”. If I then try to use Language Server features, it doesn’t work.

I deleted and created few more workspaces, but in all is the same error. I also have old PHP workspace and it works, but I want to replace it with new.

PHP Language Server agent is enabled.

First popup: Initializing Language Server Popup

Second popup: Initializing Language Server error

Reproduction Steps:

  1. Open Codenvy (https://codenvy.io/) and log in.
  2. Create new workspace from default PHP stack and start it.
  3. Create PHP project.
  4. Add new PHP file.
  5. Open this PHP file.

Logs:

[STDOUT] 2018-06-08 16:04:27,639[equestProcessor]  [ERROR] [oggingUncaughtExceptionHandler 31]   - Runtime exception caught in thread ServerSideRequestProcessor. Message: java.io.IOException: Stream closed
[STDOUT] java.lang.RuntimeException: java.io.IOException: Stream closed
[STDOUT] 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:68)
[STDOUT] 	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.request(RemoteEndpoint.java:122)
[STDOUT] 	at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:65)
[STDOUT] 	at com.sun.proxy.$Proxy80.initialize(Unknown Source)
[STDOUT] 	at org.eclipse.che.api.languageserver.registry.ServerInitializerImpl.initialize(ServerInitializerImpl.java:117)
[STDOUT] 	at org.eclipse.che.api.languageserver.registry.LanguageServerRegistryImpl.initialize(LanguageServerRegistryImpl.java:124)
[STDOUT] 	at org.eclipse.che.api.languageserver.service.LanguageServerInitializationHandler.lambda$new$0(LanguageServerInitializationHandler.java:37)
[STDOUT] 	at org.eclipse.che.api.core.jsonrpc.commons.reception.FunctionConfiguratorOneToOne.lambda$withFunction$0(FunctionConfiguratorOneToOne.java:75)
[STDOUT] 	at org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerManager$OneToOneHandler.handle(RequestHandlerManager.java:328)
[STDOUT] 	at org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerManager$OneToOneHandler.access$1000(RequestHandlerManager.java:315)
[STDOUT] 	at org.eclipse.che.api.core.jsonrpc.commons.RequestHandlerManager.handle(RequestHandlerManager.java:212)
[STDOUT] 	at org.eclipse.che.api.core.jsonrpc.commons.RequestDispatcher.dispatch(RequestDispatcher.java:51)
[STDOUT] 	at org.eclipse.che.api.core.jsonrpc.commons.JsonRpcMessageReceiver.processRequest(JsonRpcMessageReceiver.java:97)
[STDOUT] 	at org.eclipse.che.api.core.jsonrpc.commons.JsonRpcMessageReceiver.lambda$receive$0(JsonRpcMessageReceiver.java:72)
[STDOUT] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[STDOUT] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[STDOUT] 	at java.lang.Thread.run(Thread.java:748)
[STDOUT] Caused by: java.io.IOException: Stream closed
[STDOUT] 	at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
[STDOUT] 	at java.io.OutputStream.write(OutputStream.java:116)
[STDOUT] 	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
[STDOUT] 	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
[STDOUT] 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:65)
[STDOUT] 	... 16 common frames omitted

[STDOUT] 2018/06/08 16:07:15 Failed to send websocket message: , due to occurred error websocket: close sent
[STDOUT] 2018/06/08 16:07:15 Error occurs on sending ping message to websocket. websocket: close sent

Codenvy version: Online Codenvy (https://codenvy.io/) - 5.22.1

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
pascal-linuxcommented, Aug 26, 2018

I have the same problem, it is such a pity. Codenvy and Eclipse Che looks incredibly promising - but if php (code completion and templates) are not supported it does not help me. I think this is really a severe bug for all PHP developers who use or intend to use this IDE.

0reactions
filips123commented, Aug 2, 2019

@kde99 Try my comment multiple times, restart workspace, recreate it and try some similar steps. Also try some variations of my comment (see other comments).

Read more comments on GitHub >

github_iconTop Results From Across the Web

The PHP Language Server server crashed 5 times in the last 3 ...
Hello, I'm getting this error since this morning an I do not know ... The PHP Language Server server crashed 5 times in...
Read more >
PHP Language Server error on VSCode - Stack Overflow
I've already tried re-installing the PHP IntelliSense extension, but it didn't work. The PHP path is set in the settings as "php.executablePath" ...
Read more >
Using Psalm's Language Server
Psalm now has built-in Language Server Compatibility support so you can run it in your favourite IDE. It currently supports diagnostics (i.e. finding...
Read more >
Language Support in Visual Studio Code
In Visual Studio Code we have support for all common languages including smart code completion and debugging.
Read more >
VSCode - PHASTA Wiki
Then to run VSCode, simply run code in your terminal. Fortran Language Server setup. Language servers are programs based on the open-source ...
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