400 error Change tracker stopped during continuous replication (cordova)

194 views
Skip to first unread message

Vinay Bhinde

unread,
Jan 27, 2015, 10:15:47 AM1/27/15
to mobile-c...@googlegroups.com
Hello

I am using couchbase lite phonegap plugin to sync with gateway from android and ios devices. I am facing a 400 "java.lang.Exception" error while performing continuous replication. This error occurs in pull replication and not push. Also i get this error in a particular scenario which i am describing below : 

- Open cordova app on android device A
- Trigger sync
- Put 15-20 documents into cblite which get synced to Sync Gateway (SG)
- remove the app from device A
- Again install the app on device A
- Trigger sync
- Use the app with same user account credentials as previous so as to get all the data on SG synced back on device.
- It works as expected....i get back all the data that i entered previously.
- Close the app (don't uninstall) and reopen.
- Trigger Sync
- _active_tasks shows gives below error in console.log()

task{"progress":100,"target":"budgetappdb","error":[400,"java.lang.Exception: Change tracker stopped during continuous replication"],"source":"http://192.168.1.100:4984/budgetappdb","type":"Replication","status":"Processed 17 / 17 changes","task":"repl002"}



I don't have any idea what does this error mean and any possible cause for it. Can it be result of some inappropriate or bad data in my docs. I don't think that might be a issue as sync works completely fine before refreshing.

Also my requests to SG are authenticated and i don't see any 404 auth errors in SG so authentication isn't the issue as far as i think.

The same thing occurs on IOS device too.

Any help would be really appreciated.

Thanks.



Traun Leyden

unread,
Jan 30, 2015, 2:11:34 PM1/30/15
to mobile-c...@googlegroups.com
Can you file a ticket to https://github.com/couchbase/couchbase-lite-java-core and include logcat output?

--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/37ca30dd-b4ad-46a2-bc0b-e9cd42b4fdf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vinay Bhinde

unread,
Feb 2, 2015, 8:34:51 AM2/2/15
to mobile-c...@googlegroups.com

The issue is solved. The problem was that while the user opened the app every time and internet was available i used to delete the previous session on SG and generate a new session for user. In between generation of new session and deletion of old session my triggerSync function to start push and pull was being called which was using the old cookie which was deleted already and before a new one was generated. Hence SG throwed 404 error and my _changes tracker got an exception at client side.

Log cat logs and debugging my controllers helped me find this.

Traun Leyden

unread,
Feb 2, 2015, 7:00:31 PM2/2/15
to mobile-c...@googlegroups.com
Thanks for posting your solution!

--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages