We are using Java SDK for Slides cloud v 24.9. We are using the SlidesAsyncApi to upload a 200 MB file with a callback.
SlidesAsyncApi slidesAsyncApi = new SlidesAsyncApi(asposeClientId, asposeClientSecret);
slidesAsyncApi.uploadAsync(fileName, IOUtils.toByteArray(localFileStream), asposeStorageName,
new SplitOperationCallback(ProcessContext.get(), docMd.getIdentity(), fileName, docFormat));
The file upload completes as I can see in the logs using the onUploadProgress() method of the callback handler. Here are the logs:
DEBUG ProcessContextApiCallback:78 - Upload progess: 195215360 of 195217381 - false
DEBUG ProcessContextApiCallback:78 - Upload progess: 195217381 of 195217381 - true
But the onSuccess() method is never called but instead onFailure() method is called with following error:
com.aspose.slides.ApiException: java.net.SocketTimeoutException: timeout
at com.aspose.slides.ApiClient$1.onFailure(ApiClient.java:813) [aspose-slides-cloud-24.9.0.jar:?]
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:185) [okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) [okhttp-2.7.5.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_271]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_271]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271]
Caused by: java.net.SocketTimeoutException: timeout
at okio.Okio$4.newTimeoutException(Okio.java:232) ~[okio-1.17.2.jar:?]
at okio.AsyncTimeout.exit(AsyncTimeout.java:286) ~[okio-1.17.2.jar:?]
at okio.AsyncTimeout$2.read(AsyncTimeout.java:241) ~[okio-1.17.2.jar:?]
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:358) ~[okio-1.17.2.jar:?]
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230) ~[okio-1.17.2.jar:?]
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:224) ~[okio-1.17.2.jar:?]
at com.squareup.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:186) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:737) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine.access$200(HttpEngine.java:87) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:722) ~[okhttp-2.7.5.jar:?]
at com.aspose.slides.api.SlidesAsyncApi$56.intercept(SlidesAsyncApi.java:1686) ~[aspose-slides-cloud-24.9.0.jar:?]at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:695) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:576) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call.getResponse(Call.java:287) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call.access$100(Call.java:35) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:171) ~[okhttp-2.7.5.jar:?]
… 4 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_271]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[?:1.8.0_271]
at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[?:1.8.0_271]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_271]
at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:475) ~[?:1.8.0_271]
at sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:469) ~[?:1.8.0_271]
at sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:69) ~[?:1.8.0_271]
at sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1228) ~[?:1.8.0_271]
at sun.security.ssl.SSLSocketImpl.access$300(SSLSocketImpl.java:75) ~[?:1.8.0_271]
at sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:915) ~[?:1.8.0_271]
at okio.Okio$2.read(Okio.java:140) ~[okio-1.17.2.jar:?]
at okio.AsyncTimeout$2.read(AsyncTimeout.java:237) ~[okio-1.17.2.jar:?]
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:358) ~[okio-1.17.2.jar:?]
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230) ~[okio-1.17.2.jar:?]
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:224) ~[okio-1.17.2.jar:?]
at com.squareup.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:186) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:737) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine.access$200(HttpEngine.java:87) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:722) ~[okhttp-2.7.5.jar:?]
at com.aspose.slides.api.SlidesAsyncApi$56.intercept(SlidesAsyncApi.java:1686) ~[aspose-slides-cloud-24.9.0.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:695) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:576) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call.getResponse(Call.java:287) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call.access$100(Call.java:35) ~[okhttp-2.7.5.jar:?]
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:171) ~[okhttp-2.7.5.jar:?]
… 4 more
The code works with a smaller file. Is there a way to increase the timeout?