Open samgherman opened 2 years ago
I'm facing the same problem. @samgherman how did you solve this problem
@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…
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?
@samgherman good news. Now the videos are loading and working fine. May be it was the issue with Vimeo servers, which has be resolved.
@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.
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.
@skavinvarnan looks like videos won't play for me again. Are you having an issue too?
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
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