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

Browser Cannot Conntect to Zotero/BBT Hangs during startup #2887

Closed
despdx opened this issue May 21, 2024 · 85 comments
Closed

Browser Cannot Conntect to Zotero/BBT Hangs during startup #2887

despdx opened this issue May 21, 2024 · 85 comments

Comments

@despdx
Copy link

despdx commented May 21, 2024

For people joining this issue, you can submit a log either by going to Help => Better BibTeX Debug log, or Help => Send log to fle.io. I really need logs because I cannot yet reproduce the problem, and I need clues to the cause.

If those don't work, and you're on a Mac or Linux, there's another way to capture a debug log

On MacOS, you can get a log by starting Zotero with

/Applications/Zotero.app/Contents/MacOS/zotero -jsconsole -purgecaches -ZoteroDebugText > $HOME/BBT.txt

or on Linux

zotero -P BBTTEST -jsconsole -purgecaches -ZoteroDebugText > $HOME/BBT.txt

Let Zotero start to the point where you have reproduced the problem, then you can shut Zotero down. In both cases, there will be a file BBT.txt in your home directory. You can attach it here, or email it to emiliano.heyns@iris-advies.com`.

Another option, if you're on Linux or Mac and willing to share a full copy of your Zotero profile, I could try to reproduce the problem with that. I don't have access to a Windows machine unfortunately. And I really need a way to reproduce this. To get this copy:

zip $HOME/Zotero.zip $HOME/Zotero

and mail that to emiliano.heyns@iris-advies.com

What I know so far

There is a Zotero method BBT must call. I call it at a time that Zotero has declared it safe to call it. Yet that Zotero method hangs when I do, hanging BBT in the process. Calling it also appears to take down the connector, when these two things have nothing to do with each other. I currently have a workaround in place that helps for some people, not for others, and I cannot reproduce this problem myself, and it's pretty goddamn hard to fix a ghost bug that I cannot see, and that given where it happens, just shouldn't be able to happen.

related Zotero forums threads

https://forums.zotero.org/discussion/comment/463327#Comment_463327
https://forums.zotero.org/discussion/comment/463326#Comment_463326
https://forums.zotero.org/discussion/comment/463324#Comment_463324

@retorquere
Copy link
Owner

retorquere commented May 21, 2024

For people joining this issue, you can submit a log either by going to Help => Better BibTeX Debug log, or Help => Send log to fle.io. I really need logs because I cannot yet reproduce the problem, and I need clues to the cause.

If those don't work, and you're on a Mac or Linux, there's another way to capture a debug log (see below).

On MacOS, you can get a log by starting Zotero with

/Applications/Zotero.app/Contents/MacOS/zotero -jsconsole -purgecaches -ZoteroDebugText > $HOME/BBT.txt

or on Linux

zotero -P BBTTEST -jsconsole -purgecaches -ZoteroDebugText > $HOME/BBT.txt

Let Zotero start to the point where you have reproduced the problem, then you can shut Zotero down. In both cases, there will be a file BBT.txt in your home directory. You can attach it here, or email it to emiliano.heyns@iris-advies.com`.

Another option, if you're on Linux or Mac and willing to share a full copy of your Zotero profile, I could try to reproduce the problem with that. I don't have access to a Windows machine unfortunately. And I really need a way to reproduce this. To get this copy:

zip $HOME/Zotero.zip $HOME/Zotero

and mail that to emiliano.heyns@iris-advies.com

What I know so far

There is a Zotero method BBT must call. I call it at a time that Zotero has declared it safe to call it. Yet that Zotero method hangs when I do, hanging BBT in the process. Calling it also appears to take down the connector, when these two things have nothing to do with each other. I currently have a workaround in place that helps for some people, not for others, and I cannot reproduce this problem myself, and it's pretty goddamn hard to fix a ghost bug that I cannot see, and that given where it happens, just shouldn't be able to happen.

related Zotero forums threads

https://forums.zotero.org/discussion/comment/463327#Comment_463327
https://forums.zotero.org/discussion/comment/463326#Comment_463326
https://forums.zotero.org/discussion/comment/463324#Comment_463324

Copy link

github-actions bot commented May 21, 2024

Debug log ID

4TUBZVQC-refs-euc/6.7.192-6

What happened?

A couple days ago, I couldn't import references via my zotero browser extension. It was working just a couple weeks before. I disabled, enabled, and upgraded BBT a couple times, and it worked. You asked me to try version ...190, which worked, but I tried ...192, too, which reproduced the problem. So, I'm here reporting it.

Naturally, it worked this time, but I only tried 192. Next, I tried to recreate my procedure more carefully: Install 190, disable it, restart, install 192 without removing 190, enable the plugin, restart --> bingo.

image

It's not too hard to test, so let me know if I can be of more help. But, I'm going to upgrade in the meantime.

@despdx
Copy link
Author

despdx commented May 21, 2024

Yeah, my reproducing procedure suggests more to do with the upgrade process than a bug in a particular addon version. I already upgraded to 200. So far so good.

@retorquere
Copy link
Owner

Can you upgrade to .201 and see if the connector problem is still fixed for you?

@lgsmith
Copy link

lgsmith commented May 22, 2024

I'm also having this issue, and my 'add-on' window in the zotero desktop app appears to say I'm on .201. My desktop app's version is 6.0.35. My zotero connector's version is 5.0.123. Disabling the better bibtex extension does restore the zotero connector's function. I'm using firefox for kubuntu 22.04 LTS, version 122.0.

What other information can I provide to help?

@retorquere
Copy link
Owner

Oh man I hope a log will say something here. Does debug log submission work? Is this reliably reproducible for you?

@lgsmith
Copy link

lgsmith commented May 22, 2024

I don't know about that. How do I do it? I can attach a log if you tell me where to find it on my filesystem...

@despdx
Copy link
Author

despdx commented May 22, 2024

Oh, very interesting. It's broken again after the update to 201. I went to Tools > Add-ons, and BBT was showing an update was available, so I clicked on "restart". Now, I'm getting the same error as before about connecting not working. I see a suck spinner icon next to the words "better bibtex: translators" in the right pane of Zotero desktop app.

@despdx
Copy link
Author

despdx commented May 22, 2024

I tried to disable BBT and restart. But I got this on the command line:

[18113, Main Thread] ###!!! ABORT: file resource://gre/modules/Sqlite.jsm, line 148
[18113, Main Thread] ###!!! ABORT: file resource://gre/modules/Sqlite.jsm, line 148
/home/<readaced>/local/Zotero_linux-x86_64/zotero: line 13: 18113 Segmentation fault      (core dumped) "$CALLDIR/zotero-bin" -app "$CALLDIR/application.ini" "$@"

@despdx
Copy link
Author

despdx commented May 22, 2024

Okay, I started Zotero again, enabled the plugin and clicked "restart". It started up and finished initializing BBT. It works, again.

@retorquere
Copy link
Owner

I don't know about that. How do I do it? I can attach a log if you tell me where to find it on my filesystem...

Help menu, Better bibtex debug log

@retorquere
Copy link
Owner

I see a suck spinner icon next to the words "better bibtex: translators" in the right pane of Zotero desktop app.

If the aforementioned debug log doesn't work, there will be an entry "send to file.io" in the Help menu. Please send that. Wonder what's broken now. I must call a method in Zotero before start, and it just hangs sometimes since recently.

@retorquere
Copy link
Owner

/home//local/Zotero_linux-x86_64/zotero: line 13: 18113 Segmentation fault (core dumped) "$CALLDIR/zotero-bin" -app "$CALLDIR/application.ini" "$@"

A core dump is always a Zotero problem. I'll add it to the report I filed with the Zotero crew.

@retorquere
Copy link
Owner

Okay, I started Zotero again, enabled the plugin and clicked "restart". It started up and finished initializing BBT. It works, again.

If you do see any of these problems again, please try one of the debug log methods. I am traveling tomorrow so I may not always respond immediately.

@lgsmith
Copy link

lgsmith commented May 23, 2024

When I restarted to activate logging I stopped seeing this issue. I'm not sure what 'moved' underneath me, but I seem to have something that works now on my laptop.

On my workstation for work, the issue is still present even with the .201 upgrade. In fact it's behaving how my laptop was behaving yesterday. In any case, I managed to send this debug report from my workstation (but not sure that it has anything useful in it): D790041850

@retorquere
Copy link
Owner

Man I had people for which the start issue and the connector issue were linked and I had hoped I had killed two birds with one stone... does the better bibtex debug log or the file.io log from the help menu work? I can forward D<number> log id's to Zotero but I can't access the logs behind them. The logs I can access will have euc, apse or fio in the ID.

@despdx
Copy link
Author

despdx commented May 27, 2024

... does the better bibtex debug log or the file.io log from the help menu work? ...

I don't think so. I clicked on it, and nothing happened. But, I don't know if that is correct behavior or not.

@despdx
Copy link
Author

despdx commented May 27, 2024

Oh, interesting. It's broken again. Maybe that's why the "Send debug log" didn't work.

@despdx
Copy link
Author

despdx commented May 27, 2024

Hmm, looks like there was another update. It was automatic; I didn't do anything to initiate the update. I'm at .202 now.

It's petty clear that the bug I'm reporting is that BBT hangs or crashes on start up, and Zotero doesn't notice. It shows up as enabled in the Add-ons window, but, in the right pane, I again see the stuck spinner icon and the words "better bibtex: translators".

Perhaps I should change the name of this issue to something like "BBT Hangs after Update, No Logged Errors, Breaks Connector, Zotero Works Fine Otherwise".

@mjthoraval
Copy link

Yes, Ctrl+Page Down is the shortcut for switching to the next tab.
It is cyclic, so the tab after the last one is the first one, i.e. the library tab.
So it just continuously cycles through the tabs if I keep pressing the shortcut.

I have tested the "5 minutes" procedure with all plugins disabled, included BBT, and doing a Restart with Logging Enabled.
Here is a debug output obtained: The Debug ID is D2093420213.

It still takes around 3 minutes after stopping to press Ctrl+Page Down to load the header of the Item Pane, with one item selected in the Items Tree.
That means 8 minutes after actually starting Zotero. But this time can be increased to any value you want, as continuously switching tabs will prevent Zotero from loading as long as you keep pressing it.
That seems to be similar to the loading time observed with BBT enabled. But I don't know if there are still operations still running in the background after that.

I can provide more testing to the devs if they think it is useful.

To see the influence of the automatic sync during loading, I just performed the "Normal" procedure: I just restart without doing anything else.

  • Automatic sync disabled: 7HZEZQYK-euc/6.7.203.2887.6392-7
  • Automatic sync enabled: FLI3WPRD-euc/6.7.203.2887.6392-7

@retorquere
Copy link
Owner

Here is a debug output obtained: The Debug ID is D2093420213.

I have no access to those, but if you have the debug log plugin (which does nothing except add a menu entry) you can submit a log to file.io, which I can access.

It still takes around 3 minutes after stopping to press Ctrl+Page Down to load the header of the Item Pane, with one item selected in the Items Tree.

That's strictly a Zotero problem then.

But I don't know if there are still operations still running in the background after that.

There are, but they take seconds at most.

Automatic sync disabled: 7HZEZQYK

BBT startup took 00:00:07.163 after waiting 00:00:17.911 for Zotero

Automatic sync enabled: FLI3WPRD

BBT startup took 00:00:10.721 after waiting 00:00:19.585 for Zotero

so the sync is not the issue then (assuming something was actually syncing). The tab-switching wedges something in Zotero, and since BBT waits for that to clear, it will start up very late. I've not heard back from the devs, so if you could post this disabled-plugins scenario on their forums, that would be really appreciated.

@mjthoraval
Copy link

Here it is with more details:
https://forums.zotero.org/discussion/114993/zotero-7-beta-switching-tabs-delays-the-loading-of-zotero

The crazy RAM ramp up for more than 10 minutes after releasing the shortcut is what I meant by "operations still running in the background after that".

@mjthoraval
Copy link

mjthoraval commented Jun 6, 2024

I have tried to produce one for you, but it did not work:
image

The data submitted to Zotero (to keep a record of it):
The Debug ID is D1698125593.

I still get the same error for a normal restart. So the plugin is not working for me.

Debug Log for Zotero version 2.0.17
Zotero 7.0.0-beta.84+71f83c0a3 (64-bit)
Windows 10

@retorquere
Copy link
Owner

Blegh another thing that dropped out of 7 then. That problem is easy to fix though. I'll get a new version out when I'm home.

@retorquere
Copy link
Owner

Nope, that still works on beta 84. I don't know why FormData is undefined for you. A new build will drop soon that will confirm whether it actually is. Please try a new log from that (either BBT or file.io)

Copy link

github-actions bot commented Jun 6, 2024

🤖 this is your friendly neighborhood build bot announcing test build 6.7.203.2887.6397 ("FormData not defined?")

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.203.2887.6397, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@mjthoraval
Copy link

  • With only the BBT plugin enabled: 6RBYDU8G-euc/6.7.203.2887.6397-7
  • With only the BBT plugin enabled during restart from file.io: RSJ3S4NV-fio-BUvy8aIDIcmv
  • With only the Debug Log plugin enabled: FormData error
    image

I had this already before: #2886 (comment)

@mjthoraval
Copy link

But I do not understand why a new BBT version would help understanding the problem with the Debug Log plugin?

@retorquere
Copy link
Owner

They use a common module to put up the file.io menu entry, so it's surprising to me that it works for BBT but not for debug log. It also just works for me, for both BBT and debug log.

@mjthoraval
Copy link

I'm also getting a Windows machine later today.

Is it also working for you on Windows?

@retorquere
Copy link
Owner

I don't know, I haven't installed the system yet.

@despdx
Copy link
Author

despdx commented Jun 8, 2024

Sorry I haven't tried your debug pkgs. Zotero/BBT has been working well, in the sense that BBT isn't hanging for me after auto update. That's the issue I noticed, originally.

If I can find some time next week, though, I'll try your debug pkg.

I also want to say that Zotero doesn't take very long to start up for me. I'm surprised by some of the numbers you are reporting here. I would say maybe 30 seconds at most.

@retorquere
Copy link
Owner

No need to test these packages, the changes have been rolled into the new release. These extreme startup times need further diagnosis by the Zotero team.

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

No branches or pull requests

5 participants