Replication not works from Server to Mobile



I have problem with both side replications. I have Couchbase server and Couchbase Sync Gateway running on PC. Then I have simple Android Aplication made from example GlocerySync. I need to set synchronization to one database. To database I need access from Android SDK and also from server Rest Api or Node.js library. From Android the replication works, but when I create new document using Rest Api or Node.js in shadowing bucket, it replicates to main bucket but not into Android.

Here is config.json for Gateway:

"interface": ":4984",
"adminInterface": ":4985",
"log": ["CRUD", "CRUD+", "HTTP", "HTTP+", "Access", "Cache", "Shadow", "Shadow+", "Changes", "Changes+"],
"databases": {
    "testovaci": {
        "server": "http://localhost:8091",
        "bucket": "test",
        "sync": `function(doc) {channel(doc.channels);}`,
        "users": {
            "GUEST": {
                "disabled": false,
                "admin_channels": ["*"]
        "shadow": {
             "server": "http://localhost:8091",
             "bucket": "shadow"

Here is main code from Android:

                 // create a manager
		 Manager manager = new Manager(new AndroidContext(this),
		 String dbname = "hello";
		 // create a new database
		 Database database = manager.getDatabase(dbname);

			URL syncUrl = new URL("");
			Replication pullReplication = database

			pullReplication.addChangeListener(new Replication.ChangeListener() {
			    public void changed(Replication.ChangeEvent event) {
			        Replication replication = event.getSource();
			        Log.e("testApp","Replication start");
			        if (!replication.isRunning()) {
			            String msg = String.format("Replicator %s not running", replication);
			        else {
			            int processed = replication.getCompletedChangesCount();
			            int total = replication.getChangesCount();
			            String msg = String.format("Replicator processed %d / %d", processed, total);

Please help


Hello @Cronoss,

The Couchbase Server Node.JS API uses libcouchbase which talks binary memcache and therefore not REST so the document model will not work together.

More info:

Are you able to see a new revision being created?