Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3DBD4066 for ; Wed, 8 Jun 2011 08:51:48 +0000 (UTC) Received: (qmail 48677 invoked by uid 500); 8 Jun 2011 08:51:47 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 48643 invoked by uid 500); 8 Jun 2011 08:51:47 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 48635 invoked by uid 99); 8 Jun 2011 08:51:47 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 08:51:47 +0000 Received: from localhost (HELO mail-bw0-f52.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 08:51:46 +0000 Received: by bwj24 with SMTP id 24so327598bwj.11 for ; Wed, 08 Jun 2011 01:51:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.81.199 with SMTP id y7mr543566bkk.109.1307523104840; Wed, 08 Jun 2011 01:51:44 -0700 (PDT) Received: by 10.204.65.17 with HTTP; Wed, 8 Jun 2011 01:51:44 -0700 (PDT) In-Reply-To: <4DEEE290.3030103@gmail.com> References: <4DEEE290.3030103@gmail.com> Date: Wed, 8 Jun 2011 09:51:44 +0100 Message-ID: Subject: Re: Breaking changes 1.1.0 From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The id you are using looks valid to me. Did you install CouchDB 1.1.0 over the top of an existing CouchDB installation? If so, you have mingled two conflicting versions of our modules together, which is going to cause function_clause errors all over the place. B. On 8 June 2011 03:46, Patrick Barnes wrote: > Having just updated to 1.1.0, I think I've been caught by the one breakin= g > change listed; > > * Document id's are now validated during PUT. This means that some PUT > requests will fail that previously succeeded. > > The user object I'm trying to store is: > |{ > ||"|_id|": |"org.couchdb.user:test_appdata_user"|| > |"|salt|": |"91ae270048fae61ebcff7730e5014150a529d082"|, > "|password_sha|": |"968091cd9ce21a0fca52232b85f9971c925801bd"|, > "|name|": |"test_appdata_user"|, > "|type|": |"user"|, > "|roles|": |[ > |"cgm_view"|, > |"cgm_store_appdata"| > ]|, > } > > |and it fails equally in Futon or my own code. > || > In Futon the dialog is: > |Error: unknown_error| > |function_clause| > || > ||The breaking changes info wasn't helpful as to what was happening, or > why... > What is happening here? > > -Patrick > > > Logs are: > > [Wed, 08 Jun 2011 02:27:48 GMT] [debug] [<0.761.0>] 'PUT' > /_users/org.couchdb.user%3Atest_appdata_user {1,1} from "127.0.0.1" > Headers: [{'Accept',"application/json,text/html,text/plain,*/*"}, > =A0 =A0 =A0 =A0 =A0{'Authorization',"Basic YWRtaW46bWluaW9u"}, > =A0 =A0 =A0 =A0 =A0{'Content-Length',"234"}, > =A0 =A0 =A0 =A0 =A0{'Content-Type',"application/json"}, > =A0 =A0 =A0 =A0 =A0{'Host',"localhost:5984"}] > [Wed, 08 Jun 2011 02:27:48 GMT] [debug] [<0.761.0>] OAuth Params: [] > [Wed, 08 Jun 2011 02:27:48 GMT] [error] [<0.761.0>] function_clause error= in > HTTP request > [Wed, 08 Jun 2011 02:27:48 GMT] [info] [<0.761.0>] Stacktrace: > [{mochiweb_request,get, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [scheme, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{mochi= web_request,#Port<0.2316>,'PUT', > > "/_users/org.couchdb.user%3Atest_appdata_user", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {1,1}= , > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {5, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{"= authorization", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {= 'Authorization', > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0"Basic YWRtaW46bWluaW9u"}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {= "accept", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0{'Accept', > > "application/json,text/html,text/plain,*/*"}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0nil,nil}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {= "host", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0{'Host',"localhost:5984"}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0{"content-type", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 {'Content-Type',"application/json"}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 {"content-length", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0{'Content-Length',"234"}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0nil,nil}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 nil}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0nil}}}}]}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{couch_htt= pd,absolute_uri,2}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{couch_htt= pd_db,db_doc_req,3}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{couch_htt= pd_db,do_db_req,2}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{couch_htt= pd,handle_request_int,5}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{mochiweb_= http,headers,5}, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{proc_lib,= init_p_do_apply,3}] > [Wed, 08 Jun 2011 02:27:48 GMT] [info] [<0.761.0>] 127.0.0.1 - - 'PUT' > /_users/org.couchdb.user%3Atest_appdata_user 500 > [Wed, 08 Jun 2011 02:27:48 GMT] [debug] [<0.761.0>] httpd 500 error > response: > =A0{"error":"unknown_error","reason":"function_clause"} >