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
I am hitting intermittent errors that look like they are coming from when the json responses are being parsed. Wondering if anyone has seen this before:
2020-06-02 22:15:56.509787 vinny-jar: Error thrown when getting reddit post
Expected an int but was BEGIN_OBJECT at path $.data.accounts_active
com.squareup.moshi.JsonDataException: Expected an int but was BEGIN_OBJECT at path $.data.accounts_active
at com.squareup.moshi.JsonUtf8Reader.nextInt(JsonUtf8Reader.java:890)
at com.squareup.moshi.StandardJsonAdapters$7.fromJson(StandardJsonAdapters.java:173)
at com.squareup.moshi.StandardJsonAdapters$7.fromJson(StandardJsonAdapters.java:171)
at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137)
at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137)
at net.dean.jraw.models.AutoValue_Subreddit$MoshiJsonAdapter.fromJson(AutoValue_Subreddit.java:134)
at net.dean.jraw.models.AutoValue_Subreddit$MoshiJsonAdapter.fromJson(AutoValue_Subreddit.java:29)
at net.dean.jraw.models.internal.AutoValue_RedditModelEnvelope$MoshiJsonAdapter.fromJson(AutoValue_RedditModelEnvelope.java:38)
at net.dean.jraw.models.internal.AutoValue_RedditModelEnvelope$MoshiJsonAdapter.fromJson(AutoValue_RedditModelEnvelope.java:17)
at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137)
at net.dean.jraw.databind.RedditModelAdapterFactory$StaticAdapter.fromJson(RedditModelAdapterFactory.kt:112)
at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:41)
at net.dean.jraw.http.HttpResponse.deserializeWith(HttpResponse.kt:49)
at net.dean.jraw.references.SubredditReference.about(SubredditReference.kt:254)
The text was updated successfully, but these errors were encountered:
I guess this becomes an increasing problem as JRAW loses support and the Reddit API continues to change. Here's my hack to avoid having to alter and re-build JRAW (essentially intercept the JSON payloads and change the JSON such that JRAW recognises it): #300 (comment)
The comment shows an example of removing oembed elements with null type fields from the JSON before JRAW gets to see the JSON
I am hitting intermittent errors that look like they are coming from when the json responses are being parsed. Wondering if anyone has seen this before:
The text was updated successfully, but these errors were encountered: