clearing Zotero trash leads to loading error

Dear developer,

I came across a problem that had been bothering me for a long time

Starting from around Zotero 7 beta 32, after clearing the Zotero trash, and then clicking on any collection, the main panel will show "Loading items...". Usually, it takes at least 15 minutes to display the items rightly, and this bug can be reproduced when I clear the Zotero trash.

I'm not sure if this issue is caused by Zotero itself or any Zotero plugin. However, even if I disable all the zotero plugins, the issue persists. Here is a Debug ID: D962557224

Looking forward to the solution.

Many thanks.
  • edited December 17, 2023
    Using data directory Z:\[…]
    [JavaScript Error: "Transaction timeout, most likely caused by unresolved pending work." {file: "resource://gre/modules/Sqlite.jsm" line: 1036}]
    What is Z:? Do you have your Zotero data directory on something other than a local disk?
  • @dstillman Z:\[…] is a partition of an external portable hard drive.
  • Are you saying this happens after clearing even a single item from the trash, or just a large number?
  • even clear a single item from the trash, this error will happen.
  • How many items are there in your library?
  • over 20000 items. Is it because there are too many items?
  • That's not really that many items. If you go to Tools → Developer → Run JavaScript and run the following line, what's the result?

    return await Zotero.DB.valueQueryAsync("SELECT COUNT(*) FROM itemData")
  • Also this:

    return await Zotero.DB.valueQueryAsync("SELECT COUNT(*) FROM items")
  • please wait a moment, just now, this error is being triggered.
  • the result is:
    ===>71409<=== (number)
  • select "My library" and then go to Tools → Developer → Run JavaScript and run the following line

    return await Zotero.DB.valueQueryAsync("SELECT COUNT(*) FROM items")

    the result is:
    ===>71409<=== (number)
  • Right but I asked for two things.
  • edited December 17, 2023
    sorry, I made a mistake.

    For, return await Zotero.DB.valueQueryAsync("SELECT COUNT(*) FROM itemData")
    the result is: ===>333882<=== (number)


    For, return await Zotero.DB.valueQueryAsync("SELECT COUNT(*) FROM items")
    the result is: ===>71408<=== (number)
  • If you run this, what does it show?

    var t = new Date;
    await Zotero.DB.queryAsync("DELETE FROM itemDataValues WHERE valueID NOT IN (SELECT valueID FROM itemData)");
    return new Date - t;
  • For,

    var t = new Date;
    await Zotero.DB.queryAsync("DELETE FROM itemDataValues WHERE valueID NOT IN (SELECT valueID FROM itemData)");
    return new Date - t;

    the result is: ===>2059266<=== (number)
  • edited December 21, 2023
    Yeah, that's bizarrely slow.

    How big is your zotero.sqlite file?

    Can you try moving your Zotero data directory back to the default location on the internal disk, pointing Zotero there, and trying again with that?
  • My zotero.sqlite is about 2.70GB


    1. I remember it was that time I installed a new version of a zotero plugin, then when I started Zotero and deleted a lot of RSS feeds in zotero, Zotero got stuck during the deletion process. After that, I forced Zotero to start, and then this problem kept occurring.
    2. Later, I used a method to repair the Zotero library file (zotero.sqlite) (see [Manual Zotero Database Repair Instructions]( https://www.zotero.org/utils/dbfix/manual ) ), but the problem still existed.
    3. I then tried deleting all the RSS feeds, but still faced the same problem.
    4. I initially thought it might be caused by some plugin corrupting the data, but even after disabling all the plugins, the problem persisted.

    I'm not sure if these above information can be helpful to you, but I think I need to tell you.



    maybe I can have a try to moving my Zotero data directory back to the default location on the internal disk.
    but I don't think it will be better, because I had already use this outer disk before this problem happened first time.

    I will tell you latter.

    thanks.
  • amazing,

    after moving my Zotero data directory back to the default location on the internal disk, this problem disappeared.

    then, I try use on the outer disk, This problem is also gone, that seems so bizarre.

    and now, on the outer disk, when I run this

    var t = new Date;
    await Zotero.DB.queryAsync("DELETE FROM itemDataValues WHERE valueID NOT IN (SELECT valueID FROM itemData)");
    return new Date - t;

    the result is

    ===>232<=== (number)

    I don't know what happened, but everything seems to go well.

    thanks very very much.

    I'll be watching to see if it runs correctly in the future.
Sign In or Register to comment.