You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are seeing an issue where fromJson results in a JsonSyntaxException with the root cause being an IllegalStateException. The stacktrace that comes from within the GSON library is:
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
at com.google.gson.Gson.fromJson(Gson.java:927)
at com.google.gson.Gson.fromJson(Gson.java:892)
at com.google.gson.Gson.fromJson(Gson.java:841)
at com.google.gson.Gson.fromJson(Gson.java:813)
at com.stripe.net.LiveStripeResponseGetter.request(LiveStripeResponseGetter.java:66)
... 136 common frames omitted
Caused by: java.lang.IllegalStateException: null
at com.google.gson.Gson$FutureTypeAdapter.read(Gson.java:1009)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
... 141 common frames omitted
This seems to be due to a race condition in Gson.getAdapter where a FutureTypeAdapter is created by one thread and accessed by another before the delegate is set
mwalkerr
changed the title
fromJson intermittently fails with IllegalStateException
fromJson intermittently fails with IllegalStateException when deserializing recursive structures in parallel
Dec 2, 2020
We are seeing an issue where
fromJson
results in aJsonSyntaxException
with the root cause being anIllegalStateException
. The stacktrace that comes from within the GSON library is:This seems to be due to a race condition in
Gson.getAdapter
where aFutureTypeAdapter
is created by one thread and accessed by another before the delegate is setgson/gson/src/main/java/com/google/gson/Gson.java
Line 433 in 5370b07
edit: This looks to be well described by the comment on #625 : #625 (comment)
The text was updated successfully, but these errors were encountered: