JabRef-Browser-Extension icon indicating copy to clipboard operation
JabRef-Browser-Extension copied to clipboard

Error while sending to JabRef

Open ckassung opened this issue 3 years ago • 3 comments

Hi everybody,

invoking Firebox extension quits with

  • Error while sending to JabRef.
  • Please see the browsers error console for details.

In my jabref_browser_extension.log, I get

  • ERROR:root:Failed to call JabRef: 127 b'/snap/jabref/1401/bin/JabRef: 3: /lib/runtime/bin/java: not found\n'

JabRef is running perfectly (Debian Bullseye). JabRef is installed in /snap/jabref/current/, I refer to jabrefHost.py in org.jabref.jabref.json with

{ "name": "org.jabref.jabref", "description": "JabRef", "path": "/snap/jabref/current/lib/jabrefHost.py", "type": "stdio", "allowed_extensions": [ "[email protected]", "@jabfox" ] }

I'm grateful for every hint, Christian

ckassung avatar Jan 15 '22 15:01 ckassung

Hi @ckassung Is there a specific website where it fails to read the data?

Being the snap you should run the connection command, as described in https://docs.jabref.org/collect/jabref-browser-extension

Also, could you try opening the console (Menu -> More Tools -> Browser Console) and clear it (with the trash icon on the top-left of the console window) before clicking the extension button. A message with the error should appear. Anothre thing to verify is in Menu -> Extensions and Themes -> Jabref -> Preferences, where it might say why it's not connecting.

LyzardKing avatar Jan 15 '22 17:01 LyzardKing

Hi, I did the snap connection command. The error seems to be independent from a specific website. I tried

  • https://onlinelibrary.wiley.com/doi/10.1002/andp.19053221004

but got the following error message in the browser console:

Error: Please use $(ref:runtime.getURL). cachedTypes.js:86 getImageSrc moz-extension://ef14b148-0156-4fdf-9607-7a36d152e678/external-scripts/cachedTypes.js:86 stderr output from native app org.jabref.jabref: Traceback (most recent call last): stderr output from native app org.jabref.jabref: File "/snap/jabref/current/lib/jabrefHost.py", line 107, in stderr output from native app org.jabref.jabref: output = add_jabref_entry(entry) stderr output from native app org.jabref.jabref: File "/snap/jabref/current/lib/jabrefHost.py", line 84, in add_jabref_entry stderr output from native app org.jabref.jabref: return response stderr output from native app org.jabref.jabref: UnboundLocalError: local variable 'response' referenced before assignment null ExtensionCommon.jsm:752 normalizeError resource://gre/modules/ExtensionCommon.jsm:752 wrapPromise resource://gre/modules/ExtensionCommon.jsm:903 TypeError: node.closest(...).constructor.name is undefined AutoScrollChild.jsm:64:12 isAutoscrollBlocker resource://gre/actors/AutoScrollChild.jsm:64 handleEvent resource://gre/actors/AutoScrollChild.jsm:380

The Jabref Menu Preferences says

Connection status An unexpected error occurred Websocket status Websocket client not starte

ckassung avatar Jan 15 '22 21:01 ckassung

There was an error in the python script, which lead to this "UnboundLocalError" when there was a problem while calling JabRef. This should be fixed with https://github.com/JabRef/jabref/pull/8432. However, this PR is not helping you really, since it doesn't fix the original error "/lib/runtime/bin/java: not found". I've sadly no idea why it cannot find java but it's working when you run JabRef normally. JabRef comes with java runtime environment, so it should be there. Strange...

tobiasdiez avatar Jan 16 '22 20:01 tobiasdiez