t3d
t3d

Reputation: 178

couchbase ios replication error

Im new to couchbase and have been struggeling with an error for hours.

I create a user_profile_<-insert guid here-> document and save it successfully to local mobile couchbase db with the following test data:

{
    "_id" = "user_profile_F6854F81-FE36-4D6B-BD69-DAEBF0E9D766";
    "_rev" = "7-9012d2c1990b4c2ab4eb96cdf6c7dbdb";
    birthday = Birthday;
    gender = Male;
    name = Ted;
    uuid = 123456789;
}

I have set up replication to a remote couchbase server.

However, each time it tries to replicate I get the following error:

[error] [<0.102.0>] Error in replication 
`bb788350a95e4580ddc768d760f89575+continuous`     
(triggered by document `d15feb5b5838e5044cdd7b9d9b0009f8`): 
{invalid_json,{{error,{1,"lexical error: invalid char in json text.\n"}},
           <<"Not found.">>}}

I've been stuck at this problem for about 6 hours now.

Could someone please help here? :) Thank you !

Update: I downloaded the project at https://github.com/dthompson/couchbase-ios-example/ and when I run it I get the same error

Upvotes: 0

Views: 178

Answers (1)

Joe Kavu
Joe Kavu

Reputation: 11

I have had the same problem but I was trying to use the futon replication functionality. It turned out the problem was due to the way I was inputting the remote database address.

For example: The local database I wanted to replicate is called "cardata"; On my remote server (with the same user account like on my local) I created a database "cardata" whose address is http://your_remote_server_name:port/cardata.

When I used the above format for remote server it worked fine. The erroneous address I had used at first was in the format: http://your_remote_server_name:port/_utils/database.html?cardata.

Considering my experience as detailed above, you too could be inputting the address of your remote server wrongly. Check it to make sure you input it correctly.

NOTE: If your local installation is of a different version from that on you remote server, the difference is not the cause. I checked it, I had 1.2.0 on local and 1.0.1 on the remote server. So I upgraded the server to 1.2.0 and still I had the problem until I fixed the address as explained above. Good luck man.

Upvotes: 1

Related Questions