incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Hailey <>
Subject Re: Failure on source commit: {error,undefined}
Date Fri, 23 Dec 2011 18:01:55 GMT

On 2011/12/21 (Dec), at 3:52 PM, Marty Schoch wrote:

> Hi Robert,

Hey Marty, thanks for you reply.

> If your issue only affects Couchbase Mobile, you may get better
> support discussing the issues here:

I've isolated it to couchdb, and am positive it will (or would have) effected future releases
too; the complicating factor is that couchbase uses pre-release versions of couchdb.

> 2.  If you access the root URL of the Couchbase Mobile you should see
> a response like:
> {
> "couchdb": "Welcome",
> "version": "1.2.0a-7b47329-git"
> }

I tried doing this, but I think couchbase is substituting it's own version number here; with
ios I get:


Which to me is non-sensical, because there are no tags resembling "2.0.0" in couchdb, and
not very helpful (because there is no hash like in your example)...

> 3.  Couchbase Mobile is completely open source.  The binaries we ship
> are built from the source on github.  Some of the confusion may be
> that Couchbase Mobile includes more than just CouchDB.

I think that is much of the confusion, along with unfamiliarity with the build system in use.

> 4.  At the moment I'm not aware of any other implementations.

I've found some references to others doing what I am:

And.... after several hours of reading erlang how-tos & trying to "decode" two functions,
I found my error.


src/couch_replicator/src/couch_replicator_api_wrap.erl (about line 126)

ensure_full_commit(#httpdb{} = Db) ->
        [{method, post}, {path, "_ensure_full_commit"},
            {headers, [{"Content-Type", "application/json"}]}],
        fun(201, _, {Props}) ->
            {ok, get_value(<<"instance_start_time">>, Props)};
        (_, _, {Props}) ->
            {error, get_value(<<"error">>, Props)}

I found that the couchdb source expects a 201 http status, whereas the docs I was following
indicate a 200 status:

So (if I understand the symptom of the "terrible error message") the 'undefined' was coming
from a helper-function trying to extract a non-existant error message (because it was successful,
but did not match the 201 code).

I'm not sure what (if any) change needs to occur, but "undefined" is a poor error message
IMO. :)

Robert Hailey

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message