ant-druha / intellij-powershell

Adds PowerShell language support to IntelliJ-based IDEs.
https://plugins.jetbrains.com/plugin/10249-powershell
Apache License 2.0
72 stars 20 forks source link

Exception thrown on PhpStorm startup: `java.io.IOException: The pipe has been ended` #171

Closed lauxjpn closed 9 months ago

lauxjpn commented 10 months ago

The following exception is shown by PhpStorm (using PowerShell plugin version 2.3.0 and PhpStorm 2023.2.3):

java.lang.RuntimeException: java.io.IOException: The pipe has been ended
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:68)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.notify(RemoteEndpoint.java:102)
    at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:74)
    at jdk.proxy8/jdk.proxy8.$Proxy185.didOpen(Unknown Source)
    at com.intellij.plugin.powershell.lang.lsp.languagehost.TextDocumentServiceQueue$didOpen$2.invokeSuspend(TextDocumentServiceQueue.kt:45)
    at com.intellij.plugin.powershell.lang.lsp.languagehost.TextDocumentServiceQueue$didOpen$2.invoke(TextDocumentServiceQueue.kt)
    at com.intellij.plugin.powershell.lang.lsp.languagehost.TextDocumentServiceQueue$didOpen$2.invoke(TextDocumentServiceQueue.kt)
    at com.intellij.plugin.powershell.lang.lsp.languagehost.TextDocumentServiceQueue$executeTask$3$2.invokeSuspend(TextDocumentServiceQueue.kt:35)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.io.IOException: The pipe has been ended
    at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
    at java.base/sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:68)
    at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:132)
    at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:97)
    at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:67)
    at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:288)
    at java.base/java.nio.channels.Channels.writeFullyImpl(Channels.java:74)
    at java.base/java.nio.channels.Channels.writeFully(Channels.java:96)
    at java.base/java.nio.channels.Channels$1.write(Channels.java:171)
    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
    at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:65)
    ... 15 more

The project is a standard PHP project with a couple of PowerShell run configurations. While PhpStorm is run on Windows, the project is hosted via WSL2.

This has been happening now for about 2 months.

The exception is thrown on every IDE start, so feel free to ask for more information (specific log excerpts etc.) if needed.

ForNeVeR commented 10 months ago

Could you please attach the IDE log file? Help → Collect Logs should allow to get it.

My guess is that the language server has been terminated for some reason. Hopefully, the log should contain additional clues.

github-actions[bot] commented 9 months ago

This issue was closed because it has been open for 14 days, but no requested information was received. Please leave a comment if you think this is a mistake.