Attachments no longer found after sync from other machine

I'm currently running Zotero (version1.5-sync3.5) with a WebDav folder on the same machine (running Arch Linux), but I hit a bug that I don't see as already reported.

Attachments to items are stored correctly in the WebDav folder. Initially Zotero correctly showed those attachments when double-clicking on the attachment in Zotero on the linux-box.

After syncing the collection from windows XP from a different machine I can however no longer open the attachments on the linux-box in Zotero. Now I instead I get a popup on the linux-box with:
-------
The attached file could not be found.
It may have been moved or deleted outside of Zotero.
-------

However the attachments are clearly present as
1) The webdav folder still contains all attachments and permissions are still RW for the http-user as expected.
2) These same attachments are also still present in my mozilla directory in which zotero stores them ../zotero/storage/KEY. And the permissions are all set to the correct user and with the correct 755 permission.

The relevant bit when running zotero and hitting the sync button with debug-output is probably the following (output repeated for all items).
-----------------------
zotero(3): HTTP GET http://hge_zotero:********@localhost/zotero/TX4P5IW7.prop
zotero(3): 1229069836
zotero(3): Saving with saveURI()
zotero(3): onStateChange
zotero(2): progressMax has changed from 0 to 524844 for request 'TX4P5IW7'
zotero(3): onStateChange
zotero(3): Finished download of /home/hge/.mozilla/firefox/510y55u4.default/zotero/tmp/TX4P5IW7.zip.tmp with status 200
zotero(3): ZIP file is OK
zotero(3): Extracting 10.1038_nphys576.pdf
zotero(2): Attachment path is empty
zotero(1): File not found for item 27 after extracting ZIP
zotero(3): Finishing download request 'TX4P5IW7'
-------------------
A couple of things are strange here.
1) The program should clearly not have to attempted to download any zip-files in the first place as the attachments are already present in the storage directory.
2) The debug-output shows that it sees the zip-file, but I don't see any files in the indicated tmp-directory.

Note that when clicking on the attachment I get the following debug-output
-----------------
zotero(3): getAttachmentLinkMode() deprecated -- use .attachmentLinkMode
zotero(2): Attachment path is empty
------------------
So it could be that the origin of the problem lies in the deprecated warning...

