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 AE6699261 for ; Tue, 31 Jan 2012 22:17:21 +0000 (UTC) Received: (qmail 41634 invoked by uid 500); 31 Jan 2012 22:17:19 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 41563 invoked by uid 500); 31 Jan 2012 22:17:19 -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 41555 invoked by uid 99); 31 Jan 2012 22:17:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jan 2012 22:17:18 +0000 X-ASF-Spam-Status: No, hits=2.6 required=5.0 tests=FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cgsmcmlxxv@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jan 2012 22:17:11 +0000 Received: by qcsd15 with SMTP id d15so366331qcs.11 for ; Tue, 31 Jan 2012 14:16:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=GoXJTwtp3rhFEuv4sTOOUl/I4UqxDw7lj60EOJPHXHI=; b=raQL6WnDbLmyEv+3xwh6B2+56ZHFTzWhpDq4w/ggVqKvrAzK/h0gsj6MPn7/SEFCCI UxmTgSycRFPICiz0gmGIhltmDJ1cmGAVxeJHqXB9iNUImML3w+wzrMHC7+qu04M+5PZP P1GVUc84EJ0oji1hRykzIhEaRHPMxp/feNAGg= MIME-Version: 1.0 Received: by 10.229.77.133 with SMTP id g5mr9069894qck.98.1328048210778; Tue, 31 Jan 2012 14:16:50 -0800 (PST) Received: by 10.229.83.197 with HTTP; Tue, 31 Jan 2012 14:16:50 -0800 (PST) In-Reply-To: References: Date: Tue, 31 Jan 2012 23:16:50 +0100 Message-ID: Subject: Re: new ReferenceError(options is not defined) From: CGS To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0022153de29fd91b6c04b7da5177 X-Virus-Checked: Checked by ClamAV on apache.org --0022153de29fd91b6c04b7da5177 Content-Type: text/plain; charset=ISO-8859-1 Hi Mark, It looks very much like an JS engine error and it seems there is a problem in setting up the "options" parameter. From the error, either "options" parameter doesn't exist, or it is not well formatted (no idea about node.js). Another option is an incompatibility with JS engine version which doesn't accept your "options" in that format. I would suggest to ask about what's wrong with your "options" setup (and JS engine compatibility if nothing is wrong) in node.js mailing list/forum or wait here for someone who knows node.js enough to see where you went wrong there. Definitely the error is there, but I cannot tell you what as I have no idea about node.js (as I said it before). I hope this post will help you at least as a starting point in debugging. CGS On Tue, Jan 31, 2012 at 10:00 PM, Mark Hahn wrote: > I'm bumping this because it is killing me. I can't get past this problem. > It is happening several places in my code. > > What can cause an "OS Process Error"? > > On Mon, Jan 30, 2012 at 2:29 PM, Mark Hahn wrote: > > > I'm getting this error on a put request for an attachment. > > > > [error] [<0.7533.1>] OS Process Error <0.7546.1> :: > > {<<"unnamed_error">>, > > <<"(new ReferenceError(\"options is not defined\", \"\"))">>} > > > > This is my node code ... > > > > headers = {} > > headers.Authorization = mh.dbAuthHdr > > headers['content-type'] = contentType > > headers['content-length'] = contentLength > > dbPath = '/ri/' + compDoc._id + '/' + attachmentName + '?rev=' + > > compDoc._rev > > options = {host: 'localhost', port: mh.dbPort, method: 'PUT', headers, > > path: dbPath} > > > > respStr = '' > > resp = null > > readStream = fs.createReadStream filePath > > readStream.on 'error', (e) -> > > vh.err req, res, 'um: uploadAttachment read error ' + compDoc._id + ' ' + > > e.message, 500 > > readStream.pipe http.request options, (resProx) -> > > if +resProx.statusCode isnt 201 > > vh.err req, res, > > 'um: uploadAttachment db request err ' + compDoc._id + ' ' + > > resProx.statusCode, 500 > > return > > resProx.on 'data', (chunk) -> respStr += chunk.toString() > > resProx.on 'end', (chunk) -> > > if chunk then respStr += chunk.toString() > > resp = JSON.parse respStr > > docUpdate = procThumbnails: compDoc.procThumbnails > > if lastUpdate then docUpdate.needsNotification = yes > > db.updateDoc compDoc._id, docUpdate, (err, doc) -> > > if err > > log 'dba: uploadAttachment compDoc update err ' + compDoc._id > > cb false > > return > > compDoc = doc > > callback true > > > > This is the value of my options ... > > > > host: localhost > > path: > > > /ri/04b7c4eb50d1d01dbb1a0f097bb80/thumbnail-72x48c.jpg?rev=27-3d44ae708d6fe9c835577d71f5e70359 > > method: PUT > > headers: > > content-length: 3511 > > content-type: image/jpeg > > Authorization: Basic ... snipped ... > > port: 5984 > > > > Does anyone have an idea of what I'm doing wrong? > > > > > --0022153de29fd91b6c04b7da5177--