Pdf-files are stored doubled (chrome connector)


I am using the chrome connector for the Vivaldi browser.
By adding a pdf to the libary the pdf is stored twice in Zotero (there are two different folders in ~/Zotero/storage containing the same pdf).

When using Firefox everything is fine.

Zotero: version 5.0.68
Zotero Connector: version 5.0.66
Browser: Vivaldi 3.0.1874.38
OS: Fedora 32 (Linux)
  • edited May 17, 2020
    We can't provide support for Vivaldi, so you'd have to reproduce it in Chrome, but I suspect you're mistaken about this. It's far more likely that you 1) saved the item more than once or 2) dragged it to another library, making a copy. If you're using ZotFile, it's also possible that's somehow creating a duplicate copy.

    If you really think this is happening, we'd want to see a Debug ID for saving a new PDF that doesn't yet exist within 'storage'.
  • Actually, it's not clear to me if you're saying that two items are created (child items? parent items?) or just two files within 'storage'.
  • Thank you for answering.

    I reproduced it in Chromium. Steps:

    Open Zotero
    Open Chromium with Zotero connector installed
    Open a pdf file on a website (it´s opening in browser)
    Click on the icon for Zotero connector
    Now in Zotero there are two pdf items. Please see my screenshot.

    Strange, but sometimes it works correctly. But mostly not.

    The two items are created within storage and also shown in Zotero.
    (for example ~/Zotero/storage/GJEYG4EU and ~/Zotero/storage/KVKFN2KR)

    In Zotero there a two items with pdf files (don´t know about the labels child or parent, I am new to Zotero)

    I hope it´s better to unterstand.
  • I'm pretty sure the only way you'd get this would be by double-clicking the toolbar button by mistake.
  • No, I only do a single click on the toolbar button.
  • Then can you provide Debug IDs from both Zotero and the Zotero Connector for a single click that causes this?
  • Yes of course. Here it is:


    Zotero Connector:
  • (3)(+0003787): saveAsWebpage message received in injected page https://[…].pdf

    (3)(+0000002): HTTP POST

    (3)(+0000002): saveAsWebpage message received in injected page https://[…].pdf

    (3)(+0000001): HTTP POST
    It's receiving two save events, one immediately after the other. Again, this would happen for a double-click. It could be something about your mouse/trackpad settings causing single-clicks to be interpreted as double-clicks. You can see if a single-click triggers a dblclick event on this page.

    We might be able to block accidental/erroneous double-clicks from triggering saving twice, but if this is happening at all for you it's some sort of problem with your system.
  • That´ s strange. I tried three different mouses. Bluetooth-, wireless and a cable mouse. All these mouses are producing sometimes double clicks on your linked website.
    While using my computer I never noticed that.
    I cannot believe all my mouses are broken… But I think that is maybe an issue of the linux system I am using.
    I will test it on my laptop later.
  • Now I tried it with my laptop (same versions of Zotero and Zotero Connector).
    There also happens the same thing. Doesn´t matter which mouse I am using. Also my touchpad with hardware buttons shows the same behavior.
    In one case the document was downloaded four times at once.

    So I logged in to my company computer and opened https://unixpapa.com/js/testmouse.html to see what that mouse is doing there. It´ s also the same behavior. Sometimes the output field shows dbclick events. But that computer works fine, also as my private computer or laptop.

    After that I tried again the Firefox with Zotero Connector (same computer, same mouse, same test files). No problem at all. Firefox only downloads one copy.
  • To be clear, on that test site, if you click a second time within a short period of time without moving the mouse much, it will be considered it a double-click — that just depends on your system settings. The point is just to see whether an unequivocal single-click, after moving the mouse around, is ever interpreted as a double-click. If it is, that's a problem on your system.
  • No, a single click is shown as a single click. Never had a dbclick event when triggering a single click.
    Again, firefox with same mouse, same computer works fine. When pressing other buttons with a single click I never had double click events.
  • Let me add a little note: It only happens at pdf files.
    When adding webpages to Zotero via the Chrome Zotero Connector everything works fine.
    Only pdf files are mostly stored twice
  • Oh, wait, does this only happen for PDFs that have opened in a new tab?

    If you reload the PDF a few times, and then click again, does it not happen?
  • In the latest connector update, we fixed a bug in Chrome where PDFs that opened in new tabs failed to save due to the connector code being loaded more than once, which caused an error. Reloading a few times would fix it. It's possible that, with that error fixed, it's now initializing multiple times in some cases, such that clicking the save button causes the same save code to run more than once.

    I can't reproduce that, though.
  • I just made a short screenrecord to show it. Do you know how to show you that file? I cannot add attachments here.
  • You can upload somewhere (e.g., Dropbox) and provide a link here. But can you answer my question?
  • No, no new tab. The pdf file is opened in the same tab.
  • Are you sure about that? Because your debug output shows it happening in a new tab, and I've actually just managed to reproduce this, but only with a PDF opening in a new tab.

    To be clear, this is something the site does — it wouldn't be you choosing to open the PDF in a new tab.

    In any case, we'll investigate.
  • edited May 18, 2020
    Oh, it´s really a new tab. Sorry that i didn´t notice that. My mistake.

    Here you can see this problem on my computer: https://drive.google.com/file/d/1bfk-16c3RIGDO_bLW1UlkT0dW35lRwnH/view?usp=sharing

    Reloading the pdf file one time seems to solve it. After reloading it is only saved once.
  • edited May 20, 2020
    I am am experiencing this as well, on both my Mac and on my PC, running MS Edge Chromium on both machines. It didn't duplicate when I reloaded the tab.
  • This should be fixed in version 5.0.67 of the Zotero Connector, available now.
  • Yes, it´s fixed now with the new version. Thank you!
    Tested in Vivaldi browser.
Sign In or Register to comment.