[Couchbase.Lite 2.0 Beta db022][SyncGateway 2.0 Beta] syncing unreliable

I’m trying to figure out this for weeks: Sometimes changes are synced immediately via PushAndPull replicator in Couchbase Lite and sometimes they aren’t synced at all. I don’t have a clue what’s going wrong.

Here is my replication code:

dbRecplication = new Database("replication2");

// Create replicators to push & pull changes to & from Sync Gateway.
var url = new Uri(syncGatewayURL);
var replConfig = new ReplicatorConfiguration(CouchServices.DbRecplication, new Couchbase.Lite.Sync.URLEndpoint(url))
{
    Continuous = true,
    Authenticator = new Couchbase.Lite.Sync.BasicAuthenticator("fahrer1", "letmein"),
    //Authenticator = new Couchbase.Lite.Sync.BasicAuthenticator("tms1", "letmein"),
    //Authenticator = new Couchbase.Lite.Sync.BasicAuthenticator("test", "couchbAse3"),
    ReplicatorType = ReplicatorType.PushAndPull
};
replication = new Replicator(replConfig);
Database.SetLogLevel(LogDomain.All, LogLevel.Verbose);
replication.AddChangeListener((sender, args) =>
{
    string s = "";
    switch (args.Status.Activity)
    {
        case ReplicatorActivityLevel.Stopped: s = "The replication is finished or hit a fatal error."; break;
        case ReplicatorActivityLevel.Offline: s = "The replicator is offline as the remote host is unreachable."; break;
        case ReplicatorActivityLevel.Connecting: s = " The replicator is connecting to the remote host."; break;
        case ReplicatorActivityLevel.Idle: s = "The replication caught up with all the changes available from the server.The IDLE state is only used in continuous replications."; break;
        case ReplicatorActivityLevel.Busy:
            s = "The replication is actively transferring data.";
            break;
    }
    Debug.WriteLine("REPLICATOR STATUS CHANGE: " + s);
    if (args.Status.Error != null)
    {
        Console.WriteLine($"REPLICATOR ERROR: {args.Status.Error.Message}");
    }

    EventHandler<ReplicatorStatusChangedEventArgs> temp = ReplicationEvent;
    temp?.Invoke(replication, args);
});
replication.Start();

This is my SyncGateway config:

{
	"log": ["*"],
	"adminInterface": "127.0.0.1:4985",
	"interface": "0.0.0.0:4984",
	"databases": {
		"test": {
			"server": "http://127.0.0.1:8091",
			"bucket": "test",
			"username": "test",
			"password": "XXXX",
			"users": {
				"GUEST": {"disabled": true},
				"tms1": { "password": "XXXX", "admin_channels": ["tms1"], "admin_roles": ["tms"] },
				"tms2": { "password": "XXXX", "admin_channels": ["tms2"], "admin_roles": ["tms"] },
				"fahrer1": { "password": "XXXX", "admin_channels": ["fahrer1"] },
				"fahrer2": { "password": "XXXX", "admin_channels": ["fahrer2"] },
				"fahrer3": { "password": "XXXX", "admin_channels": ["fahrer3"] },
				"test": { "password": "XXXX", "admin_channels": ["*"] }
			},
			"enable_shared_bucket_access": true,
			"import_docs": "continuous",
			"sync":`
				function (doc, oldDoc) {
				
				// Required properties:
				//if (!doc.createdAt) throw({forbidden: "Missing required createdAt property"});
				//if (!doc.channels) throw({forbidden: "Missing required channels property"});
				//if (!doc.type) throw({forbidden: "Missing required type property"});
				
				// new document created?
				/*if (oldDoc == null) {
					//requireRole("role:tms"); 		// only TMSes are allowed to create new documents
					requireAccess(doc.channels);	// make sure the TMS has added its own channel
				}
				else // document changed?
					if (!doc._deleted)
					{	// make sure metadata is not changed maliciously
						if (doc.channels != oldDoc.channels)	// only TMSes may change (driver) channels
							//requireRole("role:tms");
						if (doc.type != oldDoc.type)
							throw({forbidden: "Type property may not be changed"});	// unless document gets deleted						
						if (doc.createdAt != oldDoc.createdAt)
							throw({forbidden: "createdAt property may not be changed"}); // unless document gets deleted		
					}
				*/
				
				// Allowed data types:
				//if (doc.type != "Address" && doc.type != "Instruction" && doc.type != "InstructionStation" 
				// && doc.type != "LocationDateTime" && doc.type != "Transport" && doc.type != "TransportItem") {
				//	throw({forbidden: "Missing type property"});
				//}				
				
				channel (doc.channels);
			}`
		}
	}
} 

Here is the log:

