Skip to content

2 Exceptions in IJ #1274

Closed
Closed

Description

@ia3andy

Sadly most of the time my IDE get stuck most of the time when looking for reference, it's due to those plugins :(

We really need to make sure we are more resilient!

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.Gson.fromJson(Gson.java:1238)
	at com.google.gson.Gson.fromJson(Gson.java:1186)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:119)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:114)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:193)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:393)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:93)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:56)
	at com.google.gson.Gson.fromJson(Gson.java:1227)
	... 11 more

java.lang.IllegalStateException: Missing header Content-Length in input ",result":{"capabilities":{"textDocumentyc:,hvrrvider":as,diiionProvider:as,rfrnePoie"fle"ouetihihPoie"fle"ouetyblrvdr:as,rnmPoie"ikHnPoie"flse}}}{jorc:2.0","id""""eutte"{txDcyc:,hvdr:ase,"definitionPrvdr:as,rferencesProvide"fle"documentHighihPoie"SmoPoie":false,rnmPovider":false,"ikddtnRngeProvider":tre"naHnPovider":false}}}ontent-Length: 38

"
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:91)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Activity

  1. angelozerr commented on Sep 18, 2025

    @angelozerr
    Contributor

    Duplicate of #1192 I need really to investigate this issue but unfortunately I don't know how to reproduce it.

  2. ia3andy commented on Sep 18, 2025

    @ia3andy
    Author

    It seems to be wrongly assuming a file is JSON

  3. angelozerr commented on Sep 18, 2025

    @angelozerr
    Contributor

    Yes sure, but it is a problem with start/stop language server and multi thread context. I need to revisit the full code to avoid having this problem which is not trivial, but I will work on this issue once Qute debugger will be merged.

  4. fbricon commented on Sep 18, 2025

    @fbricon
    Contributor

    It seems to be wrongly assuming a file is JSON

    no, it's the json response from a LS that's being mangled, becoming unparseable as json:

    {"capabilities":{"textDocumentyc:,hvrrvider":as,diiionProvider:as,rfrnePoie"fle"ouetihihPoie"fle"ouetyblrvdr:as,rnmPoie"ikHnPoie"flse}}}{jorc:2.0","id""""eutte"{txDcyc:,hvdr:ase,"definitionPrvdr:as,rferencesProvide"fle"documentHighihPoie"SmoPoie":false,rnmPovider":false,"ikddtnRngeProvider":tre"naHnPovider":false}}}ontent-Length: 38

  5. added
    bug
    on Oct 1, 2025
  6. added this to the 0.17.0 milestone on Oct 1, 2025
  7. self-assigned this
    on Oct 1, 2025
  8. moved this to In Progress in Java Toolingon Oct 1, 2025
  9. angelozerr commented on Oct 1, 2025

    @angelozerr
    Contributor

    It should be fixed with #1303

  10. moved this from In Progress to Done in Java Toolingon Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions