Getting stuck with the plugin phonegap 1.0.0 on Android

25 views
Skip to first unread message

Bart Arribe

unread,
Jun 2, 2014, 7:18:04 AM6/2/14
to mobile-c...@googlegroups.com
Hi all,

Since I updated to the last version of Phonegap, the replication between devices with the Sync Gateway is not working as well as before. I'm using Phonegap 1.0.0 and Sync Gateway 1.0.0-23

I couldn't success to reproduce the error i have got every times but it happens to me really often. Most of the times, I can't replicate  from the device to the SG after a problem of changeTracker. You can see below the error I got in logcat :

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

I said most of the times because after this error, it works sometimes ...

Also, when the replication seems to work fine and I try to delete a document by putting the "_deleted=true", it replicates to the SG but not to the other device...


I don't know if it's related or not to my problem but when I, at first, connect the device to the Sync Gateway by a HTTP basic authentication (login:password@SG-IPaddress:Port/SG-dbName), CBL is making a request to the SG to get a document in local storage to SG ("_local/idDoc), which is always missing.


If you have any clues about what is the problem, let me know please :)


Traun Leyden

unread,
Jun 3, 2014, 4:22:01 PM6/3/14
to mobile-c...@googlegroups.com

I said most of the times because after this error, it works sometimes ...


I'm seeing this error a lot as well, and it's usually just noise and not associated w/ any incorrect behavior.  (this should be changed into an INFO or WARN message rather than a stracktrace.

When you say it doesn't work after you see this error, are you saying that the pull replication stops receiving new documents?  If so, can you file a github issue for that specific problem and post the logs into pastebin and a link in the ticket?

 
Also, when the replication seems to work fine and I try to delete a document by putting the "_deleted=true", it replicates to the SG but not to the other device...


So is this reproducible for you every time or only sometimes?  Also, on the other device, does it sync down other changes but just not the _delete?  

 

I don't know if it's related or not to my problem but when I, at first, connect the device to the Sync Gateway by a HTTP basic authentication (login:password@SG-IPaddress:Port/SG-dbName), CBL is making a request to the SG to get a document in local storage to SG ("_local/idDoc), which is always missing.


It's normal for the GET to _local/idDoc to sometimes be missing, but it shouldn't always be missing.  When a pull replication has pushed documents, it should do a PUT to _local/idDoc to store the last sequence it's successfully pulled, and then start from there.  It sounds like this mechanism isn't working.  Do you see any PUT requests to  _local/idDoc that are failing?


Bart Arribe

unread,
Jun 4, 2014, 8:29:35 AM6/4/14
to mobile-c...@googlegroups.com


Le mardi 3 juin 2014 21:22:01 UTC+1, Traun Leyden a écrit :

I said most of the times because after this error, it works sometimes ...


I'm seeing this error a lot as well, and it's usually just noise and not associated w/ any incorrect behavior.  (this should be changed into an INFO or WARN message rather than a stracktrace.

When you say it doesn't work after you see this error, are you saying that the pull replication stops receiving new documents?  If so, can you file a github issue for that specific problem and post the logs into pastebin and a link in the ticket?

I filed an issue on github. But as you said, it's not this error but another one as you can see on the issue. It stops only the push to the SG but can still make any pull.
 
Also, when the replication seems to work fine and I try to delete a document by putting the "_deleted=true", it replicates to the SG but not to the other device...


So is this reproducible for you every time or only sometimes?  Also, on the other device, does it sync down other changes but just not the _delete?
 
Unfortunately, only sometimes and it seems to be all the changes. 
 

 

I don't know if it's related or not to my problem but when I, at first, connect the device to the Sync Gateway by a HTTP basic authentication (login:password@SG-IPaddress:Port/SG-dbName), CBL is making a request to the SG to get a document in local storage to SG ("_local/idDoc), which is always missing.


It's normal for the GET to _local/idDoc to sometimes be missing, but it shouldn't always be missing.  When a pull replication has pushed documents, it should do a PUT to _local/idDoc to store the last sequence it's successfully pulled, and then start from there.  It sounds like this mechanism isn't working.  Do you see any PUT requests to  _local/idDoc that are failing?
 
No, it's fine. It's just the first one who is missing.

Bart Arribe

unread,
Jun 4, 2014, 9:10:49 AM6/4/14
to mobile-c...@googlegroups.com


Le mercredi 4 juin 2014 13:29:35 UTC+1, Bart Arribe a écrit :


Le mardi 3 juin 2014 21:22:01 UTC+1, Traun Leyden a écrit :

I said most of the times because after this error, it works sometimes ...


I'm seeing this error a lot as well, and it's usually just noise and not associated w/ any incorrect behavior.  (this should be changed into an INFO or WARN message rather than a stracktrace.

When you say it doesn't work after you see this error, are you saying that the pull replication stops receiving new documents?  If so, can you file a github issue for that specific problem and post the logs into pastebin and a link in the ticket?

I filed an issue on github. But as you said, it's not this error but another one as you can see on the issue. It stops only the push to the SG but can still make any pull.
 
Also, when the replication seems to work fine and I try to delete a document by putting the "_deleted=true", it replicates to the SG but not to the other device...


So is this reproducible for you every time or only sometimes?  Also, on the other device, does it sync down other changes but just not the _delete?
 
Unfortunately, only sometimes and it seems to be all the changes. 
 
I'm taking back what I have just said. Unfortunately, It happens sometimes as well, but it seems to be different from the issued I filed. Indeed, I can replicate other documents to the other device but I can't replicate the document i have deleted. I can see the document deleted on the SG but not on the other device,
What is odd as well that I don't have any error in the logs except the changeTracker and it happens randomly, I mean, it cannot replicate a document deleted and when I try to another document 2 min later, it works again but without replicating the first document deleted, only the second one.

I filed another issue.
Reply all
Reply to author
Forward
0 new messages