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

JabRef 5.0 no connection to LibreOffice possible #6353

Closed
1 task done
teertinker opened this issue Apr 25, 2020 · 9 comments
Closed
1 task done

JabRef 5.0 no connection to LibreOffice possible #6353

teertinker opened this issue Apr 25, 2020 · 9 comments
Labels
os: snap When JabRef is run as a snap on linux status: stale

Comments

@teertinker
Copy link
Contributor

teertinker commented Apr 25, 2020

JabRef version: JabRef 5.0--2020-03-09--6bff936
Linux 5.4.0-26-generic amd64
Java 13.0.2
Ubuntu 20.04

on

-On my fresh installed Ubuntu 20.04 JabRef 5.0 (snap) fails to connect to LibreOffice (6.4 - no snap app)
-libreoffice-java-common is installed

  • The following error message shows up: Connection failed
java.lang.IllegalStateException: Not on FX application thread; currentThread = pool-3-thread-3
	at org.jabref.merged.module/com.sun.javafx.tk.Toolkit.checkFxUserThread(Unknown Source)
	at org.jabref.merged.module/com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(Unknown Source)
	at org.jabref.merged.module/javafx.stage.Stage.<init>(Unknown Source)
	at org.jabref.merged.module/javafx.stage.Stage.<init>(Unknown Source)
	at org.jabref.merged.module/javafx.scene.control.HeavyweightDialog$1.<init>(Unknown Source)
	at org.jabref.merged.module/javafx.scene.control.HeavyweightDialog.<init>(Unknown Source)
	at org.jabref.merged.module/javafx.scene.control.Dialog.<init>(Unknown Source)
	at org.jabref.merged.module/javafx.scene.control.Alert.<init>(Unknown Source)
	at org.jabref.merged.module/javafx.scene.control.Alert.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.FXDialog.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.FXDialog.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.JabRefDialogService.createDialog(Unknown Source)
	at org.jabref/org.jabref.gui.JabRefDialogService.showInformationDialogAndWait(Unknown Source)
	at org.jabref/org.jabref.gui.openoffice.DetectOpenOfficeInstallation.selectInstallationPath(Unknown Source)
	at org.jabref/org.jabref.gui.openoffice.DetectOpenOfficeInstallation.autoDetectPaths(Unknown Source)
	at org.jabref/org.jabref.gui.openoffice.DetectOpenOfficeInstallation.isInstalled(Unknown Source)
	at org.jabref/org.jabref.gui.openoffice.OpenOfficePanel$1.call(Unknown Source)
	at org.jabref/org.jabref.gui.openoffice.OpenOfficePanel$1.call(Unknown Source)
	at org.jabref.merged.module/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
  • I also tried to use manual connection but can't browse to "usr/lib/libreoffice/program" where soffice is located. The folder "libreoffice" just does not show up. All possible permissions were given in Software Center
  • JabRef 4.3.1 connects without any issues.
@teertinker teertinker changed the title JabRef 5.0 No Connetion to LibreOffice possible JabRef 5.0 no connection to LibreOffice possible Apr 25, 2020
@Siedlerchr
Copy link
Member

@LyzardKing this looks like some snap restriction. JabRef uses the uno api to connect to create a socket connection to Libre office.
Do you know if we need some extra permissions?

@teertinker could you please also test with the non snap version?

@teertinker
Copy link
Contributor Author

Thank you for the tip! The deb version connects without any issues. Note: The ubuntu software store currently only offers snap versions.

@LyzardKing
Copy link
Collaborator

@Siedlerchr I believe this would not be permissible via snap.
It might be technically feasible using similar permissions to the ones used for the browser connection... (if jabref only needs access to a file to use as an endpoint for the api..)
but we should ask in the snapcraft forum, since it would need their approval.
The same goes for the integration with latex editors, or any thirdparty apps for that case.
Snaps are confined by design, so they cannot access anything from the outside of the snap.
The other possibility, since jabref uses connections for many different functions, would be to switch to a classic snap, not confined, with full access to the underlying system.

@LyzardKing
Copy link
Collaborator

The snap version of libreoffice might expose the api to other snaps, but that would be something to ask the libreoffice devs.

@Siedlerchr Siedlerchr added the os: snap When JabRef is run as a snap on linux label Apr 26, 2020
@Siedlerchr
Copy link
Member

Hm. As Ubuntu 20.04 is now mostly recommending/installing snap apps, it would probably make sense to use "classic" mode for interactions, but this also requires an extra step when installing.
On the other hand the users can quiclkly install the deb version and have to manually update.
Marking this as discussion for the next devcall

@LyzardKing
Copy link
Collaborator

It doesn't require any extra step.. you would simply run
snap install jabref --classic
instead of snap install jabref

The point is that the "permission" to publish a classic snap needs to be asked in the forum, (like we did for the browser connection)

It was briefly mentioned back in #3121.

@koppor
Copy link
Member

koppor commented May 12, 2020

If we understood correctly, the alternative to --classic is to have exceptions for a fixed set of programs. Such as libreoffice, texstudio, lyx, ...

I think --classic is a kind of "strange" thing to the user. So, I'd like to understand if another approach is possible.

@LyzardKing
Copy link
Collaborator

LyzardKing commented May 12, 2020

It's a bit complicated:

  1. if the application (libreoffice, texstudio, ... are snaps it'll be impossible, if the app in question does not expose a "slot" to give access to other apps to it's files.
  2. if the application is not a snap, then we need to access it with a permission (like the one used for the extension). I'm testing it with libreoffice now, but I get the error "some of the jar files missing"
    (on this note, what is actually needed from libreoffice?)
    Also we can only hardcode the paths, so we need to be sure that in different distros the path (i.e. to the jar files in libreoffice) is consistently the same..

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2020

This issue has been inactive for half a year. Since JabRef is constantly evolving this issue may not be relevant any longer and it will be closed in two weeks if no further activity occurs.

As part of an effort to ensure that the JabRef team is focusing on important and valid issues, we would like to ask if you could update the issue if it still persists. This could be in the following form:

  • If there has been a longer discussion, add a short summary of the most important points as a new comment (if not yet existing).
  • Provide further steps or information on how to reproduce this issue.
  • Upvote the initial post if you like to see it implemented soon. Votes are not the only metric that we use to determine the requests that are implemented, however, they do factor into our decision-making process.
  • If all information is provided and still up-to-date, then just add a short comment that the issue is still relevant.

Thank you for your contribution!

koppor pushed a commit that referenced this issue Feb 15, 2023
9926b48cf3 Create biomolecular-concepts.csl (#6355)
4b4ebeeeba Create life-science-alliance.csl (#6353)
153790afc9 Update ucl-university-college-apa.csl (#6390)
a30604c0b4 Update geophysical-journal-international.csl (#6385)
3fda5f30ca Create nursing-open.csl (#6402)
103b607948 Update natur-und-landschaft.csl (#6404)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 9926b48cf3e20e60142e35b3cd160015aebed9d3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: snap When JabRef is run as a snap on linux status: stale
Projects
None yet
Development

No branches or pull requests

4 participants