Intermittent connections with android and phonegap

23 views
Skip to first unread message

Daniel Carr

unread,
Aug 7, 2014, 1:40:59 AM8/7/14
to mobile-c...@googlegroups.com
Hi all. 

I'm finding that a couchbase-lite android app (on phonegap) is having it's pull replications fail silently.  I had a simultaneous push replication working fine. 

I've got 3 questions here. 1) is a continuous replication supposed to stay alive no matter what? (In couchdb, by default it tries 10 times then dies.)   2) how do I know if it's died?  3) How likely is it the liteServer that's the problem here, and would I be better off handling the replications in java?

What I did: 

*  start a continuous pull replication (POST to /_replicate)
*  turn off wifi
*  wait on hour
*  turn on wifi

What I observed:

*  GET /_active_tasks returns the replication info with no error.
*  any changes made on the server have not been replicated.
*  after restarting the application, the replication works.


Daniel Carr

unread,
Aug 7, 2014, 1:50:53 AM8/7/14
to mobile-c...@googlegroups.com
The only unusual thing in the logs is a few of these:


E/ChangeTracker(29759): java.net.SocketTimeoutException
E/ChangeTracker(29759): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:491)
E/ChangeTracker(29759): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
E/ChangeTracker(29759): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
E/ChangeTracker(29759): at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
E/ChangeTracker(29759): at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:191)
E/ChangeTracker(29759): at org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:220)
E/ChangeTracker(29759): at org.apache.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStream.java:183)
E/ChangeTracker(29759): at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:155)
E/ChangeTracker(29759): at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:159)
E/ChangeTracker(29759): at org.codehaus.jackson.impl.Utf8StreamParser.loadMore(Utf8StreamParser.java:172)
E/ChangeTracker(29759): at org.codehaus.jackson.impl.Utf8StreamParser._skipWSOrEnd(Utf8StreamParser.java:2304)
E/ChangeTracker(29759): at org.codehaus.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:438)
E/ChangeTracker(29759): at org.codehaus.jackson.map.deser.std.UntypedObjectDeserializer.mapArray(UntypedObjectDeserializer.java:157)
E/ChangeTracker(29759): at org.codehaus.jackson.map.deser.std.UntypedObjectDeserializer.deserialize(UntypedObjectDeserializer.java:51)
E/ChangeTracker(29759): at org.codehaus.jackson.map.deser.std.MapDeserializer._readAndBind(MapDeserializer.java:319)
E/ChangeTracker(29759): at org.codehaus.jackson.map.deser.std.MapDeserializer.deserialize(MapDeserializer.java:249)
E/ChangeTracker(29759): at org.codehaus.jackson.map.deser.std.MapDeserializer.deserialize(MapDeserializer.java:33)
E/ChangeTracker(29759): at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2723)
E/ChangeTracker(29759): at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1900)
E/ChangeTracker(29759): at com.couchbase.lite.replicator.ChangeTracker.run(ChangeTracker.java:319)
E/ChangeTracker(29759): at java.lang.Thread.run(Thread.java:841)

Traun Leyden

unread,
Aug 11, 2014, 4:02:01 PM8/11/14
to mobile-c...@googlegroups.com

Thanks for reporting, that sounds like a bug.  Can you file an issue here: https://github.com/couchbase/couchbase-lite-java-core and include:

* The version of couchbase lite you are using (or phonegap plugin), with a download link where you downloaded it.
* Links to logcat logs (posted on github gists or pastebin)
* Anything else you can think of that will help reproduce the issue.






--
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/c67d7840-b61c-4e22-915e-880129e3e7e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages