Couchbase Lite .Net Push and Pull question

I’m implementing a solutions that use Couchbase Lite for .Net, Sync Gateway, and the Couchbase server.
Optional to read: Here you can find the architecture and description on the solution: Architectural information for a Server/Mobile app
I’m now testing the caouchbase lite .net library. My documents push and pull works pretty well, but i get some errors logged to console error stream, and i would like to know if I’m doing something wrong or how can those errors be handled.

Errors recived:
Running replication:
"Puller: Couchbase.Lite.Replicator.Puller: Received invalid doc ID from _changes: System.Collections.Generic.Dictionary’2[System.String,System.Object]
After replication ends:
"Replication: Database is null, ignoring remote checkpoint response"
Sometimes i also get:
Pusher: Error converting lastSequence: to long. Using 0

I’ve packed up a sample project, extracted from the unit test of my main sample project.
Here you can find the pastebin of this sample: (see below for UPDATE 1)
I’m wondering if my Push and Pull methods has something wrong.

Using this observer on replication change, prevents the fails of the previous code. Indeed sometimes the previous code get blocked during the Push/Pull.
So the push and pull function became
ad will use this class

Hello @sb_davidegironi,

Can you elaborate what you mean by ‘sometimes the previous code get blocked during the Push/Pull …’

Seems like your are calling the Push/Pull correctly in the UPDATE 1

Debugging i’ve found that it goes into a blocking loop during the
It happens only pushing and pulling big amount of documents (> 100.000 documents).