2018-03-23T14:23:16.312+01:00 Enabling logging: [*]
2018-03-23T14:23:16.366+01:00 ==== Couchbase Sync Gateway/2.0.0(773;5a497fd) ====
2018-03-23T14:23:16.366+01:00 Opening db /test as bucket "test", pool "default", server <http://127.0.0.1:8091>
2018-03-23T14:23:16.367+01:00 GoCBCustomSGTranscoder Opening Couchbase database test on <http://127.0.0.1:8091> as user "test"
2018-03-23T14:23:16.391+01:00 Design docs for current SG view version (2.0) found.
2018-03-23T14:23:16.391+01:00 Verifying view availability for bucket test...
2018-03-23T14:23:16.693+01:00 Views ready for bucket test.
2018-03-23T14:23:16.696+01:00 Cache: Initializing changes cache with options {ChannelCacheOptions:{ChannelCacheMinLength:0 ChannelCacheMaxLength:0 ChannelCacheAge:0s} CachePendingSeqMaxWait:5s CachePendingSeqMaxNum:10000 CacheSkippedSeqMaxWait:1h0m0s}
2018-03-23T14:23:16.696+01:00 Initializing changes cache for database test with sequence: 8
2018-03-23T14:23:16.696+01:00 Feed: Starting mutation feed on bucket test due to either channel cache mode or doc tracking (auto-import/bucketshadow)
2018-03-23T14:23:16.696+01:00 Feed: Using DCP feed for bucket: "test" (based on feed_type specified in config file)
2018-03-23T14:23:16.754+01:00 WARNING: Invalid range provided for DCP backfill tracking - tracking disabled. len(start):1024 len(end):13 -- base.(*backfillStatus).init() at dcp_feed.go:643
2018-03-23T14:23:16.755+01:00 Feed+: Initializing DCP feed based on persisted checkpoints
2018-03-23T14:23:16.821+01:00 WARNING: Invalid range provided for DCP backfill tracking - tracking disabled. len(start):1024 len(end):13 -- base.(*backfillStatus).init() at dcp_feed.go:643
2018-03-23T14:23:16.821+01:00 Feed+: Initializing DCP feed based on persisted checkpoints
2018-03-23T14:23:16.834+01:00 Feed+: Connecting to new bucket datasource.  URLs:[http://127.0.0.1:8091], pool:default, bucket:test
2018-03-23T14:23:16.853+01:00 Using metadata purge interval of 3.00 days for tombstone compaction.
2018-03-23T14:23:16.867+01:00 Access: Computed channels for "fahrer2": !:1,fahrer2:6
_time=2018-03-23T14:23:16.886+01:00 _level=INFO _msg=Using plain authentication for user test
2018-03-23T14:23:16.905+01:00 DCP: Backfill in progress: 3% (1 / 27)
2018-03-23T14:23:16.905+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:test}") count=2
2018-03-23T14:23:16.970+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:tms1}") count=3
2018-03-23T14:23:16.970+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:fahrer3}") count=4
2018-03-23T14:23:16.970+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:fahrer1}") count=5
2018-03-23T14:23:16.970+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:fahrer2}") count=6
2018-03-23T14:23:16.970+01:00 DCP: Backfill complete
2018-03-23T14:23:16.970+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:tms2}") count=7
2018-03-23T14:23:16.971+01:00 DCP+: Persisting checkpoint for vbno 228
2018-03-23T14:23:17.042+01:00 Access: Computed channels for "fahrer3": !:1,fahrer3:1
2018-03-23T14:23:17.043+01:00 DCP+: Persisting checkpoint for vbno 878
2018-03-23T14:23:17.044+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:fahrer3}") count=8
2018-03-23T14:23:17.200+01:00 Access: Computed channels for "test": !:1,*:2
2018-03-23T14:23:17.200+01:00     Reset guest user to config
2018-03-23T14:23:17.200+01:00 DCP+: Persisting checkpoint for vbno 12
2018-03-23T14:23:17.201+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:test}") count=9
2018-03-23T14:23:17.397+01:00 Access: Computed channels for "tms1": !:1,tms1:3
2018-03-23T14:23:17.419+01:00 Access: Computed roles for "tms1": tms:3
2018-03-23T14:23:17.421+01:00 DCP+: Persisting checkpoint for vbno 169
2018-03-23T14:23:17.422+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:tms1}") count=10
2018-03-23T14:23:17.836+01:00 Access: Computed channels for "tms2": !:1,tms2:4
2018-03-23T14:23:17.862+01:00 Access: Computed roles for "tms2": tms:4
2018-03-23T14:23:17.863+01:00 Starting admin server on 127.0.0.1:4985
2018-03-23T14:23:17.863+01:00 DCP+: Persisting checkpoint for vbno 416
2018-03-23T14:23:17.864+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:tms2}") count=11
2018-03-23T14:23:17.872+01:00 Starting server on 0.0.0.0:4984 ...
2018-03-23T14:23:36.057+01:00 HTTP:  #001: GET /test/_blipsync (as GUEST)
2018-03-23T14:23:36.057+01:00 HTTP: #001:     --> 401 Login required  (0.6 ms)
2018-03-23T14:23:36.288+01:00 HTTP:  #002: GET /test/_blipsync (as fahrer1)
2018-03-23T14:23:36.288+01:00 HTTP+: #002:     --> 101 [3fbed7cb] Upgraded to BLIP+WebSocket protocol  (as fahrer1).  (0.0 ms)
2018-03-23T14:23:36.288+01:00 Sync: [3fbed7cb] Start BLIP/Websocket handler
2018-03-23T14:23:36.344+01:00 Sync: [3fbed7cb] MSG#1 "getCheckpoint" ...  (as fahrer1)
2018-03-23T14:23:36.345+01:00 Sync+: [3fbed7cb] MSG#1 "getCheckpoint"   --> OK ...  (as fahrer1)
2018-03-23T14:23:36.345+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T14:23:36.392+01:00 Sync: [3fbed7cb] MSG#2 "subChanges" ...  (as fahrer1)
2018-03-23T14:23:36.392+01:00 Sync: [3fbed7cb] MSG#3!~ "changes" ...  (as fahrer1)
2018-03-23T14:23:36.393+01:00 Sync+: [3fbed7cb] MSG#2 "subChanges"   --> OK ...  (as fahrer1)
2018-03-23T14:23:36.393+01:00 Sync: [3fbed7cb] Sending changes since 8 ...  (as fahrer1)
2018-03-23T14:23:36.393+01:00 Sync: [3fbed7cb] Received 1 changes from client ...  (as fahrer1)
2018-03-23T14:23:36.393+01:00 Changes+: Int sequence multi changes feed...
2018-03-23T14:23:36.393+01:00 Changes: MultiChangesFeed(channels: {*}, options: {Since:8 Limit:0 Conflicts:true IncludeDocs:false Wait:true Continuous:true Terminator:0xc042046480 HeartbeatMs:0 TimeoutMs:0 ActiveOnly:false}) ...   (to fahrer1)
2018-03-23T14:23:36.393+01:00 Changes+: MultiChangesFeed: channels expand to "!:1,fahrer1:5" ...   (to fahrer1)
2018-03-23T14:23:36.393+01:00 Sync+: [3fbed7cb] MSG#3!~ "changes"   --> OK ...  (as fahrer1)
2018-03-23T14:23:36.393+01:00 Cache: Initialized cache for channel "!" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T14:23:36.393+01:00 Cache: getCachedChanges("!", 8) --> 0 changes valid from #9
2018-03-23T14:23:36.393+01:00 Changes+: [changesFeed] Found 0 changes for channel !
2018-03-23T14:23:36.394+01:00 Cache: Initialized cache for channel "fahrer1" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T14:23:36.394+01:00 Cache: getCachedChanges("fahrer1", 8) --> 0 changes valid from #9
2018-03-23T14:23:36.394+01:00 Changes+: [changesFeed] Found 0 changes for channel fahrer1
2018-03-23T14:23:36.394+01:00 Changes+: MultiChangesFeed waiting...   (to fahrer1)
2018-03-23T14:23:36.395+01:00 Changes+: No new changes to send to change listener.  Waiting for "test"'s count to pass 5
2018-03-23T14:23:36.395+01:00 Sync+: [3fbed7cb]     Sending 0 changes ...  (as fahrer1)
2018-03-23T14:23:36.395+01:00 Sync: [3fbed7cb] Sent all changes to client. ...  (as fahrer1)
2018-03-23T14:23:36.450+01:00 Sync: [3fbed7cb] MSG#4~ "rev" ...  (as fahrer1)
2018-03-23T14:23:36.451+01:00 Sync+: [3fbed7cb] Inserting rev "b2a17504-a7e1-4ad1-b040-896260024f6c" 2-bca0ef2d6144589d92534a04df735a968d9225f2 history="1-20abb74307811ba29f7e55176e54661da02a0d66", array = []string{"2-bca0ef2d6144589d92534a04df735a968d9225f2", "1-20abb74307811ba29f7e55176e54661da02a0d66"} ...  (as fahrer1)
2018-03-23T14:23:36.452+01:00 CRUD+: Invoking sync on doc "b2a17504-a7e1-4ad1-b040-896260024f6c" rev 2-bca0ef2d6144589d92534a04df735a968d9225f2
2018-03-23T14:23:36.469+01:00 CRUD+: Saving old revision "b2a17504-a7e1-4ad1-b040-896260024f6c" / "1-20abb74307811ba29f7e55176e54661da02a0d66" (508 bytes)
2018-03-23T14:23:36.470+01:00 CRUD+: Backed up obsolete rev "b2a17504-a7e1-4ad1-b040-896260024f6c"/"1-20abb74307811ba29f7e55176e54661da02a0d66"
2018-03-23T14:23:36.470+01:00 CRUD+: Saving doc (seq: #9, id: b2a17504-a7e1-4ad1-b040-896260024f6c rev: 2-bca0ef2d6144589d92534a04df735a968d9225f2)
2018-03-23T14:23:36.470+01:00 DCP+: Persisting checkpoint for vbno 520
2018-03-23T14:23:36.471+01:00 CRUD: Stored doc "b2a17504-a7e1-4ad1-b040-896260024f6c" / "2-bca0ef2d6144589d92534a04df735a968d9225f2"
2018-03-23T14:23:36.471+01:00 Sync+: [3fbed7cb] MSG#4~ "rev"   --> OK ...  (as fahrer1)
2018-03-23T14:23:36.472+01:00 DCP+: Persisting checkpoint for vbno 627
2018-03-23T14:23:36.473+01:00 Cache: Received #9 after   1ms ("b2a17504-a7e1-4ad1-b040-896260024f6c" / "2-bca0ef2d6144589d92534a04df735a968d9225f2")
2018-03-23T14:23:36.473+01:00 Cache:     #9 ==> channel "fahrer1"
2018-03-23T14:23:36.473+01:00 Cache: Initialized cache for channel "fahrer2" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T14:23:36.473+01:00 Cache:     #9 ==> channel "fahrer2"
2018-03-23T14:23:36.473+01:00 Cache: Initialized cache for channel "fahrer3" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T14:23:36.473+01:00 Cache:     #9 ==> channel "fahrer3"
2018-03-23T14:23:36.473+01:00 Cache: Initialized cache for channel "tms1" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T14:23:36.473+01:00 Cache:     #9 ==> channel "tms1"
2018-03-23T14:23:36.473+01:00 Cache: Initialized cache for channel "*" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T14:23:36.473+01:00 Cache:     #9 ==> channel "*"
2018-03-23T14:23:36.473+01:00 Changes+: Notifying that "test" changed (keys="{*, fahrer1, fahrer2, fahrer3, tms1}") count=12
2018-03-23T14:23:36.473+01:00 Changes+: MultiChangesFeed: channels expand to "!:1,fahrer1:5" ...   (to fahrer1)
2018-03-23T14:23:36.473+01:00 Cache: getCachedChanges("!", 8) --> 0 changes valid from #9
2018-03-23T14:23:36.473+01:00 Changes+: [changesFeed] Found 0 changes for channel !
2018-03-23T14:23:36.473+01:00 Cache: getCachedChanges("fahrer1", 8) --> 1 changes valid from #9
2018-03-23T14:23:36.473+01:00 Changes+: [changesFeed] Found 1 changes for channel fahrer1
2018-03-23T14:23:36.473+01:00 Changes+: Channel feed processing seq:9 in channel fahrer1   (to fahrer1)
2018-03-23T14:23:36.473+01:00 Changes+: MultiChangesFeed sending {Seq:9, ID:b2a17504-a7e1-4ad1-b040-896260024f6c, Changes:[map[rev:2-bca0ef2d6144589d92534a04df735a968d9225f2]]}   (to fahrer1)
2018-03-23T14:23:36.474+01:00 Changes+: MultiChangesFeed waiting...   (to fahrer1)
2018-03-23T14:23:36.474+01:00 Changes+: No new changes to send to change listener.  Waiting for "test"'s count to pass 12
2018-03-23T14:23:36.474+01:00 Changes: sending 1 change(s)
2018-03-23T14:23:36.474+01:00 Sync+: [3fbed7cb]     Sending 1 changes ...  (as fahrer1)
2018-03-23T14:23:36.504+01:00 Sync: [3fbed7cb] Sent 1 changes to client, from seq 9 ...  (as fahrer1)
2018-03-23T14:23:36.504+01:00 Sync+: [3fbed7cb]     Sending 0 changes ...  (as fahrer1)
2018-03-23T14:23:41.544+01:00 Sync: [3fbed7cb] MSG#5 "setCheckpoint" ...  (as fahrer1)
2018-03-23T14:23:41.546+01:00 Sync+: [3fbed7cb] MSG#5 "setCheckpoint"   --> OK ...  (as fahrer1)
2018-03-23T14:23:41.547+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T14:28:39.768+01:00 DCP+: Persisting checkpoint for vbno 275
2018-03-23T14:31:11.874+01:00 Sync: [3fbed7cb] MSG#6!~ "changes" ...  (as fahrer1)
2018-03-23T14:31:11.875+01:00 Sync: [3fbed7cb] Received 1 changes from client ...  (as fahrer1)
2018-03-23T14:31:11.875+01:00 Sync+: [3fbed7cb] MSG#6!~ "changes"   --> OK ...  (as fahrer1)

Any help is much appreciated.

As noted in the release notes, we have fixed several replicator related issues in DB23…can you please test with DB23/ SGW Beta2 and see if this is issue remains.

I installed db23 and sgw beta2, which didn’t solve the problem. But I now noticed an “Error: Client doesn’t support WS protocol BLIP_3a2, only BLIP_3+CBMobile_2” in the log:

2018-03-23T16:11:17.035+01:00 HTTP:  #003: GET /test/_blipsync (as GUEST)
2018-03-23T16:11:17.035+01:00 HTTP: #003:     --> 401 Login required  (0.0 ms)
2018-03-23T16:11:17.096+01:00 HTTP:  #004: GET /test/_blipsync (as fahrer1)
2018-03-23T16:11:17.096+01:00 Sync: [61fe6621] Error: Client doesn't support WS protocol BLIP_3a2, only BLIP_3+CBMobile_2
2018-03-23T16:11:17.096+01:00 HTTP+: #004:     --> 200   (0.0 ms)
2018-03-23T16:23:45.060+01:00 Enabling logging: [*]
2018-03-23T16:23:45.143+01:00 ==== Couchbase Sync Gateway/2.0.0(823;5b66afb) ====
2018-03-23T16:23:45.143+01:00 Opening db /test as bucket "test", pool "default", server <http://127.0.0.1:8091>
2018-03-23T16:23:45.143+01:00 GoCBCustomSGTranscoder Opening Couchbase database test on <http://127.0.0.1:8091> as user "test"
2018-03-23T16:23:45.162+01:00 Design docs for current SG view version (2.0) found.
2018-03-23T16:23:45.162+01:00 Verifying view availability for bucket test...
2018-03-23T16:23:45.279+01:00 Views ready for bucket test.
2018-03-23T16:23:45.279+01:00 Cache: Initializing changes cache with options {ChannelCacheOptions:{ChannelCacheMinLength:0 ChannelCacheMaxLength:0 ChannelCacheAge:0s} CachePendingSeqMaxWait:5s CachePendingSeqMaxNum:10000 CacheSkippedSeqMaxWait:1h0m0s}
2018-03-23T16:23:45.279+01:00 Initializing changes cache for database test with sequence: 9
2018-03-23T16:23:45.279+01:00 Feed: Starting mutation feed on bucket test due to either channel cache mode or doc tracking (auto-import/bucketshadow)
2018-03-23T16:23:45.279+01:00 Feed: Using DCP feed for bucket: "test" (based on feed_type specified in config file)
2018-03-23T16:23:45.306+01:00 Feed+: Initializing DCP feed based on persisted checkpoints
2018-03-23T16:23:45.338+01:00 Feed+: Initializing DCP feed based on persisted checkpoints
2018-03-23T16:23:45.342+01:00 Feed+: Connecting to new bucket datasource.  URLs:[http://127.0.0.1:8091], pool:default, bucket:test
2018-03-23T16:23:45.350+01:00 Using metadata purge interval of 3.00 days for tombstone compaction.
2018-03-23T16:23:45.351+01:00     Reset guest user to config
2018-03-23T16:23:45.352+01:00 Starting admin server on 127.0.0.1:4985
2018-03-23T16:23:45.355+01:00 Starting server on 0.0.0.0:4984 ...
_time=2018-03-23T16:23:45.382+01:00 _level=INFO _msg=Using plain authentication for user test
2018-03-23T16:23:45.392+01:00 DCP: Backfill in progress: 4% (2 / 50)
2018-03-23T16:23:45.424+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:fahrer1}") count=2
2018-03-23T16:23:45.424+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:test}") count=3
2018-03-23T16:23:45.426+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:fahrer3}") count=4
2018-03-23T16:23:45.426+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:tms1}") count=5
2018-03-23T16:23:45.426+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:tms2}") count=6
2018-03-23T16:23:45.426+01:00 DCP: Backfill complete
2018-03-23T16:23:45.426+01:00 Changes+: Notifying that "test" changed (keys="{_sync:user:fahrer2}") count=7
2018-03-23T16:23:45.426+01:00 DCP+: Persisting checkpoint for vbno 228
2018-03-23T16:24:31.561+01:00 HTTP:  #001: GET /test/_blipsync (as GUEST)
2018-03-23T16:24:31.561+01:00 HTTP: #001:     --> 401 Login required  (0.0 ms)
2018-03-23T16:24:31.665+01:00 HTTP:  #002: GET /test/_blipsync (as fahrer1)
2018-03-23T16:24:31.666+01:00 HTTP+: #002:     --> 101 [163b9235] Upgraded to BLIP+WebSocket protocol. User:fahrer1.  (0.0 ms)
2018-03-23T16:24:31.666+01:00 WS: [163b9235] Start BLIP/Websocket handler
2018-03-23T16:24:31.718+01:00 SyncMsg: [163b9235] #001: Type:getCheckpoint Client:cp-7uOYXe5e+6odcheIRghu4zTRraE= User:fahrer1
2018-03-23T16:24:31.719+01:00 SyncMsg+: [163b9235] #001: Type:getCheckpoint   --> OK Time:1.004ms User:fahrer1
2018-03-23T16:24:31.719+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T16:24:31.739+01:00 SyncMsg: [163b9235] #002: Type:proposeChanges #Changes: 1 User:fahrer1
2018-03-23T16:24:31.739+01:00 SyncMsg+: [163b9235] #002: Type:proposeChanges   --> OK Time:0s User:fahrer1
2018-03-23T16:24:31.739+01:00 SyncMsg: [163b9235] #003: Type:subChanges Since:9 Continuous:true BatchSize:500  User:fahrer1
2018-03-23T16:24:31.739+01:00 Sync: [163b9235] Sending changes since 9. User:fahrer1
2018-03-23T16:24:31.739+01:00 Changes+: Int sequence multi changes feed...
2018-03-23T16:24:31.739+01:00 Changes: MultiChangesFeed(channels: {*}, options: {Since:9 Limit:0 Conflicts:false IncludeDocs:false Wait:true Continuous:true Terminator:0xc04200fc20 HeartbeatMs:0 TimeoutMs:0 ActiveOnly:false}) ...   (to fahrer1)
2018-03-23T16:24:31.740+01:00 Changes+: MultiChangesFeed: channels expand to "!:1,fahrer1:5" ...   (to fahrer1)
2018-03-23T16:24:31.740+01:00 Cache: Initialized cache for channel "!" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T16:24:31.740+01:00 Cache: getCachedChanges("!", 9) --> 0 changes valid from #10
2018-03-23T16:24:31.740+01:00 Changes+: [changesFeed] Found 0 changes for channel !
2018-03-23T16:24:31.740+01:00 Cache: Initialized cache for channel "fahrer1" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T16:24:31.740+01:00 Cache: getCachedChanges("fahrer1", 9) --> 0 changes valid from #10
2018-03-23T16:24:31.740+01:00 Changes+: [changesFeed] Found 0 changes for channel fahrer1
2018-03-23T16:24:31.740+01:00 Changes+: MultiChangesFeed waiting...   (to fahrer1)
2018-03-23T16:24:31.740+01:00 Changes+: No new changes to send to change listener.  Waiting for "test"'s count to pass 2
2018-03-23T16:24:31.740+01:00 Sync+: [163b9235]     Sending 0 changes. User:fahrer1
2018-03-23T16:24:31.740+01:00 Sync: [163b9235] Sent all changes to client. User:fahrer1
2018-03-23T16:24:31.772+01:00 SyncMsg: [163b9235] #004: Type:setCheckpoint Client:cp-7uOYXe5e+6odcheIRghu4zTRraE= Rev:0-2  User:fahrer1
2018-03-23T16:24:31.772+01:00 SyncMsg+: [163b9235] #004: Type:setCheckpoint   --> OK Time:0s User:fahrer1
2018-03-23T16:24:31.772+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T16:24:45.107+01:00 SyncMsg: [163b9235] #005: Type:proposeChanges #Changes: 1 User:fahrer1
2018-03-23T16:24:45.108+01:00 SyncMsg+: [163b9235] #005: Type:proposeChanges   --> OK Time:1.0014ms User:fahrer1
2018-03-23T16:24:45.165+01:00 SyncMsg: [163b9235] #006: Type:setCheckpoint Client:cp-7uOYXe5e+6odcheIRghu4zTRraE= Rev:0-3  User:fahrer1
2018-03-23T16:24:45.165+01:00 SyncMsg+: [163b9235] #006: Type:setCheckpoint   --> OK Time:0s User:fahrer1
2018-03-23T16:24:45.166+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T16:24:48.657+01:00 SyncMsg: [163b9235] #007: Type:proposeChanges #Changes: 1 User:fahrer1
2018-03-23T16:24:48.657+01:00 SyncMsg+: [163b9235] #007: Type:proposeChanges   --> OK Time:0s User:fahrer1
2018-03-23T16:24:48.674+01:00 SyncMsg: [163b9235] #008: Type:setCheckpoint Client:cp-7uOYXe5e+6odcheIRghu4zTRraE= Rev:0-4  User:fahrer1
2018-03-23T16:24:48.675+01:00 SyncMsg+: [163b9235] #008: Type:setCheckpoint   --> OK Time:1.0019ms User:fahrer1
2018-03-23T16:24:48.675+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T16:25:06.804+01:00 DCP+: Persisting checkpoint for vbno 627
2018-03-23T16:25:06.804+01:00 Import+: Attempting to import doc "b2a17504-a7e1-4ad1-b040-896260024f6c"...
2018-03-23T16:25:06.805+01:00 CRUD+: Doc b2a17504-a7e1-4ad1-b040-896260024f6c is not an SG write, based on cas. cas:151e960d07a90000 syncCas:"0x0000e79d6b8f1e15"
2018-03-23T16:25:06.805+01:00 Import: Created new rev ID 3-fb027912c0f234fec0672881fef856c3
2018-03-23T16:25:06.805+01:00 CRUD+: Invoking sync on doc "b2a17504-a7e1-4ad1-b040-896260024f6c" rev 3-fb027912c0f234fec0672881fef856c3
2018-03-23T16:25:06.805+01:00 CRUD+: No old revision "b2a17504-a7e1-4ad1-b040-896260024f6c" / "2-bca0ef2d6144589d92534a04df735a968d9225f2"
2018-03-23T16:25:06.805+01:00 CRUD+: No old revision "b2a17504-a7e1-4ad1-b040-896260024f6c" / "1-20abb74307811ba29f7e55176e54661da02a0d66"
2018-03-23T16:25:06.816+01:00 CRUD+: Saving doc (seq: #10, id: b2a17504-a7e1-4ad1-b040-896260024f6c rev: 3-fb027912c0f234fec0672881fef856c3)
2018-03-23T16:25:06.816+01:00 CRUD: Stored doc "b2a17504-a7e1-4ad1-b040-896260024f6c" / "3-fb027912c0f234fec0672881fef856c3"
2018-03-23T16:25:06.816+01:00 Import+: Imported b2a17504-a7e1-4ad1-b040-896260024f6c (delete=false) as rev 3-fb027912c0f234fec0672881fef856c3
2018-03-23T16:25:06.816+01:00 DCP+: Persisting checkpoint for vbno 520
2018-03-23T16:25:06.816+01:00 DCP+: Persisting checkpoint for vbno 627
2018-03-23T16:25:06.817+01:00 Cache: Received #10 after   2ms ("b2a17504-a7e1-4ad1-b040-896260024f6c" / "3-fb027912c0f234fec0672881fef856c3")
2018-03-23T16:25:06.817+01:00 Cache: Initialized cache for channel "tms1" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T16:25:06.817+01:00 Cache:     #10 ==> channel "tms1"
2018-03-23T16:25:06.817+01:00 Cache:     #10 ==> channel "fahrer1"
2018-03-23T16:25:06.817+01:00 Cache: Initialized cache for channel "fahrer2" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T16:25:06.817+01:00 Cache:     #10 ==> channel "fahrer2"
2018-03-23T16:25:06.817+01:00 Cache: Initialized cache for channel "fahrer3" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T16:25:06.817+01:00 Cache:     #10 ==> channel "fahrer3"
2018-03-23T16:25:06.817+01:00 Cache: Initialized cache for channel "*" with options: &{ChannelCacheMinLength:50 ChannelCacheMaxLength:500 ChannelCacheAge:1m0s}
2018-03-23T16:25:06.817+01:00 Cache:     #10 ==> channel "*"
2018-03-23T16:25:06.817+01:00 Changes+: Notifying that "test" changed (keys="{*, fahrer1, fahrer2, fahrer3, tms1}") count=8
2018-03-23T16:25:06.817+01:00 Changes+: MultiChangesFeed: channels expand to "!:1,fahrer1:5" ...   (to fahrer1)
2018-03-23T16:25:06.817+01:00 Cache: getCachedChanges("!", 9) --> 0 changes valid from #10
2018-03-23T16:25:06.817+01:00 Changes+: [changesFeed] Found 0 changes for channel !
2018-03-23T16:25:06.817+01:00 Cache: getCachedChanges("fahrer1", 9) --> 1 changes valid from #10
2018-03-23T16:25:06.817+01:00 Changes+: [changesFeed] Found 1 changes for channel fahrer1
2018-03-23T16:25:06.817+01:00 Changes+: Channel feed processing seq:10 in channel fahrer1   (to fahrer1)
2018-03-23T16:25:06.817+01:00 Changes+: MultiChangesFeed sending {Seq:10, ID:b2a17504-a7e1-4ad1-b040-896260024f6c, Changes:[map[rev:3-fb027912c0f234fec0672881fef856c3]]}   (to fahrer1)
2018-03-23T16:25:06.817+01:00 Changes+: MultiChangesFeed waiting...   (to fahrer1)
2018-03-23T16:25:06.817+01:00 Changes+: No new changes to send to change listener.  Waiting for "test"'s count to pass 8
2018-03-23T16:25:06.817+01:00 Changes: sending 1 change(s)
2018-03-23T16:25:06.817+01:00 Sync+: [163b9235]     Sending 1 changes. User:fahrer1
2018-03-23T16:25:06.848+01:00 Sync: [163b9235] Sent 1 changes to client, from seq 10.  User:fahrer1
2018-03-23T16:25:06.848+01:00 Sync+: [163b9235]     Sending 0 changes. User:fahrer1
2018-03-23T16:25:06.848+01:00 Sync+: [163b9235] Sending rev "b2a17504-a7e1-4ad1-b040-896260024f6c" 3-fb027912c0f234fec0672881fef856c3 based on 2 known.  User:fahrer1
2018-03-23T16:25:06.949+01:00 SyncMsg: [163b9235] #009: Type:setCheckpoint Client:cp-7uOYXe5e+6odcheIRghu4zTRraE= Rev:0-5  User:fahrer1
2018-03-23T16:25:06.950+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T16:25:06.950+01:00 SyncMsg+: [163b9235] #009: Type:setCheckpoint   --> OK Time:1.0045ms User:fahrer1
2018-03-23T16:25:07.023+01:00 SyncMsg: [163b9235] #010: Type:proposeChanges #Changes: 1 User:fahrer1
2018-03-23T16:25:07.024+01:00 SyncMsg+: [163b9235] #010: Type:proposeChanges   --> OK Time:1.0014ms User:fahrer1
2018-03-23T16:25:07.046+01:00 SyncMsg: [163b9235] #011: Type:rev Id:b2a17504-a7e1-4ad1-b040-896260024f6c Rev:4-dcfbef35d61da8334903e8ef0304fa2ac0f16d52 Sequence:10  User:fahrer1
2018-03-23T16:25:07.047+01:00 CRUD+: Invoking sync on doc "b2a17504-a7e1-4ad1-b040-896260024f6c" rev 4-dcfbef35d61da8334903e8ef0304fa2ac0f16d52
2018-03-23T16:25:07.047+01:00 CRUD+: Saving old revision "b2a17504-a7e1-4ad1-b040-896260024f6c" / "3-fb027912c0f234fec0672881fef856c3" (519 bytes)
2018-03-23T16:25:07.048+01:00 CRUD+: Backed up obsolete rev "b2a17504-a7e1-4ad1-b040-896260024f6c"/"3-fb027912c0f234fec0672881fef856c3"
2018-03-23T16:25:07.049+01:00 DCP+: Persisting checkpoint for vbno 520
2018-03-23T16:25:07.049+01:00 CRUD+: Saving doc (seq: #11, id: b2a17504-a7e1-4ad1-b040-896260024f6c rev: 4-dcfbef35d61da8334903e8ef0304fa2ac0f16d52)
2018-03-23T16:25:07.050+01:00 DCP+: Persisting checkpoint for vbno 627
2018-03-23T16:25:07.051+01:00 Cache: Received #11 after   2ms ("b2a17504-a7e1-4ad1-b040-896260024f6c" / "4-dcfbef35d61da8334903e8ef0304fa2ac0f16d52")
2018-03-23T16:25:07.051+01:00 Cache:     #11 ==> channel "fahrer3"
2018-03-23T16:25:07.051+01:00 Cache:     #11 ==> channel "tms1"
2018-03-23T16:25:07.051+01:00 CRUD: Stored doc "b2a17504-a7e1-4ad1-b040-896260024f6c" / "4-dcfbef35d61da8334903e8ef0304fa2ac0f16d52"
2018-03-23T16:25:07.051+01:00 SyncMsg+: [163b9235] #011: Type:rev   --> OK Time:6.0109ms User:fahrer1
2018-03-23T16:25:07.051+01:00 Cache:     #11 ==> channel "fahrer1"
2018-03-23T16:25:07.051+01:00 Cache:     #11 ==> channel "fahrer2"
2018-03-23T16:25:07.051+01:00 Cache:     #11 ==> channel "*"
2018-03-23T16:25:07.051+01:00 Changes+: Notifying that "test" changed (keys="{*, fahrer1, fahrer2, fahrer3, tms1}") count=9
2018-03-23T16:25:07.051+01:00 Changes+: MultiChangesFeed: channels expand to "!:1,fahrer1:5" ...   (to fahrer1)
2018-03-23T16:25:07.051+01:00 Cache: getCachedChanges("!", 10) --> 0 changes valid from #10
2018-03-23T16:25:07.051+01:00 Changes+: [changesFeed] Found 0 changes for channel !
2018-03-23T16:25:07.051+01:00 Cache: getCachedChanges("fahrer1", 10) --> 1 changes valid from #10
2018-03-23T16:25:07.051+01:00 Changes+: [changesFeed] Found 1 changes for channel fahrer1
2018-03-23T16:25:07.051+01:00 Changes+: Channel feed processing seq:11 in channel fahrer1   (to fahrer1)
2018-03-23T16:25:07.052+01:00 Changes+: MultiChangesFeed sending {Seq:11, ID:b2a17504-a7e1-4ad1-b040-896260024f6c, Changes:[map[rev:4-dcfbef35d61da8334903e8ef0304fa2ac0f16d52]]}   (to fahrer1)
2018-03-23T16:25:07.052+01:00 Changes+: MultiChangesFeed waiting...   (to fahrer1)
2018-03-23T16:25:07.052+01:00 Changes+: No new changes to send to change listener.  Waiting for "test"'s count to pass 9
2018-03-23T16:25:07.052+01:00 Changes: sending 1 change(s)
2018-03-23T16:25:07.052+01:00 Sync+: [163b9235]     Sending 1 changes. User:fahrer1
2018-03-23T16:25:07.072+01:00 SyncMsg: [163b9235] #012: Type:setCheckpoint Client:cp-7uOYXe5e+6odcheIRghu4zTRraE= Rev:0-6  User:fahrer1
2018-03-23T16:25:07.082+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T16:25:07.082+01:00 SyncMsg+: [163b9235] #012: Type:setCheckpoint   --> OK Time:10.0241ms User:fahrer1
2018-03-23T16:25:07.112+01:00 Sync: [163b9235] Sent 1 changes to client, from seq 11.  User:fahrer1
2018-03-23T16:25:07.112+01:00 Sync+: [163b9235]     Sending 0 changes. User:fahrer1
2018-03-23T16:25:07.154+01:00 SyncMsg: [163b9235] #013: Type:setCheckpoint Client:cp-7uOYXe5e+6odcheIRghu4zTRraE= Rev:0-7  User:fahrer1
2018-03-23T16:25:07.156+01:00 DCP+: Persisting checkpoint for vbno 833
2018-03-23T16:25:07.156+01:00 SyncMsg+: [163b9235] #013: Type:setCheckpoint   --> OK Time:2.0048ms User:fahrer1

But I now noticed an “Error: Client doesn’t support WS protocol BLIP_3a2, only BLIP_3+CBMobile_2” in the log:

That’s a clue that your SG is out of date. We made some changes to the replication protocol in beta 2 and consequently bumped the version number.

When I start the sync gateway via command line, it says

Couchbase Sync Gateway/2.0.0(823;5b66afb)

Isn’t this the Beta2?

Well, still a mismatch- looks like the right CBL version isn’t getting picked up by the app . The SGW version is correct . Check this post out

Ok, the protocol incompatibility error didn’t occur any more after a clean rebuild.

But I just noticed that the ‘ceasing to sync’ problem showed up again after letting an Android instance run for a while.

It have read that you have taken away AddLoggerProvider. It would be so good to redirect Lite logging to the debug output. Is there any way to accomplish this right now in UWP, Android, and iOS? Is there any howto documentation where logs are saved using the different platforms? I tried installing CatLog on an Android device without much success…

On .Net platforms, the ability to specify log path is provided via the support libraries. Refer to this link
Would be something like this …

     Couchbase.Lite.Support.Droid.EnableTextLogging(....)

The log API is all .NET specific since the other platforms have more well defined endpoints to go to but the EnableTextLogging method has the following behavior:

  • Android: logcat
  • iOS: NSLog
  • .NET Core / UWP: Log to file (.NET Core has a parameter to choose where to write to, UWP writes to the app sandbox directory)

Thank you. Now, with device logging enabled, this may shed some light why CouchbaseLite is at some point suddenly stopping the synchronization:

INFO) LiteCore {C4SocketImpl#11} Sending PING
VERBOSE) Sync (WebSocketWrapper) [77] 2018-03-26T18:19:32.3194556+02:00 <<< received 2 bytes [now 2 pending]
INFO) LiteCore {C4SocketImpl#11} Received PONG
INFO) LiteCore {C4SocketImpl#11} Sending PING
INFO) Sync (WebSocketWrapper) [25] 2018-03-26T18:24:32.3805430+02:00 WebSocket CLOSED WITH ERROR: System.IO.IOException: Unable to read data from the transport connection: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. ---> System.Net.Sockets.SocketException: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at Couchbase.Lite.Sync.WebSocketWrapper.PerformRead()
WARNING) LiteCore {C4SocketImpl#11} Unexpected or unclean socket disconnect! (reason=Network error, code=3)
INFO) LiteCore {C4SocketImpl#11} sent 1283 bytes, rcvd 664, in 2400.115 sec (1/sec, 0/sec)
INFO) LiteCore {Connection#1} Closed with Network error 3: Unable to read data from the transport connection: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat.
INFO) Sync {Repl#2} Connection closed with Network error 3: "Unable to read data from the transport connection: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat." (state=2)
INFO) Sync {DBWorker#4} activityLevel=idle: pendingResponseCount=0, eventCount=1
INFO) LiteCore {BLIPIO#3} ~BLIPIO: Sent 1169 bytes, rcvd 626. Max outbox depth was 1, avg 1.00
INFO) Sync {Push#5} activityLevel=idle: pendingResponseCount=0, caughtUp=1, changeLists=0, revsInFlight=0, blobsInFlight=0, awaitingReply=0, revsToSend=0, pendingSequences=0
ERROR) Sync {Repl#2} Got LiteCore error: Unable to read data from the transport connection: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (6/3)
VERBOSE) Sync {Repl#2} progress +0/+0, 0 docs -- now 379 / 379, 2 docs
INFO) Sync {Repl#2} activityLevel=stopped: connectionState=-1
INFO) Sync {Repl#2} now stopped
INFO) Sync {Pull#6} activityLevel=idle: pendingResponseCount=0, _caughtUp=1, _waitingForChangesCallback=0, _pendingRevMessages=0, _activeIncomingRevs=0
INFO) DB Closing DataFile
VERBOSE) DB Pre-close housekeeping: 0 of 10 pages free (0%)
INFO) Sync (Replicator) [35] 2018-03-26T18:24:32.3978543+02:00 Replicator[<*> ws://957.no-ip.org:4984/test] is Stopped, progress 379/379
INFO) Sync {Repl#2} activityLevel=stopped: connectionState=-1
VERBOSE) DB DataFile: begin transaction
VERBOSE) DB KeyStore(default) update 7906174a-9452-428d-867c-9154a7421c26
VERBOSE) DB DataFile: commit transaction

OK…A google translate of the following …

is -

A connection attempt failed because the remote station did not respond properly after a certain amount of time, or the connection made failed because the connected host did not respond

Do you know if the SGW was restarted or was down temporarily ? (There is an issue being tracked for Xamarin clients unable to reconnect back after SGW restart …)

No, it was active all the time (I used to have it run locally on the same Windows machine together with the Couchbase server, but moved SGW and server to a dedicated Ubuntu 16.04 LTS last week just to see if it makes a difference – obviously it does not).

I’d say the problem lies on the CouchbaseLite side, because clients die independently from each other, even when running on the same machine, e.g. an UWP client keeping a sync connection while a client in an Android emulator has already given up. And shouldn’t CouchbaseLite have a connectivity manager active that would reconnect to the SGW after it was down for a moment?

Its definitely possible. Xamarin has not been run through QE testing yet so I imagine there is still some kinks in it. UWP has though.

When is QE testing scheduled for Xamarin? I already had two rather emberrassing demonstrations where Couchbase Lite refused to sync, so endorsement by my customer is fading now. I’m still convinced that using Couchbase Lite with SGW is the best solution for what we plan, if I only could find a way to show that the key functionality is actually working reliably.

I would have used v1.5, if the project wasn’t based on .NET Standard 2.0. If there is anything I can do to help you find the bug, please speak.

