bearyg / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Upload to YouTube fails with java.io.IOException: insufficient data written, but video still appears on YouTube #774

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-api-java-client (e.g. 1.5.0-beta)?
1.13.2-beta

Java environment (e.g. Java 6, Android 2.3, App Engine)?
Java 6 (Linux)

Describe the problem.
Occasionally when uploading videos to YouTube using API v3, the call to 
insert(...).execute() will fail with an IOException claiming that not all of 
the data was written, but the video still appears on YouTube as if it was 
uploaded successfully. Most of the time the same code works as expected with no 
exception.

The call being made is as follows:
youTube.videos().insert(
    "snippet,status",
    video,
    new InputStreamContent(
        mimeType,
        inputStream)
        .setLength(fileSize))
    .execute();

How would you expect it to be fixed?
The call should not except.

Original issue reported on code.google.com by jlau...@whosay.com on 25 Apr 2013 at 2:43

GoogleCodeExporter commented 9 years ago
This is similar to closed ticket 521, except that I'm not using resumable 
uploads. Also, that was marked as fixed in 1.10.

Original comment by jlau...@whosay.com on 25 Apr 2013 at 2:46

GoogleCodeExporter commented 9 years ago
Version of google-api-java-client (e.g. 1.5.0-beta)?
1.14.1-beta

Java environment (e.g. Java 6, Android 2.3, App Engine)?
Java 6 (Windows)

Describe the problem.
I'm getting the same error, even when uploader.setDirectUploadEnabled(true);

Original comment by didac.mo...@gmail.com on 16 May 2013 at 3:21