java-stellar-sdk
java-stellar-sdk copied to clipboard
Not a JSON Object: "problem"
version 0.31.0
07:44:57.547 [OkHttp https://horizon.stellar.org/...] ERROR com.novadax.coin.xlm.WalletXLMServiceImpl -xlm-failure->>{}
shadow.com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Not a JSON Object: "problem"
at shadow.com.google.gson.Gson.fromJson(Gson.java:939)
at shadow.com.google.gson.Gson.fromJson(Gson.java:892)
at shadow.com.google.gson.Gson.fromJson(Gson.java:841)
at shadow.com.google.gson.Gson.fromJson(Gson.java:813)
at org.stellar.sdk.requests.SSEStream$StellarEventSourceListener.onEvent(SSEStream.java:202)
at shadow.okhttp3.internal.sse.RealEventSource.onEvent(RealEventSource.java:111)
at shadow.okhttp3.internal.sse.ServerSentEventReader.completeEvent(ServerSentEventReader.java:112)
at shadow.okhttp3.internal.sse.ServerSentEventReader.processNextEvent(ServerSentEventReader.java:69)
at shadow.okhttp3.internal.sse.RealEventSource.processResponse(RealEventSource.java:80)
at shadow.okhttp3.internal.sse.RealEventSource.onResponse(RealEventSource.java:54)
at shadow.okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
at shadow.okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
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:748)
Caused by: java.lang.IllegalStateException: Not a JSON Object: "problem"
at shadow.com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
at org.stellar.sdk.responses.OperationDeserializer.deserialize(OperationDeserializer.java:34)
at org.stellar.sdk.responses.OperationDeserializer.deserialize(OperationDeserializer.java:20)
at shadow.com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
at shadow.com.google.gson.Gson.fromJson(Gson.java:927)
... 14 common frames omitted
how to solve this
this bug was threw from java sdk, and happens frequently
question 2:
once the onFailure
function get the bug upon, the stream will stop listening..
Same issue
Let's track it here for the second question.
Due to the lack of sufficient debug information (such as transaction hash), and I am unable to reproduce it either, so I have decided to close it. If there are any further issues later on, feel free to reopen it.