com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Parth Panchal
, 10 months ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
via Stack Overflow by Charlotte1993
, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
via Stack Overflow by selva simon p
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
via stackapps.com by Unknown author, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 12
via GitHub by kroepke
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 5
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:387)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:210)
at com.google.gson.Gson.fromJson(Gson.java:814)
at retrofit.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:36)
at retrofit.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:24)
at retrofit.OkHttpCall.parseResponse(OkHttpCall.java:148)
at retrofit.OkHttpCall.access$100(OkHttpCall.java:29)
at retrofit.OkHttpCall$1.onResponse(OkHttpCall.java:94)
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:168)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

Users with the same issue

11 times, 8 months ago
4 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
4 times, 11 months ago
6 times, 5 months ago
54 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.