Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsonDataException: Expected an int but was NULL at path $.data.children[1].data.embeds[0].height #247

Closed
andsala opened this issue May 2, 2018 · 0 comments

Comments

@andsala
Copy link
Contributor

andsala commented May 2, 2018

When trying to get live thread updates pagination.next() fails to parse JSON due to embeds.height being null.

The thread I'm referring to is zp5qyj61kmzg but I faced the same error with other threads.

Caused by: com.squareup.moshi.JsonDataException: Expected an int but was NULL at path $.data.children[1].data.embeds[0].height
        at com.squareup.moshi.JsonUtf8Reader.nextInt(JsonUtf8Reader.java:875)
        at com.squareup.moshi.StandardJsonAdapters$7.fromJson(StandardJsonAdapters.java:163)
        at com.squareup.moshi.StandardJsonAdapters$7.fromJson(StandardJsonAdapters.java:161)
        at net.dean.jraw.models.AutoValue_LiveUpdate_Embed$MoshiJsonAdapter.fromJson(AutoValue_LiveUpdate_Embed.java:46)
        at net.dean.jraw.models.AutoValue_LiveUpdate_Embed$MoshiJsonAdapter.fromJson(AutoValue_LiveUpdate_Embed.java:18)
        at com.squareup.moshi.CollectionJsonAdapter.fromJson(CollectionJsonAdapter.java:76)
        at com.squareup.moshi.CollectionJsonAdapter$2.fromJson(CollectionJsonAdapter.java:53)
        at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:128)
        at net.dean.jraw.models.AutoValue_LiveUpdate$MoshiJsonAdapter.fromJson(AutoValue_LiveUpdate.java:81)
        at net.dean.jraw.models.AutoValue_LiveUpdate$MoshiJsonAdapter.fromJson(AutoValue_LiveUpdate.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:128)
        at net.dean.jraw.databind.RedditModelAdapterFactory$StaticAdapter.fromJson(RedditModelAdapterFactory.kt:112)
        at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:128)
        at net.dean.jraw.databind.RedditModelAdapterFactory$ListingAdapter.readListing(RedditModelAdapterFactory.kt:197)
        at net.dean.jraw.databind.RedditModelAdapterFactory$ListingAdapter.fromJson(RedditModelAdapterFactory.kt:168)
        at net.dean.jraw.databind.RedditModelAdapterFactory$ListingAdapter.fromJson(RedditModelAdapterFactory.kt:154)
        at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:35)
        at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:39)
        at net.dean.jraw.http.HttpResponse.deserializeWith(HttpResponse.kt:49)
        at net.dean.jraw.pagination.Paginator.next(Paginator.kt:65)
        ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant