seedvault-app / seedvault

A backup application for the Android Open Source Project.
1.26k stars 74 forks source link

WebDAV error: IOException: unexpected end of stream #675

Open grote opened 3 months ago

grote commented 3 months ago
06-02 20:46:51.996 14068 14106 E KVBackup: Error uploading DB
06-02 20:46:51.996 14068 14106 E KVBackup: java.io.IOException: Pipe closed
06-02 20:46:51.996 14068 14106 E KVBackup:  at java.io.PipedInputStream.read(PipedInputStream.java:312)
06-02 20:46:51.996 14068 14106 E KVBackup:  at java.io.PipedInputStream.read(PipedInputStream.java:384)
06-02 20:46:51.996 14068 14106 E KVBackup:  at java.io.InputStream.read(InputStream.java:218)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlin.io.ByteStreamsKt.copyTo(IOStreams.kt:106)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlin.io.ByteStreamsKt.copyTo$default(IOStreams.kt:103)
06-02 20:46:51.996 14068 14106 E KVBackup:  at com.stevesoltys.seedvault.plugins.webdav.WebDavStorage$getOutputStream$body$1.writeTo(WebDavStorage.kt:80)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:62)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-02 20:46:51.996 14068 14106 E KVBackup:  at at.bitfire.dav4jvm.BasicDigestAuthHandler.intercept(BasicDigestAuthHandler.kt:291)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
06-02 20:46:51.996 14068 14106 E KVBackup:  at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
06-02 20:46:51.996 14068 14106 E KVBackup:  at at.bitfire.dav4jvm.DavResource$put$1.invoke(DavResource.kt:406)
06-02 20:46:51.996 14068 14106 E KVBackup:  at at.bitfire.dav4jvm.DavResource$put$1.invoke(DavResource.kt:391)
06-02 20:46:51.996 14068 14106 E KVBackup:  at at.bitfire.dav4jvm.DavResource.followRedirects$build(DavResource.kt:607)
06-02 20:46:51.996 14068 14106 E KVBackup:  at at.bitfire.dav4jvm.DavResource.put(DavResource.kt:391)
06-02 20:46:51.996 14068 14106 E KVBackup:  at at.bitfire.dav4jvm.DavResource.put$default(DavResource.kt:390)
06-02 20:46:51.996 14068 14106 E KVBackup:  at com.stevesoltys.seedvault.plugins.webdav.WebDavStorage$getOutputStream$deferred$1.invokeSuspend(WebDavStorage.kt:86)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
06-02 20:46:51.996 14068 14106 E KVBackup:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
06-02 20:46:51.996 14068 14106 E KVBackup:  Suppressed: java.io.IOException: unexpected end of stream on https://foo.bar.com/...
06-02 20:46:51.996 14068 14106 E KVBackup:      at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:210)
06-02 20:46:51.996 14068 14106 E KVBackup:      at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
06-02 20:46:51.996 14068 14106 E KVBackup:      at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
06-02 20:46:51.996 14068 14106 E KVBackup:      ... 27 more
06-02 20:46:51.996 14068 14106 E KVBackup:  Caused by: java.io.EOFException: \n not found: limit=0 content=…
06-02 20:46:51.996 14068 14106 E KVBackup:      at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
06-02 20:46:51.996 14068 14106 E KVBackup:      at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
06-02 20:46:51.996 14068 14106 E KVBackup:      at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
06-02 20:46:51.996 14068 14106 E KVBackup:      ... 29 more
grote commented 3 months ago

the main issue here is that this happened to all key/value backups, even @pm@ which then caused the entire backup to fail and the system to do a re-init of the entire backup storage, so we created a new restore set duplicating all data.