bobolounna / restfb

Automatically exported from code.google.com/p/restfb
0 stars 0 forks source link

RestFB Video Publish - SocketTimeoutException #206

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Running the code below for a video (sizes between 10 MB & 99 MB) to an 
unpublished page:

FacebookType result = facebookClient.publish("me/videos", FacebookType.class, 
BinaryAttachment.with("videos.mp4", InputStream), Parameter.with("description", 
description));

What is the expected output? What do you see instead?

Expected Output:

Successful video publishing with video showing on FB & playing to the end. 
FacebookType with id is successfully returned.

Actual Output:

Video is published (shows on FB after a while & plays to the end); however, 
FacebookType with id is not returned.

Aug 12, 2013 11:24:58 AM com.restfb.DefaultWebRequestor executePost
WARNING: An error occurred while POSTing to 
https://graph-video.facebook.com/518084091573454/videos: 
java.net.SocketTimeoutException: Read timed out
com.restfb.exception.FacebookNetworkException: A network error occurred while 
trying to communicate with Facebook: Facebook request failed (HTTP status code 
null)
    at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:615)
    at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:592)
    at com.restfb.DefaultFacebookClient.publish(DefaultFacebookClient.java:295)
Caused by: java.net.SocketTimeoutException: Read timed out
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1672)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1670)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
    at com.restfb.DefaultWebRequestor.executePost(DefaultWebRequestor.java:201)
    at com.restfb.DefaultFacebookClient$2.makeRequest(DefaultFacebookClient.java:597)
    at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:613)

What version of the product are you using? On what operating system?

RestFB 1.6.12 on Ubuntu 13.04

Please provide any additional information below.

By default read time out for a com.restfb.DefaultWebRequestor is 3 minutes. Is 
there a way to increase the time out? As is, private static final int 
DEFAULT_READ_TIMEOUT_IN_MS = 180000;

What is the work around solution to this issue?

Original issue reported on code.google.com by Modumo.M...@gmail.com on 12 Aug 2013 at 9:51