Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple errors on shutdown / startup #2948

Open
MrSerth opened this issue Aug 15, 2024 · 90 comments
Open

Multiple errors on shutdown / startup #2948

MrSerth opened this issue Aug 15, 2024 · 90 comments

Comments

@MrSerth
Copy link

MrSerth commented Aug 15, 2024

Debug log ID

N/A, since BBT wasn't loaded any longer
After a restart: X9SLMXCX-fio-24vflMf76l5q

What happened?

This issue is probably a follow-up to #2892.

Zotero just crashed during the update from 7.0.0 to 7.0.1. After I started it again, it first worked fine. As soon as I closed Zotero, I saw two errors

Better BibTeX shutdown failed
InvalidStateError: IDBDatabase.transaction: Can't start a transaction on a closed database
Bildschirmfoto 2024-08-15 um 11 34 27

directly followed by:

Better BibTeX startup failed
Error: Better BibTeX is already started
Bildschirmfoto 2024-08-15 um 11 34 33

In the development console, another error is shown (that I reported earlier as #2892 already):

Zotero.getMainWindow() is null [better-bibtex.js:8695](jar:file://~/Library/Application%20Support/Zotero/Profiles/protcja8.default/extensions/[email protected]!/content/better-bibtex.js)
Development Console

Bildschirmfoto 2024-08-15 um 11 44 56

Further, I saw two other warnings when looking into the logs:

addons.xpi-utils	WARN	Add-on [email protected] is not compatible with application version.
Missing resource in locale de: better-bibtex.ftl
Development Console as text

DEPRECATION WARNING: Calling FileUtils.getDir(..., ..., true) causes main thread I/O and should be avoided especially during startup/shutdown
You may find more details about this deprecation at: https://bugzilla.mozilla.org/show_bug.cgi?id=921157
resource://gre/modules/FileUtils.sys.mjs 62 FileUtils_getDir
resource://gre/modules/UpdateService.sys.mjs 1057 getUpdateDirCreate
resource://gre/modules/UpdateService.sys.mjs 1160 getReadyUpdateDir
resource://gre/modules/UpdateService.sys.mjs 1332 cleanUpReadyUpdateDir
resource://gre/modules/UpdateService.sys.mjs 1442 cleanupReadyUpdate
resource://gre/modules/UpdateService.sys.mjs 3116 AUS__postUpdateProcessing
resource://gre/modules/UpdateService.sys.mjs 2715 AUS_observe
resource://gre/modules/UpdateServiceStub.sys.mjs 109 UpdateServiceStub
[Deprecated.sys.mjs:79:13](resource://gre/modules/Deprecated.sys.mjs)
    warning resource://gre/modules/Deprecated.sys.mjs:79
    FileUtils_getDir resource://gre/modules/FileUtils.sys.mjs:62
    getUpdateDirCreate resource://gre/modules/UpdateService.sys.mjs:1057
    getReadyUpdateDir resource://gre/modules/UpdateService.sys.mjs:1160
    cleanUpReadyUpdateDir resource://gre/modules/UpdateService.sys.mjs:1332
    cleanupReadyUpdate resource://gre/modules/UpdateService.sys.mjs:1442
    AUS__postUpdateProcessing resource://gre/modules/UpdateService.sys.mjs:3116
    AUS_observe resource://gre/modules/UpdateService.sys.mjs:2715
    UpdateServiceStub resource://gre/modules/UpdateServiceStub.sys.mjs:109
Error: Addon must include an id, version, and type 2 [XPIProvider.jsm:1723:13](resource://gre/modules/addons/XPIProvider.jsm)
unreachable code after return statement
[util.js:205:4](resource://zotero/bluebird/util.js)
Missing resource in locale de: better-bibtex.ftl
Plugin [email protected] is missing bootstrap method 'onMainWindowUnload'
Zotero.getMainWindow() is null [better-bibtex.js:8695](jar:file://~/Library/Application%20Support/Zotero/Profiles/protcja8.default/extensions/[email protected]!/content/better-bibtex.js)
1723714458819	addons.xpi-utils	WARN	Add-on [email protected] is not compatible with application version. 3
Missing resource in locale de: toolkit/global/commonDialog.ftl 2
InstallTrigger is deprecated and will be removed in the future. 4 [reader.js:20134:16](resource://zotero/reader/reader.js)
Missing resource in locale de: better-bibtex.ftl
DOMException: Could not get children of file(~/Library/Application Support/Zotero/Crash Reports/events) because it does not exist [CrashManager.sys.mjs:663:17](resource://gre/modules/CrashManager.sys.mjs)
    _getUnprocessedEventsFiles resource://gre/modules/CrashManager.sys.mjs:663
Missing resource in locale de: toolkit/about/aboutAddons.ftl
Missing resource in locale de: toolkit/about/abuseReports.ftl
Missing resource in locale de: browser/components/mozSupportLink.ftl 2
Missing resource in locale de: toolkit/global/extensions.ftl
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.

Zotero Debug output

1723714426727	addons.xpi	WARN	Checking /Applications/Zotero.app/Contents/Resources/distribution/extensions for addons

1723714426847	addons.xpi-utils	WARN	addMetadata: Add-on undefined is invalid: Error: Invalid addon ID: expected addon ID undefined, found undefined in manifest(resource://gre/modules/addons/XPIDatabase.jsm:3108:15) JS Stack trace: [email protected]:3108:15
[email protected]:3569:26
[email protected]:3121:60
[email protected]:2532:12
[email protected]:228:31
[email protected]:536:17
[email protected]:742:14
[email protected]:3666:26
[email protected]:73:29

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Zotero.getMainWindow() is null" {file: "jar:file://~/Library/Application%20Support/Zotero/Profiles/protcja8.default/extensions/[email protected]!/content/better-bibtex.js" line: 8695}]

1723714458819	addons.xpi-utils	WARN	Add-on [email protected] is not compatible with application version.

1723714458819	addons.xpi-utils	WARN	Add-on [email protected] is not compatible with application version.

1723714458819	addons.xpi-utils	WARN	Add-on [email protected] is not compatible with application version.

appName => Zotero, version => 7.0.1 (ARM64), os => macOS 14.6.1, locale => de, extensions => Better BibTex for Zotero (6.7.221, extension)

Please let me know if you need further details or assistance with the localization for German. Thanks for the great plugin.

Copy link

Hello @MrSerth,

@retorquere is ready to assist you with Better BibTeX. In order to do so efficiently, a debug log is generally required. The information it containst is key to him understanding, replicating, and resolving your issue.

Here’s how you can share your debug log:

  1. If your issue involves specific references, citekey generation, or exports, right-click on the relevant item(s) and select "Better BibTeX -> Submit Better BibTeX debug log" from the menu.
  2. For issues where items do not play a role, follow these steps:
  • Restart Zotero with debugging enabled (Help -> Debug Output Logging -> Restart with logging enabled).
  • Reproduce the problem.
  • Choose "Send Better BibTeX debug report..." from the help menu.

After these steps, you will receive debug ID displayed in red. Please share this ID with @retorquere in this issue thread. If your query is about an export, include both the actually exported result and your expected/desired outcome.

Sharing your debug log gives @retorquere a view of your Better BibTeX configuration and the elements contributing to the issue. This helps him address your concerns more efficiently.

Thank you.

PS: If the Debug Log menu is not available, or if it fails to send the debug log, you can use the option under “Help” > “Send debug log to file.io”.

@MrSerth
Copy link
Author

MrSerth commented Aug 15, 2024

I just created a debug log, but would assume that it doesn't contain any useful details (since I had to restart BBT): X9SLMXCX-fio-24vflMf76l5q

@retorquere
Copy link
Owner

retorquere commented Aug 15, 2024

I'm looking into it but my response times are slower than usual, the zotero 7 release is bringing in a spike of requests, and I'm currently away to a competition with limited time to get behind a computer. I'm doing my best to address the issues and will be back to normal response times on Tuesday. I don't know why zotero 7 release responds differently than the beta I was testing on.

Copy link

🤖 this is your friendly neighborhood build bot announcing test build 6.7.221.2948.6758 ("upgrades")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.221.2948.6758, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@MrSerth
Copy link
Author

MrSerth commented Aug 16, 2024

I just tried installing the test build dropped above. However, the installation failed. In the console, I see the following error:

[email protected]	WARN	Loading extension '[email protected]': Reading manifest: Warning processing version: version must be a version string consisting of at most 4 integers of at most 9 digits without leading zeros, and separated with dots
addons.xpi-utils	WARN	Add-on [email protected] is not compatible with application version. 4

@retorquere
Copy link
Owner

Yeah you can ignore that. I've reported it to the Zotero team -- for some reason 4-part version numbers trigger this warning, but the plugin otherwise runs as normal.

@retorquere
Copy link
Owner

Are you sure it fails? Is it not just the message?

@MrSerth
Copy link
Author

MrSerth commented Aug 16, 2024

No, unfortunately I cannot install it. I tried multiple times. Upon installation the following error is shown (in German, but simply says:

Failed to install the extension
The extension “Better BibTex for Zotero” could not be installed. It may be incompatible with this version of Zotero.
Bildschirmfoto 2024-08-16 um 20 50 50

Even after quitting Zotero, re-checking and trying again, the version has not changed:

Bildschirmfoto 2024-08-16 um 20 50 34

@retorquere
Copy link
Owner

Oh that's just fantastic. This behavior wasn't in the betas. I'll have to see what the zotero team says, I've notified them, but it looks like the 5 part version numbers that I've used for debug builds forever are now suddenly cause to reject installation.

I don't have access to my regular workstation, and internet access here is crap, so I'm a bit handicapped in what I can diagnose currently, sorry.

@MrSerth
Copy link
Author

MrSerth commented Aug 16, 2024

Thanks for investigating and checking back with the Zotero team. I am sorry to hear about all those differences between the previous beta builds and the release version of Zotero 7.

Please take your time abroad and don't worry about my issue; I'll be patient and will be happy to hear back whenever you have the necessary resources.

@retorquere
Copy link
Owner

The next build to drop has one less number in the version. Let me know whether that works.

Copy link

🤖 this is your friendly neighborhood build bot announcing test build 6.7.221.6761 ("skip issue number in version")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.221.6761, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@MrSerth
Copy link
Author

MrSerth commented Aug 16, 2024

I am really sorry to say but the new build has the very same error as the previous one (Add-on [email protected] is not compatible with application version.). Once again, I tried multiple times (just to be sure), but the version number shown in the plugins pane hasn't changed.

@MrSerth
Copy link
Author

MrSerth commented Aug 16, 2024

No, I can't install it either -- am I making something wrong?

Upon installation, I got the same (already known) error message. This time, however, the plugins pane also announces "Available Updates: 1". Clicking on this entry shows ... nothing.

Screenshots

Bildschirmfoto 2024-08-16 um 23 52 02 Bildschirmfoto 2024-08-16 um 23 52 03

Just for my understanding: Could it be that the strict_min_version specified in the manifest.json is not correct? In the most recent https://github.com/retorquere/zotero-better-bibtex/releases/download/builds/zotero-better-bibtex-5.7.221.xpi, I see the following:

  "applications": {
    "zotero": {
      "id": "[email protected]",
      "update_url": "https://github.com/retorquere/zotero-better-bibtex/releases/download/release/updates.json",
      "strict_min_version": "8.0",
      "strict_max_version": "7.0.*"
    }
  }

My Zotero version is 7.0.1, running on macOS 14.6.1. For completeness, I captured another debug log (while trying to install the custom build from this issue): 2FZGRI3K-euc/6.7.221-7.

@retorquere
Copy link
Owner

I am such a moron -- you are right, new build incoming.

Copy link

🤖 this is your friendly neighborhood build bot announcing test build 6.7.221.2948.6764 ("upgrades")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.221.2948.6764, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere added a commit that referenced this issue Sep 8, 2024
@retorquere
Copy link
Owner

New build incoming, same with the empty profile again please, but what error are you experiencing in VFJBJ9SZ-euc/6.7.227.6945-7? As far as I can tell the cache was opened normally, the only problem I can see is that the error report can't fetch the cache.

Copy link

github-actions bot commented Sep 8, 2024

🤖 this is your friendly neighborhood build bot announcing test build 6.7.227.6951 ("log on all disabled activity")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.227.6951, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@MrSerth
Copy link
Author

MrSerth commented Sep 8, 2024

Here's a new log: WYHCNWPD-euc/6.7.227.6951-7 without any item in the library.

New build incoming, same with the empty profile again please, but what error are you experiencing in VFJBJ9SZ-euc/6.7.227.6945-7? As far as I can tell the cache was opened normally, the only problem I can see is that the error report can't fetch the cache.

With the empty library, it is difficult to perform an export. Hence, I am relying on the debug output to identify errors as an indication:

Bildschirmfoto 2024-09-08 um 18 10 37

For testing (and after sending WYHCNWPD-euc/6.7.227.6951-7), I've added one of my last publications to the empty profile through the "magic wand" by copying 10.1145/3657604.3662037. Then, I performed a right click and chose to export the item, which failed with a hang:

Bildschirmfoto 2024-09-08 um 18 10 03

This issue, like a hang in exporting items, is one of the consequences when BBT has "crashed". Here is a second debug log of that state with additional errors: 9RCUKS37-euc/6.7.227.6951-7. Regardless of how long I'll wait, I won't get the export and can only force quit Zotero.

Copy link

🤖 this is your friendly neighborhood build bot announcing test build 6.7.229.6974 ("more logging")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.229.6974, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@MrSerth
Copy link
Author

MrSerth commented Sep 13, 2024

I got new logs, both with new error messages:

  • 2INLQ5MD-euc/6.7.229.6974-7: The first error occurred during startup:
    Bildschirmfoto 2024-09-13 um 02 46 48
  • 9YQEKAK9-euc/6.7.229.6974-7: After the first error occurred, I tried exporting the only item available: Error: An error has occurred while trying to export the selected file.
    Bildschirmfoto 2024-09-13 um 02 49 49

Despite the new message, the situation improved: Zotero didn't show a full overlay and I could still quit normally. However, the export didn't work since the file created was empty.

@retorquere
Copy link
Owner

Once the first error occurs, the rest is knock-on damage. I'm just trying to figure out why you can't open the indexeddb database. New build incoming.

Copy link

🤖 this is your friendly neighborhood build bot announcing test build 6.7.229.6977 ("rename cache")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.229.6977, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@MrSerth
Copy link
Author

MrSerth commented Sep 13, 2024

Here's the next log: 66C9VVQT-euc/6.7.229.6977-7. Error message seen was TypeError: this.db is null.

@retorquere
Copy link
Owner

Ignore 6979 -- new build incoming.

Repository owner deleted a comment from github-actions bot Sep 13, 2024
Copy link

🤖 this is your friendly neighborhood build bot announcing test build 6.7.229.6980 ("manual open")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.229.6980, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@MrSerth
Copy link
Author

MrSerth commented Sep 13, 2024

Here's the new log with build 6980: Q25CVGLZ-euc/6.7.229.6980-7.

Copy link

🤖 this is your friendly neighborhood build bot announcing test build 6.7.229.6982 ("add glitch probe")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.229.6982, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@MrSerth
Copy link
Author

MrSerth commented Sep 14, 2024

I got another TypeError: this.db is null: V9JXRDC3-euc/6.7.229.6982-7.

Since you've integrated the glitch test (and it seems damaged), I repeated the test with the Translator Editor:

Test Result

Bildschirmfoto 2024-09-15 um 00 10 27

Then, I've quit Zotero completely and tried a second time. This time, I didn't get any error message, but exporting didn't work either: YYDPDBY6-euc/6.7.229.6982-7. Regarding the manual glitch test, I got the exact same result.

Do you think this is still BBT-related or rather a (general) Zotero bug I am observing? Or is it related to some initialization / termination order (since I am mostly experiencing these issues on opening / closing Zotero) and the manual glitch test seem to be fine?

Once again: Thank you for all the time and effort you put into this issue -- I really appreciate it! 💐

@retorquere
Copy link
Owner

I have an idea where this may be coming from. It may just involve replacing a library I use.

Copy link

🤖 this is your friendly neighborhood build bot announcing test build 6.7.229.6987 ("IDBKeyRange missing in Z6?!")

This update may name other issues, but the build just dropped here is for you; it just means problems already fixed in other issues have been folded into the work we are doing here. Install in Zotero by downloading test build 6.7.229.6987, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants