BUG: I can't open some extension for running zotero a long time

My Debug ID D70486679
Hello everyone,
there are two extensions in Zotero that cannot run successfully on my mac. Zotfile and mdnotes can't be opened when I run Zotero for a long time in the background.
The debug output as follow:

JavasCript error: The connection was refused when attempting to contact wss: //stream zotero. org/ "ifile: "chrome: //zotero/content/xpcom
/streamer.js Line: 155]
[JavaScript Error: Web Socket connection closed: 1006"]
JAvasCript error: The connection was refused when attempting to contact wSs: //stream zotero. org/."ifile:"chrome: //zotero/content/xpcom
/streamer. js line: 155]
JAvasCript error: Web Socket connection closed: 1006"]
Warning: NetUtil new Channel(uri) deprecated, please provide argument ' aWhatToload
No chrome package registered for chrome: //browser/content/ macBrowserOver lay xuL
No chrome package registered for chrome: //browser/content/ macBrowserOverlay xuL
JAvasCript error:TypeError: document. getELementById.. is null tfile: chrome: //zoteroquicklook/content/zoteroquicklook js line: 133]
[JavaScript Error: NS_ERROR_NOT_AVAILABLE: " ifile: chrome: //zotfile/content/zotfile js"line: 215]
Zotero. ZotFile</this. open PreferenceWindow@chrome: //zotfile/content/zotfile js: 215: 9
oncommand@chrome: //zotero/content/standalone/standalone xul: 1: 1
[JavaScript Error: NS_ERROR_NOT_AVAILABLE: " ifile: "chrome: //zotfile/content/zotfilejs"line: 2151]
Zotero. ZotFiLe</this. openPreferenceWindow@chrome: //zotfile/content/zotfile js: 215: 9
oncommand@chrome: //zotero/content/standalone/standalone xul: 1: 1
Zotero. ZotFile</this. openPreferenceWindow@chrome: //zotfile/content/zotfile js: 215: 9 e js" line: 2155]
[JavaScript Error: NS_ERROR_NOT_AVAILABLE:"ifile:chrome: //zotfile/content/zotfil
on command@ch
//zotero/content/standalone/ standalone xul: 1: 1
[JavaScript Error: NS_ERROR_NOT_AVAILABLE: ifile: "chrome: //zotfile/content/zotfile js"line: 2151
Zotero. ZotFile</this. openPreferenceWindow@chrome: //zotfile/content/zotfile js: 215: 9
oncommand@chrome: //zotero/ content/standalone/standalone xul: 1: 1
  • I don't think we've ever seen that. You should try disabling one third-party extension at a time and see if the same thing happens. Start by disabling your less-common extensions (i.e., not ZotFile or Zutilo).
  • thanks for your suggestion. but it is useless when I disable all third-party extensions except zotfile, the same problem also appears.
  • You should try to figure out if there's a particular action that's causing this to happen, other than just having it open in the background (which is somewhat unlikely to be the cause). You can leave the Help → Debug Output Logging → View Output window open and pay attention to when the first NS_ERROR_NOT_AVAILABLE error appears.
  • edited February 10, 2021
    here is my new debug id D281609720

    [output removed — D.S.]

    I disabled all third-party extensions except mdnotes extension and when i closed Zotero, the same problem appeared again.
  • We don't need debug output posted here.
  • See what I suggest above.

    You can also see if it happens in a new Zotero profile.
  • This is my gif which records what I have done in Zotero.
    https://drive.google.com/file/d/1DHkzxzwWaQvPCIrR6wO7z5OSLo-9ZoqH/view?usp=sharing
    when I do as above, the problem will appear.
  • That link isn't public.
  • edited February 10, 2021
  • The first time, I opened Zotero, both extensions ran successfully. But when I closed Zotero(not totally quit), neither of them can be opened.
  • edited February 10, 2021
    Oh, I see, it's happening when you close the Zotero window without actually quitting the app.

    This is a bug, but I'm not sure we can do anything about it at the moment. We'll investigate.
  • The fact that it's only happening for the extensions and not, say, the Zotero preferences is a bit suspicious. Possible they're doing something wrong.
  • yes, it's very strange and makes me crazy.
    Anyway, thank you very much. I am looking forward to a better Zotero. if you have the solutions, please let me know.
  • I also face this issue when developing KeepZotero plugin. https://github.com/yhmtsai/KeepZotero
    From my understanding, we only generate the `openPreferences` when call include.js first time. the var window is indeed current main window.
    However, when MacOS uses Cmd+W close the window and then reopen it.
    ZoteroPane is redraw, so the above window is no longer for current main window.
    Thus, it can not open the dialog anymore from old window. (KeepZotero v0.0.1)
    KeepZotero v0.0.2 always gets the navigator:browers as the current main window in the `openPreference` function. Then, it can still open the dialog when MacOS reopen the Zotero from taskbar again.
    If my guessing is wrong, please let me know.
    I will also create a pull request for Zotfile and check whether it also solve this issue.
    I think this issue https://github.com/jlegewie/zotfile/issues/581 from Zotfile is the same issue
  • @yhmtsai: That sounds plausible. Note that you can use `Zotero.getMainWindow()` to get the current main window.
  • edited March 24, 2022
    I think you are right. but how to solve this problem. Today, I retried, the question still exists.
  • I already push the pull request https://github.com/jlegewie/zotfile/pull/595 for zotfile. It is not in release until author to accept it or they do their fix on it. If you would like to check, you can use the branch, build the xpi, and then replace the zotfile plugin. Before that, maybe backup is good because I do not know what happened when deleting Zotfile.
Sign In or Register to comment.