PhilippC / PhilippC/keepass2android

[BUG] unable to sync with remote db

Open
#3,110 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.2k
Forks
478
Avg merge
1h 4m
Merged PRs (30d)
2

Description

Checks
  • I have read the FAQ section, searched the open issues, and still think this is a new bug.
Describe the bug you encountered:

Got an error while syncing with a remote database file. I am using this app since a long time, never experienced this problem until now.

Caused by: java.io.EOFException: \n not found: limit=0 content=…

Log:
02.12.2025 19:01:09:200 -- DatabaseSettingsActivity.OnPause 40
02.12.2025 19:01:09:202 -- Timeout start
02.12.2025 19:01:11:763 -- DatabaseSettingsActivity.OnResume 40
02.12.2025 19:01:11:763 -- DatabaseIsUnlocked=True 40
02.12.2025 19:01:11:764 -- Timeout cancel
02.12.2025 19:01:17:511 -- DatabaseSettingsActivity.OnPause 40
02.12.2025 19:01:17:511 -- Timeout start
02.12.2025 19:01:17:521 -- GroupActivity.OnStart 39
02.12.2025 19:01:17:522 -- GroupActivity.OnResume 39
02.12.2025 19:01:17:522 -- DatabaseIsUnlocked=True 39
02.12.2025 19:01:17:522 -- Timeout cancel
02.12.2025 19:01:17:988 -- DatabaseSettingsActivity.OnStop 40
02.12.2025 19:01:17:991 -- DatabaseSettingsActivity.OnDestroyTrue 40
02.12.2025 19:01:21:270 -- status message: Initializing...
02.12.2025 19:01:21:270 -- status submessage:
02.12.2025 19:01:21:305 -- status message: Zwischengespeicherte Datenbank synchronisieren …
02.12.2025 19:01:21:306 -- status submessage: Quelldatei wird geladen …
02.12.2025 19:01:24:133 -- Checking for file change. Current hash = B8AB3CC7EA292AFA345E1F3F2C0E0197F585DEF2624EB85AD7A97D09E92D32C6
02.12.2025 19:01:24:137 -- path/to/my/database.kdbx baseVersionHash = 8CFE7601F6A9021D6A5259DAF67A072D7CCC65B9478E4BD76CD1BE2E37AC8267
02.12.2025 19:01:24:137 -- Checking for file change. baseVersionHash = 8CFE7601F6A9021D6A5259DAF67A072D7CCC65B9478E4BD76CD1BE2E37AC8267
02.12.2025 19:01:24:138 -- path/to/my/database.kdbx isCached = True
02.12.2025 19:01:24:138 -- path/to/my/database.kdbx localVersionHash = D3C18079C842BB8E948FAE3021ACADD221832FBA45A5338A5653ED357F8E8F28
02.12.2025 19:01:24:139 -- path/to/my/database.kdbx baseVersionHash = 8CFE7601F6A9021D6A5259DAF67A072D7CCC65B9478E4BD76CD1BE2E37AC8267
02.12.2025 19:01:24:139 -- status message: Speichere Datenbank…
02.12.2025 19:01:24:139 -- Conflict. True True True
02.12.2025 19:01:25:709 -- status submessage: Führe Änderungen zusammen…
02.12.2025 19:01:25:711 -- Starting to load KDBX file...
02.12.2025 19:01:25:976 -- ReadXmlStreamed: 20ms
02.12.2025 19:01:25:978 -- Finished loading KDBX file.
02.12.2025 19:01:26:29 -- status submessage:
02.12.2025 19:01:27:163 -- Xml WriteDocument: 1054ms
02.12.2025 19:01:27:191 -- path/to/my/database.kdbx isCached = True
02.12.2025 19:01:53:612 -- unexpected end of stream on path/to/my/database/...
02.12.2025 19:01:53:615 -- couldn't save to remote path/to/my/database.kdbx
02.12.2025 19:01:53:617 -- System.Exception: unexpected end of stream on path/to/my/database/...
---> Java.IO.IOException: unexpected end of stream on path/to/my/database/...
---> Java.IO.IOException: \n not found: limit=0 content=…

