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

Unable to upload large file using 'com.box:box-android-sdk:4.2.3' #441

Open
Neeraj0910 opened this issue Jun 9, 2021 · 0 comments
Open
Assignees
Labels

Comments

@Neeraj0910
Copy link

I have checked that the [SDK documentation][sdk-docs] doesn't solve my issue.
I have checked that the [API documentation][api-docs] doesn't solve my issue.
I have searched the [Box Developer Forums][dev-forums] and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
I have searched [Issues in this repo][github-repo] and my issue isn't already reported.

Description of the Issue

Using box-content-sdk to upload large files. Upload video more than 200MB in file size. Sometimes it works with WiFI but 90% of the time it fails also with Wifi and throw below exception. Tried with Pixel series with different networks also with other high end devices.
We are using this implementation using Kotlin language.

Steps to Reproduce

Just uploading large video files using chunks as method mentioned in sdk.
Getting exception here in below line LargeFileUploadTask.java:41
BoxUploadSessionPart part = this.boxApiFile.getUploadSessionPartRequest(file, session, partPosition).send();

Expected Behavior

Uploading should be successful

Error Message, Including Stack Trace

W/System.err: com.box.androidsdk.content.BoxException: Couldn't connect to the Box API due to a network error.
System.err: at com.box.androidsdk.content.requests.BoxRequest.handleSendException(BoxRequest.java:283)
System.err: at com.box.androidsdk.content.requests.BoxRequest.onSend(BoxRequest.java:249)
System.err: at com.box.androidsdk.content.requests.BoxRequest.send(BoxRequest.java:193)
System.err: at com.app.test.boxservice.rest.box.services.LargeFileUploadTask.run(LargeFileUploadTask.java:41)
System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
System.err: at java.lang.Thread.run(Thread.java:923)
System.err: Caused by: java.io.InterruptedIOException: thread interrupted
System.err: at com.android.okhttp.okio.Timeout.throwIfReached(Timeout.java:147)
System.err: at com.android.okhttp.okio.Okio$1.write(Okio.java:82)
System.err: at com.android.okhttp.okio.AsyncTimeout$1.write(AsyncTimeout.java:157)
System.err: at com.android.okhttp.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:177)
System.err: at com.android.okhttp.okio.RealBufferedSink.write(RealBufferedSink.java:47)
System.err: at com.android.okhttp.internal.http.RetryableSink.writeToSocket(RetryableSink.java:80)
System.err: at com.android.okhttp.internal.http.Http1xStream.writeRequestBody(Http1xStream.java:441)
System.err: at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:768)
System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:475)
System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getHeaders(HttpURLConnectionImpl.java:167)
System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:211)
System.err: at java.net.URLConnection.getContentType(URLConnection.java:540)
System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getContentType(DelegatingHttpsURLConnection.java:151)
System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getContentType(HttpsURLConnectionImpl.java:30)
System.err: at com.box.androidsdk.content.requests.BoxHttpResponse.open(BoxHttpResponse.java:62)
System.err: at com.box.androidsdk.content.requests.BoxRequest.sendRequest(BoxRequest.java:309)
System.err: at com.box.androidsdk.content.requests.BoxRequest.onSend(BoxRequest.java:236)
System.err: ... 5 more

Versions Used

Box SDK 4.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants