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

ItemPaneManager is undefined on NixOs's 24.05 zotero_7 #2999

Closed
JJJHolscher opened this issue Sep 26, 2024 · 7 comments
Closed

ItemPaneManager is undefined on NixOs's 24.05 zotero_7 #2999

JJJHolscher opened this issue Sep 26, 2024 · 7 comments

Comments

@JJJHolscher
Copy link

JJJHolscher commented Sep 26, 2024

Debug log ID

3G26G2FL-fio-uvyfBIf15We2

What happened?

Upon startup, Better Bibtex informs me

Better BibTex startup failed
TypeError: Zotero.ItemPaneManager is undefined

and proceeds not to show up under Tools, Library right click menu or the Settings.
Most important for me, Obsidian's Zotero integration plugin ceases to function.

some other details

  • This only happens on Zotero 7, not Zotero 6, I switched back.
  • I first had Zotero 6 installed, then switched to Zotero 7. Zotero 7 inherited the settings and plugins of Zotero 6.
  • I have no other add-ons enabled.
  • I installed a style which I called better-bibtex.csl at some point. (it's the generic bibtex style, but with the better-bibtex citekey)
  • My arch machine works fine with Zotero 7 + Better Bibtex.
  • I updated Better Bibtex after posting this log just now, but the same issue persists after updating.

Apparently you are the only one able who can see my debug logs. Please don't make those public though please do email them to [email redacted] so I can see them as well.

@retorquere
Copy link
Owner

You can view them in the debug log viewer in the help menu.

@JJJHolscher
Copy link
Author

JJJHolscher commented Sep 26, 2024

Alright, thanks in that case I can make no sense of them. I'm not that experienced with Zotero debugging.

This line seems to be the only hint.
(I added newlines for readabillity, but it is actually a single line).

(3)(+0000877): 
Better BibTeX bootstrap: 
{better-bibtex} bootstrap: 
TypeError: Zotero.ItemPaneManager is undefined
loadUI@jar:file:///home/user/.zotero/zotero/n43ldqvh.default/extensions/better-bibtex@iris-advies.com.xpi!/content/better-bibtex.js:145490:9
load@jar:file:///home/user/.zotero/zotero/n43ldqvh.default/extensions/better-bibtex@iris-advies.com.xpi!/content/better-bibtex.js:145481:18
startup@jar:file:///home/user/.zotero/zotero/n43ldqvh.default/extensions/better-bibtex@iris-advies.com.xpi!/content/better-bibtex.js:145431:22
run@jar:file:///home/user/.zotero/zotero/n43ldqvh.default/extensions/better-bibtex@iris-advies.com.xpi!/content/better-bibtex.js:13348:32

I suppose it'd go wrong at /content/better-bibtex.ts:829 since that calls Zotero.ItemPaneManager.registerSection but I have no idea about the mechanics there.

@retorquere
Copy link
Owner

That is also in 3G26G2FL-fio-uvyfBIf15We2. I'll take a look.

@JJJHolscher
Copy link
Author

Not promising anything, but if you've got any insights/suspicions/intuitions to share as to the origin of the bug then I might be able to look myself. Though I understand if you don't consider that worth your time.

what use I will probably be
As mentioned I'm completely inexperienced with the Zotero API.
Optimistically, I'd spend half a day on this, and my deliverable would be more details on the origin of the bug.
Plausibly I'd do a pull request, though one that I'd expect to be messy enough that it won't be accepted, only highlight what edits made the bug go away for me.
Pessimistically, I will only give it another half hour of browsing, without ever doing any trial and error.

in case you'd type a message for me to be able to start up
I might benefit from additonal links as to what you think is a good beginner resource to Zotero plugin dev.
From a few minutes of searching I found(, without already having read them):

@retorquere
Copy link
Owner

Thanks! Man there isn't really a good intro to Zotero plugin development, most people took other plugins as skeletons and for anything interesting I actually read the Zotero source code.

The first thing that needs to be done is that ZoteroPane.ts and ZoteroItemPane.ts need to be merged, and instead of being triggered from orchestrator in the 'done' phase it needs to be triggered by onMainWindow, for which I've just added stubs. There's also stuff in loadUI that needs to be untangled.

This is not the easiest place to start TBH, but I appreciate it. Even if you could merge ZoteroPane.ts and ZoteroItemPane.ts and keep it working that would be a real help.

What platform are you on? My build process is well tested on Linux and MacOS, but not tested at all on Windows, and starting debug builds might work under WSL, will not work in the regular Windows environment.

@JJJHolscher
Copy link
Author

Linux with NixOS.
Thanks for the guidelines, I'll look into it when I have some spare time.

@retorquere
Copy link
Owner

Things have changed substantially since October. If the issue still persists on the new Zotero/BBT, you can comment here, and the issue will re-open automatically.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants