Couchbase lite cordova not syncing all documents

I am using couchbase 5.0.1 with sync gateway 1.5.1 … my app is using Couchbase-Lite-PhoneGap-Plugin with couchbase lite 1.4.1.

Replication from the server to the mobile is resilient. Replication from the mobile to the sync gateway is flaky, some documents simply do not sync … I see them on the local device, but they don’t sync to the server.

Has anyone experienced an issue like this?

Can you check the logs for any obvious errors? I would start with the Sync Gateway logs, since it might be rejecting requests from the mobile SDK, but if nothing jumps out at you there, you could check the Couchbase Lite logs.

Are you on iOS or Android? (Or both?)

I have checked the sync_gateway and no errors. The issue is on iOS … unfortunately I do not have access to the device as the customer is in Sweden.

Documents created on the gateway synchronise to the users device straight away, but documents created on the phone have not synchronised to the sync gateway since 5th May.

I have installed the app on my phone (android) and logged in with their credentials … docs created on the sync gateway synchronise straight away and documents created on my phone synchronise to the sync gateway straight away.

Is there a way to detect local conflicts on the phone and resolve them there?

I’ve just had the same issue reported on another customer device … iOS … the user uses the app which creates a document storing data for the work they are doing, the document i supdated locally as they carry out their work and the changes sync perfectly for a while … the user locks the phone and comes back to the app an hour later … they complete the work which means more changes to the local document but these changes no longer sync to the gateway.

I am using the cordova 1.4.1 plugin. The sync gateway has been upgraded to 2.0.0 and the database is still at 5.0.1.

I’ve spent nearly a year slowly building a dashboard and the mobile app functionality, I moved to couchbase from couchdb as the sync_gateway looked like a great solution. My product is being evaluated by a couple of big customers, and unreliable sync will kill it off and render my efforts as having been totally futile.

Any help will be gratefully received.

We’d need to see device logs to troubleshoot this. Any way you could get logs from the user?

@jens I will try and get the logs from the user, as soon as I have them I will forward them.

@geraldapeoples Did you able to fix the issue? Actually we are facing exact same issue and that too on iOS only. We though it might be memory issue but that also was not the concern.

It would be really helpful of you if you can update to how you got it fixed?

@Gaurav_Saini We are now running CouchbaseLite 2.7.1 with SyncGateway 2.8.0 and replication is working perfectly. We are also testing CouchaseLite 2.8.4 which is working really well too. We have developed our own CBLite plugin which allowed us to use take advantage of the latest CouchbaseLite.

We are now running CouchbaseLite 2.7.1 with SyncGateway 2.8.0 and replication is working perfectly. We are also testing CouchaseLite 2.8.4 which is working really well too. We have developed our own CBLite plugin which allowed us to use take advantage of the latest CouchbaseLite - cordova-plugin-cblite