zotero / citeproc-js-server

Web service to generate citations and bibliographies using citeproc-js
Other
60 stars 39 forks source link

styleXML in latest commits #20

Closed xzile closed 9 years ago

xzile commented 9 years ago

Utilizing the latest commits, posting styleXML, I'm getting an error:

ERR! Error while handling request 0:  TypeError: Cannot read property 'length' of undefined
ERR! Error while handling request 0:      at CSL_JSON.addMissingNameNodes (/var/www/citeproc/lib/csl_json.js:354:38)
ERR! Error while handling request 0:      at new CSL.Engine (/var/www/citeproc/lib/citeproc.js:1396:18)
ERR! Error while handling request 0:      at new CiteprocEngine (/var/www/citeproc/lib/citeprocnode.js:112:21)
ERR! Error while handling request 0:      at /var/www/citeproc/lib/citeServer.js:243:34
ERR! Error while handling request 0:      at tryCatcher (/var/www/citeproc/node_modules/bluebird/js/main/util.js:24:31)
ERR! Error while handling request 0:      at Promise._settlePromiseFromHandler (/var/www/citeproc/node_modules/bluebird/js/main/promise.js:454:31)
ERR! Error while handling request 0:      at Promise._settlePromiseAt (/var/www/citeproc/node_modules/bluebird/js/main/promise.js:530:18)
ERR! Error while handling request 0:      at Promise._settlePromises (/var/www/citeproc/node_modules/bluebird/js/main/promise.js:646:14)
ERR! Error while handling request 0:      at Async._drainQueue (/var/www/citeproc/node_modules/bluebird/js/main/async.js:175:16)
ERR! Error while handling request 0:      at Async._drainQueues (/var/www/citeproc/node_modules/bluebird/js/main/async.js:185:10)
ERR! Error while handling request 0:      at Immediate.Async.drainQueues [as _onImmediate] (/var/www/citeproc/node_modules/bluebird/js/main/async.js:15:14)
ERR! Error while handling request 0:      at processImmediate [as _immediateCallback] (timers.js:368:17)
ERR! Error while handling request 0:   [TypeError: Cannot read property 'length' of undefined]

The same call works with the old node based code from 2014.

fcheslack commented 9 years ago

maybe fixed by https://github.com/zotero/citeproc-node/commit/0475751ea03f82f79de7303a35ee5b3d88114398

xzile commented 9 years ago

Looks like it fixed the issue. Citations were being returned as expected.

Log file did report an error:

ERR! Error while handling request 0:  TypeError: Cannot read property 'href' of undefined
ERR! Error while handling request 0:      at exports.QueueCache.returnEngine (/var/www/citeproc/lib/engineCaching.js:148:31)
ERR! Error while handling request 0:      at /var/www/citeproc/lib/citeServer.js:317:25
ERR! Error while handling request 0:      at tryCatcher (/var/www/citeproc/node_modules/bluebird/js/main/util.js:24:31)
ERR! Error while handling request 0:      at Promise._settlePromiseFromHandler (/var/www/citeproc/node_modules/bluebird/js/main/promise.js:454:31)
ERR! Error while handling request 0:      at Promise._settlePromiseAt (/var/www/citeproc/node_modules/bluebird/js/main/promise.js:530:18)
ERR! Error while handling request 0:      at Promise._settlePromises (/var/www/citeproc/node_modules/bluebird/js/main/promise.js:646:14)
ERR! Error while handling request 0:      at Async._drainQueue (/var/www/citeproc/node_modules/bluebird/js/main/async.js:175:16)
ERR! Error while handling request 0:      at Async._drainQueues (/var/www/citeproc/node_modules/bluebird/js/main/async.js:185:10)
ERR! Error while handling request 0:      at Immediate.Async.drainQueues [as _onImmediate] (/var/www/citeproc/node_modules/bluebird/js/main/async.js:15:14)
ERR! Error while handling request 0:      at processImmediate [as _immediateCallback] (timers.js:368:17)
ERR! Error while handling request 0:   [TypeError: Cannot read property 'href' of undefined]