Hello everyone, I have had this problem for 1 week...
# android
s
Hello everyone, I have had this problem for 1 week. I have used worker manager for uploading and retrofit + okhttp for network 1. If I upload a small video size 20 30MB , it uploaded successfully. 2. If I upload a large video size 1GB - 2GB, it uploaded failure Anyone know about this problem? Thanks, stay safe.
Copy code
java.io.InterruptedIOException: interrupted
2020-08-28 09:04:45.255 16975-19983/vn.gapo.app W/System.err:     at okio.Timeout.throwIfReached(Timeout.kt:98)
2020-08-28 09:04:45.255 16975-19983/vn.gapo.app W/System.err:     at okio.InputStreamSource.read(Okio.kt:90)
2020-08-28 09:04:45.255 16975-19983/vn.gapo.app W/System.err:     at okio.RealBufferedSink.writeAll(RealBufferedSink.kt:180)
2020-08-28 09:04:45.256 16975-19983/vn.gapo.app W/System.err:     at okhttp3.RequestBody$Companion$asRequestBody$1.writeTo(RequestBody.kt:167)
2020-08-28 09:04:45.256 16975-19983/vn.gapo.app W/System.err:     at com.gg.gapo.remote.upload.CountingRequestBody.writeTo(CountingRequestBody.kt:26)
2020-08-28 09:04:45.256 16975-19983/vn.gapo.app W/System.err:     at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.kt:157)
2020-08-28 09:04:45.256 16975-19983/vn.gapo.app W/System.err:     at okhttp3.MultipartBody.writeTo(MultipartBody.kt:93)
2020-08-28 09:04:45.256 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:59)
2020-08-28 09:04:45.257 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2020-08-28 09:04:45.257 16975-19983/vn.gapo.app W/System.err:     at com.gg.gapo.remote.network.RequestInterceptor.intercept(RequestInterceptor.kt:36)
2020-08-28 09:04:45.257 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2020-08-28 09:04:45.257 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
2020-08-28 09:04:45.257 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2020-08-28 09:04:45.257 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:74)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:152)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197)
2020-08-28 09:04:45.258 16975-19983/vn.gapo.app W/System.err:     at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148)
CountingRequestBody for get progress
i
Does your upload take more than 10 minutes? That's the limit for continuous running work unless you use WorkManager's foreground APIs
s
@Ian Lake Yes, Its long than 10 mintues. Do you have any suggestion about that ? Im still keeping app on foreground.
i
s
@Ian Lake I have implemented long running workers but still have issue , I have no ideas about this issues. This is my log cat. https://paste.gapo.vn/?ba731af9dc851f19#FYMPFsA8axMSuWEB4DJ5j9q4cNsrCn8HjYzj6zUrB4kG My logcat: https://paste.gapo.vn/?caa0d0e75cf5f6f8#EBc2yLi8X7NqCZcQ86NXw8Agvbc4ekN4eGY7Xi6BpU5N