retorquere / zotero-better-bibtex

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

Z5: citekey column shows up after restart #722

Closed ppaspp closed 7 years ago

ppaspp commented 7 years ago

When installing BBT on Z5 the citekey column is added automatically. Despite disabling it, the column is shown again after restart.

System: BBT Build 4220, Z 5.0.18, Ubuntu 16.04

retorquere commented 7 years ago

:robot: bleep bloop; this is your friendly neighborhood build bot announcing new test build 4222.

retorquere commented 7 years ago

Can you try 4222?

ppaspp commented 7 years ago

4222 works fine

ppaspp commented 7 years ago

sorry for reopening. I noticed the citekey column shows up again after updating BBT, even though it was deactivated before. It's not a big deal, but certainly not what you expect.

retorquere commented 7 years ago

Can you submit a debug log? I can't replicate it here, on my system the preference sticks.

ppaspp commented 7 years ago

updating from 4246 to 4265 I could not reproduce the error, so it's probably solved. Unfortunately, I noticed that after removing BBT, all other column where activated, resulting in a messy table :flushed:

retorquere commented 7 years ago

Now I remember why I didn't persist the column status before :roll_eyes:; without BBT present, Zotero finds an unexpected value and handles that rather ungracefully. I'll see if I can scrub that during uninstall.

retorquere commented 7 years ago

:robot: bleep bloop; this is your friendly neighborhood build bot announcing test build 4297 ("remove BBT column data on uninstall").

retorquere commented 7 years ago

Can you try 4297?

OlafKleinBerlin commented 7 years ago

I have a similar problem: After removing (for testing), one of the current zotero-better-bibtex versions, my Zotero starts to show all columns.

retorquere commented 7 years ago

@OlafKleinBerlin OK, so can you too try 4297?

retorquere commented 7 years ago

Hold on, it's not working. Trying something else.

OlafKleinBerlin commented 7 years ago

This time I was too fast. I can confirm that the problem is still there with 4297.

retorquere commented 7 years ago

:robot: bleep bloop; this is your friendly neighborhood build bot announcing test build 4299 ("getting pretty fed up with monkey-patching").

retorquere commented 7 years ago

Alright, can you guys give 4299 a spin?

ppaspp commented 7 years ago

this is awesome, it's working.

Thank you for all the hard work, very much appreciated!

retorquere commented 7 years ago

Zotero sure doesn't make it particularly easy. BBT is probably one of the most invasive plugins, if not downright the most invasive plugins to zotero. It's not easy to get it working and keep zotero stable.

retorquere commented 7 years ago

Now in a v5.0.20 near you.

OlafKleinBerlin commented 7 years ago

Hello, I have now tested my problem again using 4299, and, sorry, I have found problems. If I deinstall BBT, the columns are fine. But, if I just disable BBT, all columns of Zotero beocme activated.

Moreover, there seems to be some new warnings. I will sent them in a moment.

OlafKleinBerlin commented 7 years ago

Starting my Zotero (5.0.18) without BBT addon, but after several test with BBT, or restarting Zotero after installing or removing the BBT addon, I got the warning:

Possibly unhandled rejection:

can't assign to properties of (new Boolean(false)): not an object

TypeError: can't assign to properties of (new Boolean(false)): not an object
    Zotero.QuickCopy</_preloadFormat</_ref<@chrome://zotero/content/xpcom/quickCopy.js:464:5
From previous event:
    ZoteroService@file:///home/klein/Zotero-all/Zotero_linux-x86_64/components/zotero-service.js:347:4
    createInstance@resource://gre/modules/XPCOMUtils.jsm:387:19
    @chrome://zotero/content/include.js:4:14

Enabling a disabled BBT or disabling BBT and restart creates the following errror (Zotero version 5.0.18):

