Authenticated Sync - Checkin Status

29 views
Skip to first unread message

João Agostinho

unread,
Nov 7, 2014, 7:10:42 AM11/7/14
to mobile-c...@googlegroups.com
Greetings,

Im trying to setup an authenticated continuous sync between my server and a mobile device, but im having some problems getting the current state of the sync process, more specifically if the sync is failing with a 401.

As far as i could tell from the examples and some responses on the forums, for continuous replication one needs to do a GET on "_active_tasks" and look for the status of the task with the id returned in the "session_id" of the response of the POST to "_replicate",
however my own tests on this showed that the status returned by the call to "_active_tasks" is always "Processed 0/0 changes" and there's no error in the response even though in the console of the sync gateway i can see a 401 and the documents aren't being synchronized.

Did i get it wrong and you need to check the status in another way? Or is it a bug?

Jens Alfke

unread,
Nov 10, 2014, 1:21:38 PM11/10/14
to mobile-c...@googlegroups.com

> On Nov 7, 2014, at 4:10 AM, João Agostinho <joa...@gmail.com> wrote:
>
> As far as i could tell from the examples and some responses on the forums, for continuous replication one needs to do a GET on "_active_tasks"

If you're using PhoneGap or something equivalent, yes.

> however my own tests on this showed that the status returned by the call to "_active_tasks" is always "Processed 0/0 changes" and there's no error in the response even though in the console of the sync gateway i can see a 401 and the documents aren't being synchronized.

Could you show us the replication config (the JSON data you POSTed to /_replicate), and the JSON response from _active_tasks?

—Jens

Reply all
Reply to author
Forward
0 new messages