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

Does not work with snap version of firefox: can't find org.jabref.jabref

Open Quacken8 opened this issue 3 years ago • 10 comments

Just like in issue #381, however I installed using the Firefox extensions.

Error is "No such native application org.jabref.jabref"

and jabref extension says

"Connection status : Attempt to postMessage on disconnected port" and 
"Websocket status : Websocket client not started"

however /usr/lib/mozilla/native-messaging-hosts contains org.jabref.jabref.json and it points to /opt/jabref/lib/jabrefHost.py which is present and executable

JabRef desktop is version 5.3, extension is 2.4.

I tried reinstalling of both the extension and desktop version to no avail

Quacken8 avatar Nov 24 '21 12:11 Quacken8

Could you give more details on the system and browser? In particular: is the browser installed via snap/flatpak?

LyzardKing avatar Nov 24 '21 16:11 LyzardKing

@LyzardKing the browser is Mozilla Firefox 94.0.2 64 bit via snap, Not sure which info on the system would help you

Quacken8 avatar Nov 25 '21 07:11 Quacken8

If you're running the snap there are further permissions to enable. You can find them at https://docs.jabref.org/collect/jabref-browser-extension

In your case it should be: snap connect jabref:hostfs-mozilla-native-messaging-jabref

LyzardKing avatar Nov 25 '21 09:11 LyzardKing

I didn't realize I had to take into account whether Firefox was installed via snap. Now however after enabling these permissions the connection status hasn't changed and the icon for jabref on relevant websites disappeared; restarting any of the involved apps or system reboot doesn't help.

Quacken8 avatar Nov 25 '21 11:11 Quacken8

Confusing update: after no change in particular the icon in the address bar is back and so is the error mentioned in original post (despite snap permissions allowed)

Quacken8 avatar Nov 27 '21 16:11 Quacken8

For the snap integration the json file is installed in /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json when you run the snap connect command

That file should point to this executable: /snap/bin/jabref.browser-proxy

LyzardKing avatar Nov 27 '21 17:11 LyzardKing

My /var/lib/snapd/hostfs/ is empty, I have org.jabref.jabref.json in /usr/lib/mozilla/native-messaging-hosts and it does point to executable /snap/bin/jabref.browser-proxy

Quacken8 avatar Nov 27 '21 18:11 Quacken8

Can you please try to copy the json file to /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json. Thanks!

tobiasdiez avatar Jan 23 '22 13:01 tobiasdiez

My bad. I read the reply incorrectly. WIth the firefox snap it is not possible to use native-messaging-tools. THe snap/flatpak devs are looking into it, but it isn't easy. The jabref snap works, but not with the snap firefox.

LyzardKing avatar Jan 23 '22 16:01 LyzardKing

This is so confusing. I've followed all the instructions to install Jabref extension in Firefox without success. None of the directories mentioned in any of these files exist in my system, so it seems maddening to change every single path and permission. I'm using normal Firefox in Ubuntu 20 and I got Jabref through Snap...

Hipomenes avatar May 01 '22 22:05 Hipomenes