[ WARN Error: XPI database modified after shutdown began (resource://gre/modules/addons/XPIProvider.jsm -> resource://gre/modules/addons/XPIProviderUtils.js:430:17) JS Stack trace: saveChanges@XPIProviderUtils.js:430:17 < updateActiveAddons@XPIProviderUtils.js:1408:9 < shutdown@XPIProvider.jsm:2971:7 < _startProvider/AMProviderShutdown/<@AddonManager.jsm:774:21 < Promise@Promise-backend.js:390:5 < AMProviderShutdown@AddonManager.jsm:772:16 < trigger@AsyncShutdown.jsm:719:23 < _wait@AsyncShutdown.jsm:866:7 < wait@AsyncShutdown.jsm:850:28 < AddonManagerInternal.shutdownManager<@AddonManager.jsm:1166:15

](url)

Removing the BBT add on creates the warning: 1505808028007 addons.xpi-utils WARN Error: XPI database modified after shutdown began (resource://gre/modules/addons/XPIProvider.jsm -> resource://gre/modules/addons/XPIProviderUtils.js:430:17) JS Stack trace: saveChanges@XPIProviderUtils.js:430:17 < updateActiveAddons@XPIProviderUtils.js:1408:9 < shutdown@XPIProvider.jsm:2971:7 < _startProvider/AMProviderShutdown/<@AddonManager.jsm:774:21 < Promise@Promise-backend.js:390:5 < AMProviderShutdown@AddonManager.jsm:772:16 < trigger@AsyncShutdown.jsm:719:23 < _wait@AsyncShutdown.jsm:866:7 < wait@AsyncShutdown.jsm:850:28 < AddonManagerInternal.shutdownManager<@AddonManager.jsm:1166:15 Is this a BBT or a Zotero Issue?

retorquere commented 7 years ago

:robot: bleep bloop; this is your friendly neighborhood build bot announcing test build 4301 ("fixes #722").

retorquere commented 7 years ago

Whether this should be seen as a BBT or a Zotero issue depends on your stance on how Zotero should react to unexpected data.

I've added more cleanup code to nuke the quick copy setting if it's one of BBTs translators, and to also run the cleanup on disable, but this will mean that the quickcopy setting is lost if you disable and then re-enable.

As far as I can tell, Zotero almost always shows the WARN Error: XPI database modified after shutdown began in its log. It seems harmless enough, I haven't seen any negative side effects so far.

Please try 4301.

OlafKleinBerlin commented 7 years ago

I have tried 4301 now, and it seems that now the problem with all columns becoming active when removing the app is back. Moreover, I am not sure, but it seems that somehow my Zotero became corrupted, maybe after removing a already disabled version of BBT.

retorquere commented 7 years ago

Corrupted in what way?

OlafKleinBerlin commented 7 years ago

I saw an error message that somehow claimed that the addon could not be removed, but I can not remember exactly anymore.

retorquere commented 7 years ago

"Corrupt" is a scary term to use. It would mean to me I have messed with critical files in the zotero data directory, and that data is irretrievably lost. If that's the case for sure I want to know about it, but for the sake of my cardio-vascular health, let's reserve the term "corrupted" for such occasions. "You corrupted my reference database" is heart-attack territory for me.

I'll look at the all-columns issue again.

OlafKleinBerlin commented 7 years ago

I am very sorry to have scared you. Since I have not already really used Zotero to deal with my references,but only plan to import by bibtex-files (created with jabref, vim and vi) to Zotero by using zotero-better-bibtex to keep my nice citation keys, my references dealt by Zotreo consisted only of my test results,i.e. there is no problem with this data.
And I do not belive that the problem was in the zotero data directory, but within the zotereo program dir, And I think that it was a stupid idea of me to remove the BBT version 4299 after disabling the addon before.

retorquere commented 7 years ago

Not stupid, that should be perfectly safe.

I think I have found the problem (a fairly stupid oversight on my part).

retorquere commented 7 years ago

:robot: bleep bloop; this is your friendly neighborhood build bot announcing test build 4302 ("should have seen that").

retorquere commented 7 years ago

Give 4302 a spin.

OlafKleinBerlin commented 7 years ago

Before dealing with 4302;

Starting from my zotero backup and updating to 5.0.19, installing 4299, disabling and removing it, Zotero produces the warning;

1505819994579 addons.xpi WARN Failed to call uninstall for better-bibtex@iris-advies.com: Error: Unknown add-on ID better-bibtex@iris-advies.com (resource://gre/modules/addons/XPIProvider.jsm:8143:11) JS Stack trace: getLocationForID@XPIProvider.jsm:8143:11 < processPendingFileChanges@XPIProvider.jsm:3394:31 < checkForChanges@XPIProvider.jsm:3714:19 < startup@XPIProvider.jsm:2826:25 < callProvider@AddonManager.jsm:272:12 < _startProvider@AddonManager.jsm:759:5 < startup@AddonManager.jsm:941:9 < startup@AddonManager.jsm:3145:5 < observe@addonManager.js:65:9 1505819994580 addons.xpi WARN Attempted to remove better-bibtex@iris-advies.com from app-profile but it was already gone

I think the last time there further problems, such that I decided that my Zotero was co.... due to overtesting somehow, but I am not sure, and I have removed the files (and this was really stupid ......)

OlafKleinBerlin commented 7 years ago

The result seems to be the same for 4302 as with 4299:

If I deinstall BBT, the columns are fine. But, if I just disable BBT, all columns of Zotero beocme activated.

retorquere commented 7 years ago

:robot: bleep bloop; this is your friendly neighborhood build bot announcing test build 4303 ("register for disable, not enable. come on Emiliano.").

retorquere commented 7 years ago

you know the drill.

OlafKleinBerlin commented 7 years ago

Seems that 4303 does the job: After removing or de-installing this version, the columns of Zotero are fine, i.e. only the one I chose before are active.

Thanks a lot for your efforts.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.