Now the couch base replication is successfully taking place and i could see the updated documents
on iPad simulator. I have tried it through REST based ajax requests and also CouchCocoa and is working fine on iPad simulator for both.
But on the device the replication is not timing out now and is successful. I am getting the response properly but the database is not getting updated. Is there any specific settings required to make it work on the device. Any permission setting to update the database?
Please find the logger statements when I am doing it through CouchCocoa
> >
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: CouchChangeTracker[_replicator]: Starting with request:
GET /_replicator/_changes?feed=continuous&heartbeat=300000&since=3 HTTP/1.1
Host: 127.0.0.1
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: CouchLiveQuery: Starting...
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: CouchLiveQuery: ...Finished (status=200)
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: CouchLiveQuery: ...Rows changed! (now 2)
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: CouchPersistentReplication[(null)] initWithDocument: CouchDocument[08c9..028b] @0x690580
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: CouchPersistentReplication[08c9..028b]: state := error
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: Creating dynamic accessor method -[CouchPersistentReplication source]
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: Creating dynamic accessor method -[CouchPersistentReplication target]
Nov 13 19:26:05 unknown PortfolioCenter[2107] <Warning>: [INFO] afterReplicationSuccess
The following successful response I am getting when using REST but database is not getting updated.
{"ok":true,"id":"4335e8555d26fcba28c87c5be00009df","rev":"1-138a7a6c81d5b14d46f5306d7b80780f"}
As you suggested i set up Charles proxy but i could not figure out what is went wrong because I am using loop back url for replication. Proxy could not
capture the request to couchbase url on the device.
We could not use Touch DB because there are some complexities involved in using .couch files to create the databases.
On Saturday, November 10, 2012 12:08:23 AM UTC+5:30, Rahul sivasankaran wrote:
I am using apache mobile ios couchbase v 2.0.1 as my application database to hold the offline content.
When I am replicating database (PULL) from a remotely located couchDB the request is failing with HTTP error code 500 and reason Timeout on server.
Replication is happening properly on the iPad and iPhone simulator but on the device its fails.
I am invoking the replication through REST services from my cross platform Sencha Project.
Could anybody provide a solution to this issue?