QE testing of Xamarin has just commenced but it will not be done before 2.0 GA (which is the priority). But hopefully bug fixes will start making its way into the pre-release 2.1 builds so you can retest with those builds to see if the problem persists .
We have started to track some of the Xamarin issues - Please go ahead and file a bug if you think yours is not addressed by these cases . Also, details of your test would be helpful when you file a bug (for example - after how long does the sync stop ? )

Ok, I filed a bug report along with an example project. Hopefully you are able to reproduce the behaviour.

Hi,
Maybe this might help you.
these are just random experiences we have/had in out development.

We had several crashes in our tests due to the logging
Database.SetLogLevel(LogDomain.All, Couchbase.Lite.Logging.LogLevel.Verbose);
Couchbase.Lite.Support.Droid.EnableTextLogging();
After commenting them out the crashes went away (SQLite can’t open error and others)

We had an issue of the replicator stuck in connecting status. In Android options we set Linking to None. After this it ran perfectly

I certainly don’t want to imply that this will solve your issue or the logging is faulty, it just worked in our environment (Xamarin).

The issue may be fixed in the coming db024. See here:

Yes sorry,

No now I see. My reaction was meant as a help to you, it seemed like I have the errors too. I don’t

Just FYI there will not be a db024. 2.0.0 is finalized and will drop on Wednesday barring an unexpected emergency, and unfortunately my theoretical fix didn’t make it in as we made to make some tough choices about which platforms to work on given the limited amount of resources we have for QE. The changes are in the master branch though so it will be in the first DB for 2.1.0 (I don’t know when we will start those again but I imagine we want to get back into it very soon since our window for 2.1 is very tight with just a couple months).