Phonegap - missed Sync after SyncGateway restart

14 views
Skip to first unread message

Luca Palezza

unread,
May 20, 2014, 4:55:58 PM5/20/14
to mobile-c...@googlegroups.com
Hi,
I am starting to develop an app based on Phonegap plugin for Couchbase lite.
I am testing the todo-lite example. In general everything works, but if I try to stop and restart the SyncGateway, the app does not re-connect to the server until I kill the app and restart it.
So if the server for some reason re-starts, the app looses connection and does not re-establish it again.
For now I tried only on the iOS simulator, but I presume the same would happen if the app goes off-line for a while and the reconnects to the network.
Is there any solution for this?
Any suggestion?
Thanks,
Luca

Jens Alfke

unread,
May 22, 2014, 12:41:43 PM5/22/14
to mobile-c...@googlegroups.com

On May 20, 2014, at 1:55 PM, Luca Palezza <luca.p...@gmail.com> wrote:

I am testing the todo-lite example. In general everything works, but if I try to stop and restart the SyncGateway, the app does not re-connect to the server until I kill the app and restart it.

Are you using a continuous replication (i.e. did you add the property “continuous”:true in the request to /_replicate?) If so, it should keep retrying in this case.

You can troubleshoot this by adding the command-line arguments “-LogSync YES” when starting the app, which will turn on logging showing what’s going on during replication.

—Jens
Reply all
Reply to author
Forward
0 new messages