Resumable upload fails when writing multiple chunks. #536

Closed
wonderfly opened this Issue Jan 10, 2015 · 4 comments

Comments

Projects
None yet
1 participant
Contributor

wonderfly commented Jan 10, 2015

From rmis...@google.com on June 14, 2012 13:02:05

Reported by internal user:

Writing large amounts of data via resumable upload fails with:

java.io.IOException: insufficient data written
at sun.net.www.protocol.http.HttpURLConnection.close(HttpURLConnection.java:2743)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:83)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:845)
at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:251)
at com.google.api.services.storage.Storage.executeUnparsed(Storage.java:1754)
at com.google.api.services.storage.Storage.execute(Storage.java:1776)

Which is actually caused by writing too much data when uploading a chunk. This started breaking on 5/24 as a result of a change which removed limiting the data copied and did not change MediaHttpUploader#setContentAndHeadersOnCurrentRequest to use a LimitInputStream.

Original issue: http://code.google.com/p/google-api-java-client/issues/detail?id=521

@wonderfly wonderfly self-assigned this Jan 10, 2015

Contributor

wonderfly commented Jan 10, 2015

From rmis...@google.com on June 14, 2012 13:02:14

Labels: Milestone-Version1.10.2

Contributor

wonderfly commented Jan 10, 2015

From rmis...@google.com on June 15, 2012 07:50:05

http://codereview.appspot.com/6294073/

Status: Fixed

Contributor

wonderfly commented Jan 10, 2015

From david.va...@gmail.com on February 13, 2013 02:14:09

I'm sometimes getting a similar error while uploading a file. Is this the same error?
I'm using version v2-rev13-1.8.0-beta

Attachment: googleDriveError.txt

Contributor

wonderfly commented Jan 10, 2015

From rmis...@google.com on February 13, 2013 04:04:13

Yes looks like the same error, it should go away if you use the latest version of the library.

@wonderfly wonderfly closed this Jan 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment