zotero / translation-server

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

Translate: TypeError: Cannot read property 'items' of undefined in handler 0 for select #29

Closed mvolz closed 6 years ago

mvolz commented 6 years ago

I get the following error trying to request the URL https://httpbin.org/redirect-to?url=https://en.wikipedia.org/wiki/Zotero

(3)(+0000000): TypeError: Cannot read property 'items' of undefined

TypeError: Cannot read property 'items' of undefined
    at Object.select (/home/marielle/Code/translation-server-v2/src/endpoints.js:324:18)
    at translate.setHandler (/home/marielle/Code/translation-server-v2/src/endpoints.js:134:19)
    at Zotero.Translate.Web._runHandler (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1113:32)
    at Object.selectItems (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:594:34)
    at Object.selectItems (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:91:17)
    at completeCOinS (eval at <anonymous> (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:65:4), <anonymous>:120:10)
    at doWeb (eval at <anonymous> (/home/marielle/Code/translation-server-v2/src/translation/sandboxManager.js:65:4), <anonymous>:231:3)
    at Zotero.Translate.Web.rest (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1389:49)
    at loadPromise.then (/home/marielle/Code/translation-server-v2/modules/zotero/chrome/content/zotero/xpcom/translation/translate.js:1379:39)
    at <anonymous>

Unfortunately this causes to Zotero to never return a response, so we have to wait for the connection to Zotero to time out. This error should be caught.

mvolz commented 6 years ago

Already resolved.