Linux Standalone: pdf will not sync locally from online upload/website; "cannot locate" error

edited December 29, 2016
Hello and thank you for Zotero,

I get an error in Zotero Standalone (4.0.29.10; Ubuntu 16.04) when trying to open a pdf attachment: "The attached file could not be found. It may have been moved or deleted outside of Zotero". I click on locate, and the folder is empty. This happens when I create an item in my online zotero library then manually upload the attachment online (www.zotero.org), and then sync. The attachment doesn't appear locally, but it does exist in my online library and I can manually download the attachment from zotero.org. This same problem also happens when I use the Standalone bookmarklet to auto-import a new item+attachments. In both instances, the Parent Item (journal citation) is successfully created/imported, and the child pdf appears as an item in the zotero database, but NO file is downloaded. I get the "cound not be found" prompt.

This occurs for all files and website imports (arXiv, Wiley, ACM, etc). The only way I can successfully attach a pdf to my Standalone library is to manually attach it locally.

I have enabled error logging during syncing, when it should download the attachment. I found all the lines corresponding to the item "79JTUAV9", for example...
...
(4)(+0000000): Processing remote item null/79JTUAV9
(5)(+0000000): SELECT ROWID FROM items WHERE libraryID IS NULL AND key=?
(5)(+0000000): Binding parameter 1 of type string: "79JTUAV9"
...
(5)(+0000001): Binding parameter 1 of type string: "http://zotero.org/users/49172/items/79JTUAV9"
(5)(+0000000): SELECT itemID FROM itemSeeAlso WHERE linkedItemID=?
(5)(+0000000): Binding parameter 1 of type int: 3476
(2)(+0000000): Attachment file '/home/rob/Literature/storage/79JTUAV9/Sumproducts.pdf' not found
(3)(+0000003): DATE: could not apply algorithms
...

... but I cannot make sense of it. It just concludes that the file "Sumproducts.pdf" cannot be found. The folder 79JTUAV9 doesn't even exist. When I manually create it, and re-sync, nothing happens.

Because I am using linux and had my data on a NTFS partition, I thought it might be a permissions issue related to the NTFS, but I moved my whole data directory to my home folder (EXT4) and checked the folder permissions, with no difference in errors.

Please help! This behaviour has been happening [since 2014].
  • We'd need a Debug ID for the first sync after you upload an item.
    This occurs for all files and website imports (arXiv, Wiley, ACM, etc). The only way I can successfully attach a pdf to my Standalone library is to manually attach it locally.
    Just to clarify this, though — you're aware this isn't a standard way of using Zotero, right? You would ideally be using one of the browser extensions, which will save items and PDFs to Zotero Standalone directly. (The current website is really only intended for occasional manual edits, and the bookmarklet provides much more limited functionality.)
  • Hi Dan,
    Yes, it seems to be the bookmarklet. I can successfully import webpage PDFs when using zotero-extension in Firefox, and using the Chromium extension+zotero-standalone. This is sad for me because the bookmarklet fills two important niches for me.

    I use the bookmarklet in two ways: i) on my Tablet/phone to import citations while reading articles in a webbrowser, which is my primary way of reading articles; and ii) to import citations while using the desktop Firefox-derivative webbrowser called 'Conkeror'.

    How can I get a Debug ID for you?
  • Oh, sorry, meant to link that: Debug ID
  • edited December 29, 2016
    Hi Dan,
    Debug ID: D987328598
    Here is context: in my zotero.org online library, I uploaded a pdf "Sumproducts.pdf" to an already existing journal article item. Then, I started zotero-standalone, sync'd, which downloaded the Sumproducts.pdf' attachment to item 3GBH6CGI. Then, I tried to open Sumproducts.pdf in zotero-standalone, which gives me the "cannot locate" error.
    Obviously I have tried searching my data directory for the pdf, and it is not there, neither is folder 3GBH6CGI in existence.
    Thanks for your help
  • You're using WebDAV for file syncing. Zotero can't pull down items from the Zotero servers if it's not syncing files with them.
  • edited December 29, 2016
    I'm an idiot, of course.... that explains why I can't use my zotero.org library for transfering attachments.

    Would that also explain why the Bookmarklet+conkeror+zotero-standalone fails to attach pdfs? Should I make a new debug ID?

    Thanks for your help
  • edited December 29, 2016
    If it's creating an empty attachment item, I'd guess that the bookmarklet is saving to zotero.org, not directly to Standalone, and so you'll get the same problem. I'm not sure exactly under which situations the bookmarklet currently saves to an open Zotero vs. zotero.org.

    In any case, not much point debugging at the moment — the bookmarklet hasn't really seen any development in a long time. We may put out an update in the not-too-distant future, following some upcoming improvements to the connectors, and we can reevaluate at that time if there's still an issue.
  • Darn, defeated for now. This setup was working in the past, so it broke at some point, maybe in the last half-year.
  • I don't think it would've been that recent unless you switched to using WebDAV recently. The bookmarklet hasn't been able to save directly to Zotero Standalone anywhere except in older versions of IE for years due to HTTPS->HTTP restrictions in modern browsers (as explained in the other thread), and as long as it was saving to zotero.org you wouldn't have gotten these attachment files in Zotero if it was syncing via WebDAV.
  • Perhaps it has been since 2014.
    I see the Zotero 5 connectors on github have a Firefox connector. Maybe that will function with Conkeror+zotero-standalone? I will build and try that if it is meant for FF+standalone.
  • (almost certainly not -- exactly the same reason it wouldn't, i.e. not http-->https connections)
  • edited December 29, 2016
    Right, it won't — this is a browser restriction that we can't do anything about.
  • Darn, looks like it is time to pay for genuine zotero storage. I think Aurimasz managed to address a similar problem with the chrome connector in ...
    https://github.com/zotero/zotero/pull/409

    Anyway, I hope the bookmarklet gets some attention in the future.
    Thanks again for your attention.
  • No, that's not related. Again, this is a security restriction in the browsers — they won't allow the bookmarklet, which is served over HTTPS, to connect to the Zotero client's local HTTP server. Further development of the bookmarklet won't fix this.
  • Well, I shouldn't say never — there might be a workaround in the future — but it's not feasible under our current architecture.
Sign In or Register to comment.