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

As of 10AM Stopped Working Completely - Vimeo changed JSON response? #540

Open
samgherman opened this issue Feb 18, 2022 · 8 comments
Open

Comments

@samgherman
Copy link

samgherman commented Feb 18, 2022

As of 10AM this morning it looks like Vimeo changed something in the way the VideoFile.createdTime JSON is returned which now vimeo-networking-java cannot parse, and it crashes.

This is not an issue with my app, as my published app which hasn't been touched in about a month all of a sudden was inundated with crashes stemming from people trying to watch videos. There seems to be no way to make any calls to the API which work.

I also want to point out that whatever change was made has not affected iOS its just Android.

Example:

private VimeoClient mApiClient;

...

// this returns that it succeeds, as you can see by the log its status is 200, but it fails to parse the json

mApiClient.fetchNetworkContent(uriString, new ModelCallback(VideoList.class) {
@OverRide
public void success(VideoList videoList) {
// videoList now always returns null
}

Log:

I/System.out: --------- RESPONSE ---------
I/System.out: ENDPOINT: /channels/1737292/videos
I/System.out: STATUS CODE: 200
I/System.out: REQUEST TIME: 784.3ms
I/System.out: --------- RESPONSE END ---------
I/System.out: Error when deserializing object!
W/System.err: com.google.gson.JsonSyntaxException: java.io.IOException: Error parsing VideoFile.createdTime JSON!
W/System.err: at com.google.gson.Gson.fromJson(Gson.java:947)
W/System.err: at com.google.gson.Gson.fromJson(Gson.java:897)
W/System.err: at com.google.gson.Gson.fromJson(Gson.java:846)
W/System.err: at com.google.gson.Gson.fromJson(Gson.java:817)
W/System.err: at com.vimeo.networking.GsonDeserializer.deserializeObject(GsonDeserializer.java:66)
W/System.err: at com.vimeo.networking.GsonDeserializer.deserialize(GsonDeserializer.java:58)
W/System.err: at com.vimeo.networking.VimeoClient$5.success(VimeoClient.java:1169)
W/System.err: at com.vimeo.networking.callbacks.VimeoCallback.onResponse(VimeoCallback.java:55)
W/System.err: at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
W/System.err: at android.os.Handler.handleCallback(Handler.java:938)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err: at android.os.Looper.loop(Looper.java:233)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:8063)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
W/System.err: Caused by: java.io.IOException: Error parsing VideoFile.createdTime JSON!
W/System.err: at com.vimeo.stag.generated.ParseUtils.parseVideoFile(ParseUtils.java:868)
W/System.err: at com.vimeo.stag.generated.Stag$VideoFileAdapter.read(Stag.java:411)
W/System.err: at com.vimeo.stag.generated.Stag$VideoFileAdapter.read(Stag.java:397)
W/System.err: at com.vimeo.stag.generated.Stag.readListFromAdapter(Stag.java:85)
W/System.err: at com.vimeo.stag.generated.ParseUtils.parseArray(ParseUtils.java:67)
W/System.err: at com.vimeo.stag.generated.ParseUtils.parseVideo(ParseUtils.java:1886)
W/System.err: at com.vimeo.stag.generated.Stag$VideoAdapter.read(Stag.java:321)
W/System.err: at com.vimeo.stag.generated.Stag$VideoAdapter.read(Stag.java:307)
W/System.err: at com.vimeo.stag.generated.Stag.readListFromAdapter(Stag.java:85)
W/System.err: at com.vimeo.stag.generated.ParseUtils.parseArray(ParseUtils.java:67)
W/System.err: at com.vimeo.stag.generated.ParseUtils.parseVideoList(ParseUtils.java:4842)
W/System.err: at com.vimeo.stag.generated.Stag$VideoListAdapter.read(Stag.java:123)
W/System.err: at com.vimeo.stag.generated.Stag$VideoListAdapter.read(Stag.java:109)
W/System.err: at com.google.gson.Gson.fromJson(Gson.java:932)
W/System.err: ... 15 more

@samgherman samgherman changed the title As of 10AM Stopped Working Completely As of 10AM Stopped Working Completely - Vimeo changed JSON response? Feb 18, 2022
@skavinvarnan
Copy link

I'm facing the same problem. @samgherman how did you solve this problem

@samgherman
Copy link
Author

@skavinvarnan I didn’t. I’m hopelessly watching crashes pile up in my app, and redirecting angry customer emails to our YouTube channel. Tried to put through an emergency update in the Play Store which just takes people to YouTube instead, but hasn’t gone through yet. I think I’m going to be looking for alternatives…

@skavinvarnan
Copy link

skavinvarnan commented Feb 18, 2022

Sad to hear, even i haven't figured out a solution. Will keep you posted if i figure out a solution. Btw whats the version of the library you are using?

@skavinvarnan
Copy link

@samgherman good news. Now the videos are loading and working fine. May be it was the issue with Vimeo servers, which has be resolved.

@samgherman
Copy link
Author

@skavinvarnan yes! It's back as of 2AM this morning. I think my solution is going forward is going to be to check if the server is working properly and then if not direct them to YouTube. I'm using Vimeo to display my instructional videos, thankfully that's all I'm relying on it for.

@samgherman
Copy link
Author

Now the question is, what happened on their end? How do we know this won't happen again in the future? Would love some kind of explanation before closing the issue.

@samgherman
Copy link
Author

@skavinvarnan looks like videos won't play for me again. Are you having an issue too?

@joicepjoy
Copy link

joicepjoy commented Jul 22, 2022

Hi @samgherman @skavinvarnan , I am also getting an error on Android and it is failing on deserialisation because the of the invalid response from VIMEO api.
Error is:

Exception(throwable=com.squareup.moshi.JsonDataException: Expected an int but was BEGIN_OBJECT at path $.parent_project.metadata.connections.items.total)

total field is an integer in entire api response except in metadata.connections.items where I am getting this:
"total": {}.

Vimeo Api: https://api.vimeo.com/me/videos/{video-id}

Note: Tried updating the latest version of library as well but no luck!!

Library reference:

@JsonClass(generateAdapter = true)
data class BasicConnection(

    @Json(name = "options")
    override val options: List<String>? = null,

    @Json(name = "uri")
    override val uri: String? = null,

    @Json(name = "total")
    val total: Int? = null

) : Connection

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

3 participants