couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Quint <>
Subject Re: Upgrading an existing Couch's authentication
Date Tue, 09 Feb 2010 17:28:58 GMT
Hey All

@J Chris: Thanks - I figured it out. I had to delete the old "users"
DB and also merge my default and local.ini with the new ones generated
by trunk. I also was having some issues yesterday with every attempted
update throwing a UTF-8 Invalid JSON error, but upgrading to svn trunk
(as of yesterday) seemed to fix it. I would love to chat more about
the auth stuff at some point, I'm curious how cookies are being
generated/stored. One thing I've noticed is that if I try logging in
to the same account on multiple browsers, it seems to boot me on
reload on one of the browsers. I don't know if this is a feature or a

@Benoit, @Brian: If you pull the latest from the github repo, the Bulk
Save should be fixed. You need to be logged in as an admin in order to
push the doc. I fixed the validate function so it should work for
couchapp pushes.

@Bob: Glad you're using it! I wanted to get it up to speed with
Couchapp/CouchDB so I can use it for upcoming talks. You're probably
not seeing your docs because theyre missing a 'user' attribute. Sort
of a pain, but if you go edit them in futon it should work.


Aaron Quint

On Tue, Feb 9, 2010 at 7:24 AM, Benoit Chesneau <> wrote:
> On Tue, Feb 9, 2010 at 1:20 PM, Brian Candler <> wrote:
>>> >> Once again, props to @jchris for getting the authentication up to
>>> >> snuff. I was able to get a simple authentication system built for my
>>> >> little couchapp Swinger:
>> I'm keen to try this, but I'm getting the following error:
>> $ couchapp push . http://localhost:5984/swinger
>> [INFO] Visit your CouchApp here:
>> http://localhost:5984/swinger/_design/swinger/index.html
>> Traceback (most recent call last):
>>  File "/usr/bin/couchapp", line 5, in <module>
>>    pkg_resources.run_script('Couchapp==0.5.3', 'couchapp')
>>  File "/usr/lib/python2.5/site-packages/distribute-0.6.8-py2.5.egg/",
line 452, in run_script
>>    self.require(requires)[0].run_script(script_name, ns)
>>  File "/usr/lib/python2.5/site-packages/distribute-0.6.8-py2.5.egg/",
line 1179, in run_script
>>    execfile(script_filename, namespace, namespace)
>>  File "/usr/lib/python2.5/site-packages/Couchapp-0.5.3-py2.5.egg/EGG-INFO/scripts/couchapp",
line 28, in <module>
>>  File "/usr/lib/python2.5/site-packages/Couchapp-0.5.3-py2.5.egg/couchapp/",
line 29, in run
>>    sys.exit(dispatch(sys.argv[1:]))
>>  File "/usr/lib/python2.5/site-packages/Couchapp-0.5.3-py2.5.egg/couchapp/",
line 40, in dispatch
>>    return _dispatch(ui, args)
>>  File "/usr/lib/python2.5/site-packages/Couchapp-0.5.3-py2.5.egg/couchapp/",
line 85, in _dispatch
>>    return fun(ui, path, *args, **opts)
>>  File "/usr/lib/python2.5/site-packages/Couchapp-0.5.3-py2.5.egg/couchapp/",
line 80, in push
>>    pushdocs(ui, docspath, dest, *args, **opts)
>>  File "/usr/lib/python2.5/site-packages/Couchapp-0.5.3-py2.5.egg/couchapp/",
line 171, in pushdocs
>>    db.save_docs(docs1)
>>  File "/usr/lib/python2.5/site-packages/Couchapp-0.5.3-py2.5.egg/couchapp/",
line 443, in save_docs
>>    raise BulkSaveError(errors)
>> couchapp.errors.BulkSaveError
>> I have couchapp installed from git, and I had also uninstalled the
>> couchapp-0.1.7 gem to be on the safe side.  couchapp passes its own
>> testsuite.
>> Having said that, the app does appear to work at first glance, although the
>> "welcome" presentation it invites me to view isn't there.
>> couchdb is current trunk:
>> $ curl
>> {"couchdb":"Welcome","version":"0.11.0bcc31819f-git"}
>> Regards,
>> Brian.
>  I tried to debug this error on irc with latest trunk. It seems that
> this is related to the validation function. First you need to use an
> authenticated usre to send data and second the welcome.json doc lacks
> of a "user" member. I didn't go further yesterday, but imo it should
> solve all the stuff.
> - benoit

View raw message