I hope the above is enough information to see where the problem lies as this is a great program and being able to sync attachments is definitely on my wish-list!!
  • Just wanted to bump this since I have also been trying to get attachment file sync to work and failing miserably, with essentially the same problems hgersen describes. I'm syncing to a WebDAV directory in a site I set up using our local Sakai instance. I can do a sync on one machine and verify that the files were uploaded, but when I try to sync from a second machine (using a brand new Firefox profile and fresh Zotero installation) I get grayed-out attachments and "the attached file could not be found."

    I really hope this gets fixed. I work in an academic library, and the ability to transparently sync both citations and fulltext would be life-changing for many of our patrons. But I can't promote it if it doesn't work.
  • I have the same problem. I can see and access the attachments, but my sync'ing colleague in Europe can only see that they are there - he can't access them.

    Has anyone tried this? Is this supposed to be the fix?

    http://www.zotero.org/support/sync_alpha_attachments?s=sync
  • I can't see that the links Catlynnl mentions is the solution. It seems to be particular to SugarSync (a fee-based service) and runs outside Zotero. Apparently, SugarSync provides the synchronization software. I've been doing this kind of syncing fairly successfully with Unison (http://www.cis.upenn.edu/~bcpierce/unison/) and a portable hard drive.

    The new built-in sync service on Zotero 1.5-sync3.5 does not use third-party software. Furthermore, Zotero provides a server. I have only used Zotero's server, and have had the same problem of attachments appearing on one computer but not another. Hgersen reports this problem using WebDav, but does anyone know if the built-in synchronization in Zotero uses WebDav or some other method?

    WebDav on Windows is notoriously buggy (see
    http://www.atarex.com/services/support/webdav-msft.shtml). This may be the reason for the problem, especially if the built-in synchronization to the Zotero server uses WebDav too. With a recent update to Windows, my PC stopped being able to access our WebCT site using WebDav.

    I use 1 iMac w/ Leopard, 1 PC w/ XP Pro, and 1 PC w/ XP Pro x64 and have not yet examined the problem systematically to see who is getting the attachments and who is not. Nonetheless, my impression is that the iMac conforms to tighter standards and usually networks better. Without another iMac, I can't test if two iMacs drop attachments the way my trinity of iMac-PC-PC x64 does. For the Zotero developers reading this, I suggest looking into (1) does Zotero sync always use WebDav and (2) if so, how to get around the Windows bugs.
  • edited December 20, 2008
    @Catlynnl: To me the "fix" you are suggesting seems unrelated, so not something i have tried.

    @Marsh: To be clear, the WebDav folder is located on a Linux-host. After syncing to that folder using a Windows machine I can no longer access the attachments from both Linux and Window. Nothing has changed to the files in the WebDav folder as far as I can see. So my guess is that this is an internal bug to the sync-protocal in Zotero and not related to buggy implementation of the WebDav protocol in windows.
  • edited January 4, 2009
    Today I can't access the file attachments. But they look fine on my WebDAV (mydisk.se - I can see the Zotero folder on my hard-drive and on mydisk.se, and I can find and pull up the attachment under the appropriate Zotero subfolder (this one was saved as XMZF59KZ.zip on mydisk.se - I can open it as a pdf there). I was going to try to reset, but the sync debugging function seems to be gone now. I do see an error report: 1776440152.

    Excerpt:

    [JavaScript Error: "File not found for item 9 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 12 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16396 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16404 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16402 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16412 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16394 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16418 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16426 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16445 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 16447 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    It goes on and on...
  • It looks like in some cases the path to the attachment is being erased. We're trying to reproduce this, but, in the meantime, your best bet would be to restore to the server from a client that still has access to those attachments. Restore functionality is now available in the Sync preference pane.
  • edited January 5, 2009
    Okay - that worked fine. Thanks for pointing out the restore functionality. If it matters, I was opening Firefox on a computer that had a bad version of my zotero library on it - I had turned off the auto sync and never put in a WebDAV, but I had never deleted the folder either. That was the first Firefox that got the Sync 3.6 update - could that library have corrupted my metadata, even though sync'ing was turned off? Then when I opened my work computer, which has my real library on it, I couldn't open any pdfs. I didn't get prompted for the 3.6 update the first time I opened my work computer, but when I couldn't open the pdfs, I closed then reopened, and Firefox prompted for the update. Still couldn't open pdfs.
  • Catlynnl: If you look in your Zotero data directory on the machine with the "bad" DB version, you should see a numbered backup file (e.g., zotero.sqlite.36.bak) with a timestamp around the time you upgraded to 3.6. Could you upload that to the DB Repair Tool and e-mail the Upload ID to support@zot....org? (You can ignore any download links it provides.) We'd like to see if the paths existed properly before the upgrade.
  • Hey Dan - sorry, I must have erased the bad zotero folder from my home computer.
  • Oh- I think I'm still getting a similar error. 759476482.

    [JavaScript Error: "Conflict! Last known mod time does not match remote time! (1219730041 != 1219704841)" {file: "chrome://zotero/content/xpcom/storage.js" line: 2307}]

    [JavaScript Error: "File not found for item 9 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    [JavaScript Error: "File not found for item 12 after extracting ZIP in Zotero.Sync.Storage._processDownload()" {file: "chrome://zotero/content/xpcom/storage.js" line: 1092}]

    etc.
    Should I run the DB repair tool?
  • Cat: No, there's no need to use the repair tool. The next 1.5 build will have storage sync restore options (in addition to the metadata sync restore options), but for now you'll want to either 1) disable file syncing or 2) move the 'storage' directory within your Zotero data directory out of the way, select Reset Storage History from the debugging menu, and resync to pull down all the files on the storage server.
  • @hgersen I have exactly the same problem. I can see the files I have stored formerly on the server. Even I can open them directly if I access through the web usin WebDAV protocol.

    However if I use my laptop at home (my second computer), Zotero doesn't open the files. I get the same message:
    -------
    The attached file could not be found.
    It may have been moved or deleted outside of Zotero.
    -------

    It only works fine when I am at my workplace.

    Does anyone know what is wrong here?
  • Hi,

    This might be a stupid suggestion, but is it possible that links will not show up (particularly manually input links, which I have a number of to various PDFs that didn't scrape) when syncing between two computers using different o/s. E.g. I haven't synced my Zotero collections yet between a Windows XP machine and an OpenSuse linux one yet, but I imagine that the differences in the first parts of the file paths on the two machines is going to cause havoc with my links.

    Is that the source of the problem here? Apologies if this is a naive suggestion that has already been considered.
  • Hi,
    @hgersen: I have the same problem.
    I save an item X (maybe, a file, a webpage snapshot,..) on machine A and sync it with database on zotero.org server. On machine B, I sync with the same account (of course). I can only read the item X on machine A. After sync-ing, on machine B, notes, tags,... of item X are available, but trying to read item X will throw the message: "the attached file could not be found,...). I can see item X in "my library" on zotero.org server.
    Zotero is super cool. Thank you very much.
  • @antiw
    what webDAV service are you using?
  • @Joris:
    I use Zotero Sync Server and don't use any Storage Server.
  • You need to use a storage server to synchronize attachments like web snapshots and PDFs.
Sign In or Register to comment.