retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.39k stars 290 forks source link

Cache can not be opened on start #3053

Closed Midway65 closed 1 week ago

Midway65 commented 1 week ago

Debug log ID

QUQLECRM-euc/6.7.250-7

What happened?

Every time upon opening Zotero 7 latest build the message pops up saying Better Bibtex: Cache cannot be opened. Restart Zotero upon which the same thing happens.

retorquere commented 1 week ago

How large is your library?

Also: https://www.zotero.org/support/kb/data_directory_in_cloud_storage_folder

Midway65 commented 1 week ago

3700 items, 6.7 GB. Storage is static, onedrive was turned off before the database was placed there.

retorquere commented 1 week ago

That's not really a large library.

The disk isn't full? You haven't started Zotero with admin rights at some point?

retorquere commented 1 week ago

The disk usage of your attachments doesn't factor into this. I take it the 6.7GB is mostly attachments. 3700 items with an 6.7gb zotero.sqlite file would be really weird.

Midway65 commented 1 week ago

Not aware of starting Z in admin mode, doubtful. Yes lots of attachments books give it the bulk.

Midway65 commented 1 week ago

By the way I've turned off all other plugins and tested and still had the same result.

Midway65 commented 1 week ago

If I remember correctly there was a statement in the error file that mentioned that this was not a database issue.

Midway65 commented 1 week ago

Also ran a check and repair utility on zotero.sqlite DB restarted and same error message. Is there another DB within zotero that might be having and effect?

retorquere commented 1 week ago

It's not those files, it's the indexeddb that can't be opened. Those files are in C:\Users\<username>\AppData\Roaming\Zotero\Zotero\Profiles\<profilename>\storage\permanent\chrome\idb. You can use https://sqlitebrowser.org/dl/ to inspect them (with zotero not running) -- if the table databases contains just BetterBibTeX, you can delete all files and folders in the idb and restart Zotero.

retorquere commented 1 week ago

(to the best of my knowledge BBT is the only extension using IDB, so theoretically you could just remove those files/folders without inspecting, but I can't be 100% sure I'm the only one)

Midway65 commented 1 week ago

Inspected those files and deleted. Restarted and exact same error occurred. Is that cache suppose to be built upon starting?Looked at the ibd folder after restart and it was empty. Restarted again after disabling the cache purge in settings and same result. If I take those files and folders from a b/u and place them in the ibd folder would they be recognized and then would the cache be rebuilt and updated. I'm way out of my depth here. I no nothing about coding.

Midway65 commented 1 week ago

As an experiment I opened Z with the newest version of BB plugin. Went to settings and turned off the cache switches and then closed Z. I added my backup files to the previously indicated directory and then reopened Z. The error message reappeared and when I went to the cache folder IBD both the folder and the db file had been wiped.

retorquere commented 1 week ago

Is that cache suppose to be built upon starting?

Initialized, but yes, the file/folder should re-appear after start of Zotero, as BBT will create an empty cache.

If I take those files and folders from a b/u and place them in the ibd folder would they be recognized and then would the cache be rebuilt and updated.

It might, but it might also introduce more difficulties. These are supposed to be created automatically by Zotero when I request a new cache, I don't even make them myself directly.

Went to settings and turned off the cache switches and then closed Z.

That won't affect cache creation.

Please open command prompt (search for it in the start menu), and paste

"C:\Program Files\Zotero\zotero.exe" -P

in it. You will see a window pop up called "Zotero - Choose User Profile", then

Zotero will start, with all settings at default and no plugins installed, but with all your items and attachment present. Install BBT and test.

If this works it means your original profile is corrupt.

You can go back to your original profile by existing zotero and starting it as usual. It will pop up the earlier profile chooser, you can select the default profile and it will be back to what it was, but if the new profile works, the only thing I can advise is to delete the original profile. You can at that point re-check "Use the selected profile", and the popup won't come up again.

Midway65 commented 1 week ago

Creating a new profile did work! I very much appreciate your kind help. Thank you!

retorquere commented 1 week ago

Then you can delete the old profile and uncheck the checkbox, it will start with the new profile by default.

Midway65 commented 1 week ago

Great, and once again thank you.