retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.3k stars 284 forks source link

Dropbox smart sync: translation failed #1603

Closed moffat closed 4 years ago

moffat commented 4 years ago

Please verify all of the below before submitting:

  1. you have picked the right category for the issue in the previous screen.
  2. You are on the latest release of Zotero
  3. in the Zotero addons screen you can see that you have the latest release of BBT (https://github.com/retorquere/zotero-better-bibtex/releases/latest)
  4. you are posting a single bug or feature request.
  5. the issue has a subject that succinctly describes the problem or question.
  6. you are available for follow-up questions and testing.
  7. you have included an error-report ID here generated by reproducing the problem, selecting the problematic reference(s), right-clicking, and submitting an BBT error report from that popup menu, not from the Help menu.
  8. you have included the actual output you got from exporting the items you sent in the debug log, not simplified fictional output or a description of the output, and a sample (not a description) of how you want it to look instead, again based on the actual items you selected in the previous step.

Picking the right issue category is really important. Each category (Export, General error, Import, Key generation, Question) has different instructions for gathering the data necessary required to resolve the issue you are experiencing

The error report is important; it gives me your current BBT settings and a copy of the problematic reference as a test case so I can best replicate your problem. Without it, I'm effectively blind.

Report ID: LJUDSVK5-euc

Exporter used: Better BibTex

Expected behavior: Automatic export of BibTeX file while idle, or be able to select all references for export.

Actual behavior:

In the settings/better bibtex window, the export fails with "translation failed". I tried exporting by selecting all references from the main Zotero window (select all-> export items) which failed as well. Smaller groups of items were exported successfully, but I was able identify at least one (there's more than one) that made the process fail. This is an "old" reference that I'm sure has been exported before. I can't see anything strange in that reference content.

When I try to export that one problematic reference, it fails with "An error occurred while trying to export the selected file."

moffat commented 4 years ago

To add: I found a january version of the exported file which does include the reference that is not making the export fail. Happy to provide my library if that helps.

Best.

retorquere commented 4 years ago

When you say

I was able identify at least one (there's more than one) that made the process fail. This is an "old" reference that I'm sure has been exported before.

does that mean there's one item that when it's among the items selected for export, the export consistently fails? Does that entry have an attachment, and if so, can you open that attachment? Is this a linked attachment or a stored attachment? Can you export that item OK as RIS and RDF?

moffat commented 4 years ago

I tried a small subset of references to export. When one of those failed, I narrowed it down to one that was making the export fail. To be clear, I've found more than one that makes the export fail.

The vast majority of my entries have attachments so that doesn't really help me narrow things down. And yes, I can open the PDF attachments with no issues. These are linked attachments managed by Zotfile.

I think I found the problem, though: the problematic entries have two attachments: a linked PDF and a 'web snapshot' (I don't particularly care for these so I can remove them) and if I removed that second attachment, the export works fine.

Following your suggestion, I also tried exporting as RIS and RDF, and neither works. The funny thing is that this used to work fine.

I have a limited set of entries with web snapshots attached to them so I can clean them up. Given that the export is failing with other formats, this sounds like a zotero issue, not a BBT one, correct?

retorquere commented 4 years ago

It does, certainly if RIS and RDF fail too. Please hold on to at least one of those items with failing exports if you can -- it'll help the Zotero devs to find and fix the issue. The relevant bit of the log you sent is (I think):

(1)(+0000001): [Exception... "Component returned failure code: 0x80520008 (NS_ERROR_FILE_ALREADY_EXISTS) [nsIFile.create]"  nsresult: "0x80520008 (NS_ERROR_FILE_ALREADY_EXISTS)"  location: "JS frame :: chrome://zotero/content/xpcom/file.js :: Zotero.File</this.createDirectoryIfMissing :: line 990"  data: no]
    Zotero.File</this.createDirectoryIfMissing@chrome://zotero/content/xpcom/file.js:990:7
    getSubdirectory@chrome://zotero/content/xpcom/dataDirectory.js:1292:7
    getStorageDirectory@chrome://zotero/content/xpcom/zotero.js:918:35
    Zotero.Attachments</this.getStorageDirectoryByLibraryAndKey@chrome://zotero/content/xpcom/attachments.js:2028:15
    Zotero.Attachments</this.getStorageDirectory@chrome://zotero/content/xpcom/attachments.js:2005:12
    Zotero.Item.prototype.getFilePathAsync<@chrome://zotero/content/xpcom/data/item.js:2305:23
    tryCatcher@resource://zotero/loader.jsm -> resource://zotero/bluebird/util.js:16:16
    module.exports/PromiseSpawn.prototype._promiseFulfilled@resource://zotero/loader.jsm -> resource://zotero/bluebird/generators.js:97:18
    module.exports/Promise.coroutine/<@resource://zotero/loader.jsm -> resource://zotero/bluebird/generators.js:201:9
From previous event:
    captureStackTrace@resource://zotero/loader.jsm -> resource://zotero/bluebird/debuggability.js:829:23
    CapturedTrace@resource://zotero/loader.jsm -> resource://zotero/bluebird/debuggability.js:721:5
    longStackTracesCaptureStackTrace@resource://zotero/loader.jsm -> resource://zotero/bluebird/debuggability.js:400:19
    module.exports/Promise.prototype._then@resource://zotero/loader.jsm -> resource://zotero/bluebird/promise.js:232:9
    module.exports/Promise.prototype._passThrough@resource://zotero/loader.jsm -> resource://zotero/bluebird/finally.js:94:12
    module.exports/Promise.prototype.finally@resource://zotero/loader.jsm -> resource://zotero/bluebird/finally.js:103:12
    PromiseSpawn@resource://zotero/loader.jsm -> resource://zotero/bluebird/generators.js:36:25
    module.exports/Promise.coroutine/<@resource://zotero/loader.jsm -> resource://zotero/bluebird/generators.js:197:21
    Zotero.ItemTreeView.prototype.getImageSrc@chrome://zotero/content/xpcom/itemTreeView.js:1168:9

I can get them the whole log if it helps.

I'm afraid you'll have to open an issue on forums.zotero.org; I will help where I can, but this looks like a bug in Zotero itself. Let's keep this issue open until your problem is resolved.

retorquere commented 4 years ago

(just a single item that consistently triggers the error will suffice -- all errors in the log show the same, so it's going to all have the same cause)

moffat commented 4 years ago

Thanks! I've opened a report here:

Zotero 1745676271

moffat commented 4 years ago

Hi, you can close this now. I just realized/remembed that ~/Zotero/storage was symlinked at the linked directory had been removed by Dropbox's "smart sync". Restoring it solved the problem.

Thanks for your time!

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.