zotero / translation-server

A Node.js-based server to run Zotero translators
Other
121 stars 50 forks source link

Regression: Unhandled rejection from exporting as bibtex #75

Closed mvolz closed 5 years ago

mvolz commented 5 years ago
(node:28502) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
    at Object.Zotero.Utilities.itemToLegacyExportFormat (/home/marielle/code/zotero/src/utilities.js:242:28)
    at ItemGetter.nextItem (/home/marielle/code/zotero/src/translation/translate_item.js:54:28)
    at Object.nextItem (/home/marielle/code/zotero/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:878:37)
    at Object.nextItem (/home/marielle/code/zotero/src/translation/sandboxManager.js:94:17)
    at doExport (eval at <anonymous> (/home/marielle/code/zotero/src/translation/sandboxManager.js:68:4), <anonymous>:1247:23)
    at Zotero.Translate.Export.rest (/home/marielle/code/zotero/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1406:49)
    at loadPromise.then (/home/marielle/code/zotero/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1396:39)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
(node:28502) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

To reproduce, we translate http://www.example.com with the web/ endpoint and then try to export as bibtex

mvolz commented 5 years ago

Traced back to e02ee7a78b038cb8d8641f45198b5cf05da884a9