Sync Gateway doesn't replicate more than 2 items. Phonegap/Cordova

Hello,

I’ve set everything up correctly. Facebook authorization works, saving, deleting, updating documents works on couchbase lite as well as on server. But the problem is that only two documents are being replicated to another device. These two docs are the first ones which I add when starting the app. It doesn’t matter how many more I add to cb lite or the server (all docs are being successfully uploaded to the server), it replicates only the first two. I tried to delete these first two documents from the server to see if next two docs would replicate. This is where I completely lose tracks. Even after I delete these 2 docs from the server and phone, after I sign in again it still gets those first two docs from somewhere. I have little experience with couchbase and maybe I haven’t understood something right. Any suggestions?

Are you running replications in continuous mode?
Can you share the listener REST API code to kick off the replication?
Or even better would be to share the project on Github so we can have a look :].

James

Generally when docs aren’t being synced it’s because they aren’t assigned to the right channels or because the user doing the syncing doesn’t have access to them. We have a document on troubleshooting these issues.

Hello,
Yes, I’m running them in continuous mode.
The code is exactly the same as example todo-lite applications.
I cannot share the project on Github due to reasons of confidentiality for my customer.

Thanks

Thanks for the link but it doesn’t help me. It shows that everything is correct and all the needed channels are assigned correctly. Is it possible that there might be something wrong with the server configuration? I didn’t set up the server. There were people working on this project before me.

Which Couchbase Lite platform are you using? My advice would be to enable logging on the client and see what it’s doing.

Also, remember that deleting a document doesn’t make it go away completely. It really adds a “tombstone” revision with the property "_deleted":true. This revision will get replicated to a client, to sync the deletion of the document.

I’m using cb lite version 1.1.0.
The problem was JSON configuration file that is executed when the server is started. Previous developers of the project left a little mess after themselves.

Thank you for your advice.

I had the same issue before so I moved my push and pull requests on a set interval function, with continuos mode disabled and problem solved.