JavaScript Error when trying to Export to BibTeX (Error Report #114939840)

When I tried to export a subcollection, saved search or my whole Zotero library the export always failed and I got the following error message: "JavaScript Application: An error ocurred while trying to export the selected file." This happens also when I try to export to the RIS or other formats but not when I generate bibliographies (RTF etc.) or reports.

I sent an error report (number 114939840) because I couldn't find a solution to my problem in the Zotero forum.

My "Zotero system":
- Zotero 1.0.5
- Firefox 3.0 RC3
- OS X 10.5.3
- size of Zotero database: approx. 10 MB
- database integrity check: passed
- number of items in the library: approx. 250
- dom.max_chrome_script_run_time;0

Thanks in advance for your help!
  • [JavaScript Error: "returnItem.isAttachment is not a function" {file: "chrome://zotero/content/xpcom/translate.js" line: 1947}]
    It's an attachment-related problem. Can you narrow it down to a single attachment (or a small group of items) that fails, and then provide a bit more info on the attachment in question (what kind of attachment it is, whether the file exists, whether it's a top-level item, etc.)?
  • Hi Dan,

    Thanks for the quick reply. I've narrowed it down to 4 items in my library:
    - 2 with attachment: website snapshots (portal.acm.org), files exist and are indexed)
    - 2 without attachments

    I'm not exactly sure though, what you mean by "top-level item". I hope this is still enough info to crush the "bug".
  • edited June 17, 2008
    Now the problem gets even stranger: I deleted the 4 items in my library that caused the above problems. Then I tried to export from a "Saved Search" and got exactly the same error message as before even tough the faulty items were deleted.

    The error report says the same as above: [JavaScript Error: "returnItem.isAttachment is not a function" {file: "chrome://zotero/content/xpcom/translate.js" line: 1947}]

    Now, when I go to Zotero's main window and select the items from the saved search manually with Ctrl+A the export works! An export directly from the subcollection which contains all items of the saved search and many more (or even the entire library) works flawlessly too...

    It seems that "faulty" or missing attachments are not the problem.

    [UPDATE 1]: I tried to export the saved search after restarting Firefox but it didn't help either. Other than restarting Firefox everything was the same as above.

    When I examined the error report I noticed a new line saying:
    [JavaScript Error: "gUpdates.wiz is null" {file: "chrome://mozapps/content/update/updates.js" line: 862}]. I sent the whole report to you (#854983231). Hopefully this will help.

    [UPDATE 2]: Sorry for the "update spam", but I managed to run Firefox in the debug mode and thought it might be helpful if I let you know the result.

    Terminal Output when trying to export the saved search:
    [...]
    zotero(4): Translation using BibTeX failed:
    message => returnItem.isAttachment is not a function
    fileName => chrome://zotero/content/xpcom/translate.js
    lineNumber => 1947
    stack => ()@chrome://zotero/content/xpcom/translate.js:1947
    ()@chrome://zotero/content/xpcom/translate.js:666
    doExport()@chrome://zotero/content/xpcom/translate.js:2372
    ()@chrome://zotero/content/xpcom/translate.js:1824
    ()@chrome://zotero/content/xpcom/translate.js:581
    (1)@chrome://zotero/content/fileInterface.js:85

    name => TypeError
    url => /Users/USERXY/Desktop/test_export.bib
    extensions.zotero.cacheTranslatorData => true
    extensions.zotero.downloadAssociatedFiles => false

    zotero(3): Translate: running handler 0 for done

    I had to shorten the terminal output because it was too long for posting. Let me know if you need the entire thing.
  • Can you try disabling all other Firefox extensions and see if that fixes the problem?
  • Never mind, I can reproduce this as well. We'll look into it.
  • This is fixed in the latest dev build. Thanks.
  • I've just installed the latest dev build (1.0.6.r2890) and it's working. Great, many thanks!

    Just, out of curiosity, what exactly was causing the export problem? If it's too complicated to explain, never mind ;-)
  • Just, out of curiosity, what exactly was causing the export problem?
    Just a bug in the code that gets the list of items in the currently selected saved search.
  • Hello, I saw the comments but I continue having problems with de message: "JavaScript Application: An error ocurred while trying to export the selected file." and I don't know where I can uploap the dev build (1.0.6.r2890).
    I try to install de 1.0.7 but it can't access de SQL file so I comeback to Sync Preview 1.5. There is somwthing I can do about that?
    Thaks.
  • taisapda: Restart Firefox, trigger the error, send in an error report using Report Errors in the Actions (gear icon) menu, and then start a new Sync Preview thread and include the Report ID you received.

    Closing this thread, which is resolved.
This discussion has been closed.