This also sounds exactly like the issue we have been having with 2.8.6
Enterprise Edition. Whenever you turn on flight mode in emulator we get a Error code :: 26: unexpected exception
from com.couchbase.lite.AbstractReplicator.updateStatus
, the replicator never recovers even when the user goes back online.
Tried upgrading to 3.0.0-beta02
which contains this fix: CBL-1841: attempt to provide Core with more meaningful failure status · couchbase/couchbase-lite-java-common@7d6de7b · GitHub but opon closing the internet connection, by selecting FLIGHT mode from the emulator we get the following exception. The replicator does not start again when re-establishing a connection.
2021-12-09 13:51:29.251 20816-21006/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {Repl#83} now idle
2021-12-09 13:51:29.251 20816-21006/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {C4Replicator#79} State: idle, progress=100.00%
2021-12-09 13:51:29.252 20816-21006/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: [JAVA] ReplicatorListener.statusChanged, repl: Replicator{@0x3c4012d(<*>),Database{@0xc8329, name='skedulo-v3'} => URLEndpoint{url=wss://test-couchbase-sgw-us1.test.skl.io/skedulo-mobile-edge/}}, status: C4ReplicatorStatus{level=3,completed=562,total=562,#docs=50,domain=0,code=0,info=0}
2021-12-09 13:51:29.252 20816-20919/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: [JAVA] status changed: (0, 0) @C4ReplicatorStatus{level=3,completed=562,total=562,#docs=50,domain=0,code=0,info=0} for Replicator{@0x3c4012d(<*>),Database{@0xc8329, name='skedulo-v3'} => URLEndpoint{url=wss://test-couchbase-sgw-us1.test.skl.io/skedulo-mobile-edge/}}
2021-12-09 13:51:29.252 20816-20919/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: [JAVA] State changed BUSY => IDLE(562/562): null for Replicator{@0x3c4012d(<*>),Database{@0xc8329, name='skedulo-v3'} => URLEndpoint{url=wss://test-couchbase-sgw-us1.test.skl.io/skedulo-mobile-edge/}}
2021-12-09 13:51:29.253 20816-21154/com.skedulo.app.v3 D/CouchbaseDatabaseSourceImpl: Replication status: Status{activityLevel=IDLE, progress=Progress{completed=562, total=562}, error=null}. Pending: 2
2021-12-09 13:51:40.535 20816-21012/com.skedulo.app.v3 I/CouchbaseLite/NETWORK: [JAVA] WebSocket CLOSED with error
javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort
at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
at com.android.org.conscrypt.NativeSsl.read(NativeSsl.java:411)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:549)
at okio.InputStreamSource.read(JvmOkio.kt:93)
at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:125)
at okio.RealBufferedSource.request(RealBufferedSource.kt:206)
at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
at okio.RealBufferedSource.readByte(RealBufferedSource.kt:209)
at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
2021-12-09 13:51:40.535 20816-21012/com.skedulo.app.v3 E/CouchbaseLite/NETWORK: {N8litecore4repl12C4SocketImplE#84} WebSocket closed abnormally (reason=WebSocket/HTTP status 1015)
2021-12-09 13:51:40.535 20816-21012/com.skedulo.app.v3 I/CouchbaseLite/NETWORK: {N8litecore4repl12C4SocketImplE#84} sent 6697 bytes, rcvd 8201, in 24.485 sec (274/sec, 335/sec)
2021-12-09 13:51:40.536 20816-21008/com.skedulo.app.v3 I/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#82} Closed with WebSocket/HTTP status 1015: javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort
2021-12-09 13:51:40.538 20816-21008/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {Repl#83} Connection closed with WebSocket/HTTP status 1015: "javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort" (state=2)
2021-12-09 13:51:40.546 20816-21008/com.skedulo.app.v3 E/CouchbaseLite/REPLICATOR: {Repl#83} Got LiteCore error: WebSocket error 1015, "javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort"
2021-12-09 13:51:40.549 20816-21008/com.skedulo.app.v3 V/CouchbaseLite/REPLICATOR: {Repl#83} progress +0/+0, 0 docs -- now 562 / 562, 50 docs
2021-12-09 13:51:40.553 20816-21008/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {Repl#83} activityLevel=stopped: connectionState=-1, savingChkpt=0
2021-12-09 13:51:40.555 20816-21008/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {Repl#83} now stopped
2021-12-09 13:51:40.560 20816-21007/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {Repl#83} documentEnded 69b4677e-13cd-4940-b778-dd175e81ed53 2-d23aed76d07b9d5ad7a367f55ec9718dd5ba462b flags=00 (6/409)
2021-12-09 13:51:40.560 20816-21007/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {Repl#83} documentEnded dc62c865-7695-4926-9f40-3bce5464135d 2-eadb4d90a8dc132381e7d2a366fcbb2430eec88d flags=03 (6/409)
2021-12-09 13:51:40.560 20816-21007/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PusherE#86} activityLevel=stopped: pendingResponseCount=0, caughtUp=1, changeLists=0, revsInFlight=0, blobsInFlight=0, awaitingReply=0, revsToSend=0, pushingDocs=0, pendingSequences=2
2021-12-09 13:51:40.560 20816-21007/com.skedulo.app.v3 V/CouchbaseLite/REPLICATOR: {N8litecore4repl6PusherE#86} now stopped
2021-12-09 13:51:40.560 20816-21007/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#88} activityLevel=stopped: pendingResponseCount=0, _caughtUp=1, _pendingRevMessages=0, _activeIncomingRevs=0
2021-12-09 13:51:40.560 20816-21007/com.skedulo.app.v3 V/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#88} now stopped
2021-12-09 13:51:40.560 20816-21007/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: BLIP sent 113 msgs (6697 bytes), rcvd 66 msgs (8201 bytes) in 24.510 sec. Max outbox depth was 1, avg 1.00
2021-12-09 13:51:40.604 20816-21008/com.skedulo.app.v3 E/CouchbaseLite/REPLICATOR: {C4Replicator#79} State: stopped, progress=100.00%, error=WebSocket error 1015, "javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort"
2021-12-09 13:51:40.609 20816-21008/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: [JAVA] ReplicatorListener.statusChanged, repl: Replicator{@0x3c4012d(<*>),Database{@0xc8329, name='skedulo-v3'} => URLEndpoint{url=wss://test-couchbase-sgw-us1.test.skl.io/skedulo-mobile-edge/}}, status: C4ReplicatorStatus{level=0,completed=562,total=562,#docs=50,domain=6,code=1015,info=2}
2021-12-09 13:51:40.616 20816-20967/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: [JAVA] status changed: (0, 0) @C4ReplicatorStatus{level=0,completed=562,total=562,#docs=50,domain=6,code=1015,info=2} for Replicator{@0x3c4012d(<*>),Database{@0xc8329, name='skedulo-v3'} => URLEndpoint{url=wss://test-couchbase-sgw-us1.test.skl.io/skedulo-mobile-edge/}}
2021-12-09 13:51:40.616 20816-20967/com.skedulo.app.v3 I/CouchbaseLite/REPLICATOR: [JAVA] State changed IDLE => STOPPED(562/562): CouchbaseLiteException{CouchbaseLite,11015,'javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort
(CouchbaseLite Android v3.0.0-180@31 (EE/release, Commit/96562e33aa@1225da0762f2 Core/3.0.0 (180) at 2021-10-14T23:23:16.155267Z) on Java; Android 10; Android SDK built for x86)'} for Replicator{@0x3c4012d(<*>),Database{@0xc8329, name='skedulo-v3'} => URLEndpoint{url=wss://test-couchbase-sgw-us1.test.skl.io/skedulo-mobile-edge/}}
2021-12-09 13:51:40.617 20816-21154/com.skedulo.app.v3 V/CouchbaseLite/REPLICATOR: {C4Replicator#79} Replicator not yet created, saving progress level value for later...
2021-12-09 13:51:40.626 20816-21154/com.skedulo.app.v3 D/CouchbaseDatabaseSourceImpl: Replication status: Status{activityLevel=STOPPED, progress=Progress{completed=562, total=562}, error=CouchbaseLiteException{CouchbaseLite,11015,'javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort
(CouchbaseLite Android v3.0.0-180@31 (EE/release, Commit/96562e33aa@1225da0762f2 Core/3.0.0 (180) at 2021-10-14T23:23:16.155267Z) on Java; Android 10; Android SDK built for x86)'}}. Pending: 3
2021-12-09 13:51:40.632 20816-21154/com.skedulo.app.v3 E/CouchbaseDatabaseSourceImpl: Error code :: 11015: javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort
(CouchbaseLite Android v3.0.0-180@31 (EE/release, Commit/96562e33aa@1225da0762f2 Core/3.0.0 (180) at 2021-10-14T23:23:16.155267Z) on Java; Android 10; Android SDK built for x86)
CouchbaseLiteException{CouchbaseLite,11015,'javax.net.ssl.SSLException: Read error: ssl=0xba6ef278: I/O error during system call, Software caused connection abort
(CouchbaseLite Android v3.0.0-180@31 (EE/release, Commit/96562e33aa@1225da0762f2 Core/3.0.0 (180) at 2021-10-14T23:23:16.155267Z) on Java; Android 10; Android SDK built for x86)'}
at com.couchbase.lite.ReplicatorStatus.<init>(ReplicatorStatus.java:74)
at com.couchbase.lite.AbstractReplicator.updateStatus(AbstractReplicator.java:622)
at com.couchbase.lite.AbstractReplicator.c4StatusChanged(AbstractReplicator.java:505)
at com.couchbase.lite.ReplicatorListener.lambda$statusChanged$0(ReplicatorListener.java:52)
at com.couchbase.lite.ReplicatorListener$$ExternalSyntheticLambda0.run(Unknown Source:4)
at com.couchbase.lite.internal.exec.InstrumentedTask.run(InstrumentedTask.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)