Unable to upload large file using 'com.box:box-android-sdk:4.2.3'
AnsweredGetting below exception when trying to upload large file using box android sdk. Sometimes it works but 90% of the time it throws below exception.
We are using Kotlin language for our Android app. Can someone please let me know, how to resolve this issue?
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
-
Official comment
Hey Neeraj,
Can you create an issue for this on the Android SDK github repo?
Thanks,
Alex, Box Developer Advocate
Comment actions
Post is closed for comments.
Comments
1 comment