--- End of managed Java.IO.IOException stack trace ---
java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.burgstaller.okhttp.AuthenticationCacheInterceptor.intercept(AuthenticationCacheInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at keepass2android.javafilestorage.WebDavStorage.uploadFile(WebDavStorage.java:315)
at keepass2android.javafilestorage.WebDavStorage.uploadFile(WebDavStorage.java:267)
at mono.java.lang.RunnableImplementor.n_run(Native Method)
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
at java.lang.Thread.run(Thread.java:1119)

--- End of managed Java.IO.IOException stack trace ---
java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.burgstaller.okhttp.AuthenticationCacheInterceptor.intercept(AuthenticationCacheInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at keepass2android.javafilestorage.WebDavStorage.uploadFile(WebDavStorage.java:315)
at keepass2android.javafilestorage.WebDavStorage.uploadFile(WebDavStorage.java:267)
at mono.java.lang.RunnableImplementor.n_run(Native Method)
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
at java.lang.Thread.run(Thread.java:1119)

Exception_EndOfInnerExceptionStack
at Java.Interop.JniEnvironment.InstanceMethods.CallVoidMethod(JniObjectReference , JniMethodInfo , JniArgumentValue* )
at Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod(String , IJavaPeerable , JniArgumentValue* )
at Keepass2android.Javafilestorage.WebDavStorage.UploadFile(String path, Byte[] data, Boolean writeTransactional)
at keepass2android.Io.JavaFileStorage.JavaFileStorageWriteTransaction.CommitWrite()
--- End of managed Java.IO.IOException stack trace ---
java.io.IOException: unexpected end of stream on path/to/my/database/...
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:210)
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.burgstaller.okhttp.AuthenticationCacheInterceptor.intercept(AuthenticationCacheInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at keepass2android.javafilestorage.WebDavStorage.uploadFile(WebDavStorage.java:315)
at keepass2android.javafilestorage.WebDavStorage.uploadFile(WebDavStorage.java:267)
at mono.java.lang.RunnableImplementor.n_run(Native Method)
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
at java.lang.Thread.run(Thread.java:1119)
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more

--- End of managed Java.IO.IOException stack trace ---
java.io.IOException: unexpected end of stream on path/to/my/database/...
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:210)
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.burgstaller.okhttp.AuthenticationCacheInterceptor.intercept(AuthenticationCacheInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at keepass2android.javafilestorage.WebDavStorage.uploadFile(WebDavStorage.java:315)
at keepass2android.javafilestorage.WebDavStorage.uploadFile(WebDavStorage.java:267)
at mono.java.lang.RunnableImplementor.n_run(Native Method)
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
at java.lang.Thread.run(Thread.java:1119)
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Suppressed: java.io.IOException: unexpected end of stream on path/to/my/database/...
... 21 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
... 20 more

Exception_EndOfInnerExceptionStack
at keepass2android.Io.JavaFileStorage.JavaFileStorageWriteTransaction.CommitWrite()
at keepass2android.Io.CachingFileStorage.UpdateRemoteFile(Stream cachedData, IOConnectionInfo ioc, Boolean useFileTransaction, String hash)
at keepass2android.Io.CachingFileStorage.TryUpdateRemoteFile(Stream cachedData, IOConnectionInfo ioc, Boolean useFileTransaction, String hash)
02.12.2025 19:02:00:30 -- GroupActivity.OnPause 39
02.12.2025 19:02:00:30 -- Timeout start
02.12.2025 19:02:00:44 -- DatabaseSettingsActivity.OnCreate 41
02.12.2025 19:02:00:45 -- DatabaseSettingsActivity:apptask= 41
02.12.2025 19:02:00:45 -- Setting FLAG_SECURE.
02.12.2025 19:02:00:50 -- DatabaseSettingsActivity.OnStart 41
02.12.2025 19:02:00:50 -- DatabaseSettingsActivity.OnResume 41
02.12.2025 19:02:00:51 -- DatabaseIsUnlocked=True 41
02.12.2025 19:02:00:51 -- Timeout cancel
02.12.2025 19:02:00:565 -- GroupActivity.OnStop 39
02.12.2025 19:02:10:96 -- DatabaseSettingsActivity.OnPause 41
02.12.2025 19:02:10:97 -- Timeout start
02.12.2025 19:02:19:816 -- DatabaseSettingsActivity.OnResume 41
02.12.2025 19:02:19:816 -- DatabaseIsUnlocked=True 41
02.12.2025 19:02:19:816 -- Timeout cancel
02.12.2025 19:02:21:752 -- DatabaseSettingsActivity.OnPause 41
02.12.2025 19:02:21:756 -- Timeout start
02.12.2025 19:02:22:366 -- DatabaseSettingsActivity.OnStop 41
02.12.2025 19:04:12:140 -- DatabaseSettingsActivity.OnStart 41
02.12.2025 19:04:12:142 -- DatabaseSettingsActivity.OnResume 41
02.12.2025 19:04:12:144 -- DatabaseIsUnlocked=True 41
02.12.2025 19:04:12:145 -- Timeout cancel

Describe what you expected to happen:

The sync executes successfully

What version of Keepass2Android are you using?

1.14-r4

Which version of Android are you on?

16

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with keepass2android.javafilestorage.WebDavStorage.UploadFile at the failing stack-trace lines and trace the remote database sync path that produces the unexpected end-of-stream error. Reproduce the upload against a remote WebDAV database and determine the conditions that trigger the EOFException; done means the sync succeeds in that case with a regression check if the project has coverage for this path.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.