Wrong attachments saved – Firefox 55 (report ID: 1055494825)

I have many collections that contain multiple versions of a file. Yesterday, I opened the latest version of a file to find it was not available. In the collection where a remote file had been captured at six different times reflecting six changes, only the earliest version exists. The same (older) version of the attachment was replicated across all six entries.

While I first observed this problem yesterday, I’ve since located cases of it dating back to at least August 10th. I was using Firefox 55.0.1 with Zotero 4.0.29.22 legacy on Ubuntu Studio 16.04 LTS ( 4.4.0-92-lowlatency #115-Ubuntu SMP PREEMPT Thu Aug 10 09:53:57 UTC 2017 x86_64 GNU/Linux ). I just upgraded Firefox to 55.0.2 and the problem still exists.

Here is a listing of my Zotero directory:

~/.zotero/zotero/7r9w9231.default/zotero$ ls -la
total 763452
drwxr-xr-x 7 doug doug 4096 Aug 18 02:04 .
drwx------ 4 doug doug 4096 Apr 6 21:55 ..
drwx------ 2 doug doug 4096 Apr 6 21:51 locate
-rwxr-xr-x 1 doug doug 1518332 Apr 11 00:23 pdfinfo-Linux-x86_64
-rw-rw-r-- 1 doug doug 4 Apr 11 00:23 pdfinfo-Linux-x86_64.version
-rwxr-xr-x 1 doug doug 135 Apr 11 00:23 pdfinfo.sh
-rwxr-xr-x 1 doug doug 1624954 Apr 11 00:23 pdftotext-Linux-x86_64
-rw-rw-r-- 1 doug doug 4 Apr 11 00:23 pdftotext-Linux-x86_64.version
drwx------ 2 doug doug 4096 Aug 18 02:04 pipes
drwxr-xr-x 9197 doug doug 241664 Aug 18 02:58 storage
drwxr-xr-x 2 doug doug 4096 Aug 10 09:18 styles
drwxr-xr-x 2 doug doug 24576 Aug 13 16:20 translators
-rw-r--r-- 1 doug doug 259604480 Aug 18 02:59 zotero.sqlite
-rw-r--r-- 1 doug doug 259010560 Aug 16 20:53 zotero.sqlite.1.bak
-rw-r--r-- 1 doug doug 259604480 Aug 17 21:01 zotero.sqlite.bak
-rw-r--r-- 1 doug doug 90800 Aug 18 02:59 zotero.sqlite-journal

I performed a “Check Database Integrity” that returned a “Passed” finding no errors. Subsequent attempts had the same problem. I also tried renaming the original item and adding a new copy of the latest version using the “Save to Zotero” button on the tool bar – same results. Each save properly creates a new storage subdirectory but places the earlier version of the attachment in it (see listing below). The only thing that seems to occasionally work is closing Zotero and Firefox between each save of each document (see file version with size 28950). Even that doesn’t work every time.

~/.zotero/zotero/7r9w9231.default/zotero$ ls -la storage/5V4WVX7B storage/HKFGDFZ2 storage/VI2FS7GV storage/9XCZPA34
storage/5V4WVX7B:
total 268
drwxr-xr-x 2 doug doug 4096 Aug 16 12:44 .
drwxr-xr-x 9206 doug doug 241664 Aug 18 14:31 ..
-rw-rw-r-- 1 doug doug 20676 Aug 16 12:44 storm_92.gif

storage/9XCZPA34:
total 276
drwxr-xr-x 2 doug doug 4096 Aug 17 23:43 .
drwxr-xr-x 9206 doug doug 241664 Aug 18 14:31 ..
-rw-rw-r-- 1 doug doug 28950 Aug 17 23:43 storm_92.gif

storage/HKFGDFZ2:
total 268
drwxr-xr-x 2 doug doug 4096 Aug 17 01:36 .
drwxr-xr-x 9206 doug doug 241664 Aug 18 14:31 ..
-rw-rw-r-- 1 doug doug 20676 Aug 17 01:36 storm_92.gif

storage/VI2FS7GV:
total 268
drwxr-xr-x 2 doug doug 4096 Aug 15 11:24 .
drwxr-xr-x 9206 doug doug 241664 Aug 18 14:31 ..
-rw-rw-r-- 1 doug doug 20676 Aug 15 11:24 storm_92.gif
  • So you're saying you're viewing a remote .gif, and then when you click the save button the file that gets saved to the 'storage' directory is a previously viewed version of the file? If so, I'd guess that there was a caching-related change in Firefox 55 that's causing this. (The other attachments wouldn't be relevant — it'd be something related to the browser cache, though Zotero's saves are supposed to skip the cache.)

    We can't really debug this in 4.0 at this point, so your first step would need to be updating to the new Zotero Connector for Firefox and using that with either Zotero 5.0 or Zotero Standalone 4.0 (if you're not ready to upgrade to 5.0). Both are available from the download page. There's a good chance this will go away after that.
  • Thank you Dan. Yes the problem is with “a previously viewed version of the file.” However, just to be clear, it may not be the most recent prior version viewed. For example, consider five consecutive versions (A, B, C, D, E). Versions A and B are saved to the ‘storage’ directory. I view versions C, then D, then E and save to Zotero while viewing E. When I review E (double click on the entry), either version B or E is displayed (and saved in a new directory in ‘storage’). Caching-related does sound like the most plausible explanation, I just can’t figure out what is being cached.

    I fully understand that it is not worth debugging in 4.0 and I hope to upgrade to 5.x in the next few weeks. Meanwhile, Firefox 54.0 still works fine with Zotero 4.0.29.22 and Zotero Standalone 4.0.29.10 with all duplicate items behaving as expected.

    Once I upgrade, I’ll re-test this situation and report back. Meanwhile, thanks to you, your team, and all those previous contributors who made and keep Zotero the finest research support tool.
Sign In or Register to comment.