Error when trying to pull from sync gateway

58 views
Skip to first unread message

Ricburgis

unread,
Sep 25, 2014, 8:55:22 AM9/25/14
to mobile-c...@googlegroups.com
Hi,

I'm getting the following error when trying to do a pull from my mobile app. The push works just fine and the documents are actually synched to the "real" bucket after being pushed to the sync bucket.

This is the error itself:

13:51:23.589866 HTTP:  #001: GET /sync_gateway/_local/1ddc5e584fcd0cb05c90acb4dfd6f64aeca74a22
13:51:23.630122 HTTP: #001:     --> 404 missing  (1144.1 ms)
13:51:23.641840 HTTP:  #002: GET /sync_gateway/_local/26df0022062bed830fa288113db3269fe4881568
13:51:23.681770 HTTP: #002:     --> 404 missing  (1195.7 ms)
13:51:24.028722 HTTP:  #003: POST /sync_gateway/_changes
13:51:24.028920 HTTP: #003:     --> 400 Invalid JSON: "json: cannot unmarshal string into Go value of type int"  (39.3 ms)

Any help would be appreciated.

Traun leyden

unread,
Sep 25, 2014, 9:18:36 AM9/25/14
to mobile-c...@googlegroups.com

Which version / os of couchbase lite are you using?

Also which version of sync gw?
--
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/3d220d79-592a-468f-91b0-3f9261899fb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Reslan

unread,
Sep 25, 2014, 9:19:25 AM9/25/14
to mobile-c...@googlegroups.com
One of the common causes of that error on a _changes feed, is passing the "limit" property as a string:

e.g.

curl -X POST http://127.0.0.1/mydb/_changes -H "Content-Type: application/json" -d '{"since":"1","limit":"20"}'


Will throw that error


curl -X POST http://127.0.0.1/mydb/_changes -H "Content-Type: application/json" -d '{"since":"1","limit":20}'


Will behave as expected.


If you are using one of the Couchbase Lite client SDK's? to create the replicator, can you paste the code you use to create the replicator, this might be a bug.


Andy

Ricburgis

unread,
Sep 25, 2014, 9:24:44 AM9/25/14
to mobile-c...@googlegroups.com
Couchbase lite version is 1.0.5359.19460 and Sync-gateway 1.0.2-9(commit 95ef60ab).

Ricburgis

unread,
Sep 25, 2014, 9:27:04 AM9/25/14
to mobile-c...@googlegroups.com
I'm using the SimpleAndroidSync sample and it's basically unchanged. As for my sync gateway config is the following:

{
   "interface":":4984",
   "adminInterface":":4985",
   "log":["REST"],
   "databases":{
      "sync_gateway":{
         "server":"myserver",
         "bucket":"sync_gateway",
         "sync":`function(doc) {channel(doc.channels);}`,
         "users": {
               "app":{
                    "admin_channels": ["all"],
                    "all_channels":["all"],
                    "password": "password",
                    "disabled": false
                },
               "GUEST":{
                  "disabled": false,
                  "admin_channels":["*"]
               }
            },
         "shadow":{
            "server":"myserver",
            "bucket":"default"

Traun Leyden

unread,
Sep 29, 2014, 12:06:45 PM9/29/14
to mobile-c...@googlegroups.com
Can you please try ToDoLite-Android instead?

I think SimpleAndroidSync may need some love.
--
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