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.

Trip report: polymer-editor-server

See original GitHub issue

I’m trying out intellij-lsp with my language server. It works well with vscode, atom, and sublime text’s LSP plugin, and intellij support is a very common request from our users.

I downloaded IntelliJ IDEA CE 2017.3, installed intellij-lsp, and configured my LSP server as a raw command, with a file extension of html, and the command polymer-editor-service. From my logs I can see that polymer-editor-service is started and initialized, and I get onDidChangeWatchedFiles requests, but that’s pretty much it. I don’t get notifications when files are opened, closed, changed in memory, or any requests for features like hover or completions.

Reproducing this is pretty straightforward if you have NodeJS v6 or higher installed. npm install -g polymer-editor-service will get you the LSP server, and the simplest way to check if it’s working is to put something like this in an HTML file:

<link rel="import" href="./does-not-exist.html">

It should report an error diagnostic on the url.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ricticcommented, Dec 20, 2017

I’m working on a new release of our editor server, should be pretty soon. Our integration tests are passing on windows now. We’re still sending over urls like file///d%3A/path/to/file.html as that’s what Microsoft’s own vscode-uri encodes, so I think that’s correct, but we had a bunch of other issues with our URIs on Windows so I wouldn’t rule out that bad URIs were still an issue. Will update this thread once our improved URI handling is released.

Currently with the latest version of intellij-lsp on MacOS (where our URIs should be correct) it looks like something’s failing before initialization completes. Stack trace:

java.io.IOException: Stream closed
java.lang.RuntimeException: java.io.IOException: Stream closed
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:68)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.request(RemoteEndpoint.java:129)
	at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:77)
	at com.sun.proxy.$Proxy94.initialize(Unknown Source)
	at com.github.gtache.lsp.client.languageserver.wrapper.LanguageServerWrapperImpl.start(LanguageServerWrapperImpl.scala:276)
	at com.github.gtache.lsp.client.languageserver.wrapper.LanguageServerWrapperImpl.connect(LanguageServerWrapperImpl.scala:163)
	at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$4(PluginMain.scala:127)
	at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$4$adapted(PluginMain.scala:109)
	at scala.Option.foreach(Option.scala:257)
	at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$3(PluginMain.scala:109)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Stream closed
	at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
	at java.io.OutputStream.write(OutputStream.java:116)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:65)
	... 15 more
0reactions
ricticcommented, Dec 22, 2017

polymer-editor-service v2.1.0 is out now, and should handle windows URIs correctly now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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