io.typefox.lsapi.services.json.InvalidMessageException

Could not parse response: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web252

  • via GitHub by mickaelistria
    ,
  • Stack trace

    • io.typefox.lsapi.services.json.InvalidMessageException: Could not parse response: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at io.typefox.lsapi.services.json.MessageJsonHandler.parseResponse(MessageJsonHandler.xtend:199) at io.typefox.lsapi.services.json.MessageJsonHandler.parseMessage(MessageJsonHandler.xtend:142) at io.typefox.lsapi.services.json.MessageJsonHandler.parseMessage(MessageJsonHandler.xtend:131) at io.typefox.lsapi.services.json.LanguageServerProtocol.handleMessage(LanguageServerProtocol.xtend:72) at io.typefox.lsapi.services.json.LanguageServerProtocol$IOHandler.handleMessage(LanguageServerProtocol.xtend:267) at io.typefox.lsapi.services.json.LanguageServerProtocol$IOHandler.run(LanguageServerProtocol.xtend:203) at io.typefox.lsapi.services.json.LanguageServerProtocol$IOHandler.run(LanguageServerProtocol.xtend:163) 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: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:221) at com.google.gson.Gson.fromJson(Gson.java:861) at com.google.gson.Gson.fromJson(Gson.java:926) at com.google.gson.Gson.fromJson(Gson.java:899) at io.typefox.lsapi.services.json.MessageJsonHandler.parseResponse(MessageJsonHandler.xtend:188) ... 11 more Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at com.google.gson.internal.bind.JsonTreeReader.expect(JsonTreeReader.java:139) at com.google.gson.internal.bind.JsonTreeReader.beginArray(JsonTreeReader.java:58) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:80) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:217) ... 15 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    jf-astjf-ast
    6 times, last one
    Hiren AmaliyarHiren Amaliyar
    2 times, last one
    Nikolay RybakNikolay Rybak
    9 times, last one
    justCodeitjustCodeit
    11 times, last one
    filpgamefilpgame
    4 times, last one
    47 more bugmates