JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.6k stars 2.55k forks source link

Impossible to get JabRef running on MacOS Mojave 10.14.2 #4563

Closed champagnealexandre closed 5 years ago

champagnealexandre commented 5 years ago
JabRef version 4.3.1 and 5.0 on MacOS Mojave 10.14.2

Sorry in advance for the lengthy message but it is necessary for an accurate description of the problem.

I'm facing systematic crashes with both 4.3.1 and 5.0 on MacOS Mojave. I tried both the dmg installers and the jar files - none seem to work correctly. Basically, version 4.3.1 hangs on application exit, and 5.0 crashes (doesn't hang but really crashes) when creating a new entry.

I also tried pretty much every version that was available and the latest that work is 3.8.2.

Actually, I had 3.8.2 installed for a couple months on my Macbook (I had done the above steps back then) but just started my Master's thesis, so did not have time to start using it. However today, I tried with the latest versions again and it still does not work, so I restored 3.8.2. I'm telling this specific detail because as of today, every dmg installer with version <4.0 fails to start on Mojave ("This file is damaged, you should move it to trash") so I had to restore the version I had just deleted.

Am I the only one facing all those issues on MacOS with the latest versions? I'm under the impression it could be specific to my system (i.e. Java version? But I have the latest version 8 build 191 and every other app on my MBP works correctly...) as I seem to see other MacOS users use those versions (but have no idea which MacOS version they're running).

The only step I could find was to modify /etc/hosts, as described here : https://github.com/JabRef/jabref/issues/3236 , but it doesn't fix those problems I'm facing.

In order to find the root of the problem which steps can I try, or which log files can I post here to get some insight about this?

Thanks.

Siedlerchr commented 5 years ago

@LinusDietz @halirutan Are you running mojave?

Siedlerchr commented 5 years ago

Have you tried uinstalling (remove) JabRef completely before installting a new version (not upgrading!). Can you run jabref from the terminal and do you see any errors in the console then when it crashes?

champagnealexandre commented 5 years ago

I use AppCleaner to uninstall every version before installing the next one so I'm under the impression this isn't the problem.

Here is the output from the latest stable release (used the dmg installer here) :

Alexandres-MBP ~ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
Alexandres-MBP ~ java -jar /Applications/JabRef.app/Contents/java/app/JabRef-4.3.1.jar --debug --console
07:05:41.838 [AWT-EventQueue-0] DEBUG org.jabref.logic.logging.JabRefLogger - Showing debug messages
07:05:41.841 [AWT-EventQueue-0] DEBUG org.jabref.cli.ArgumentProcessor - Finished export
07:05:41.863 [AWT-EventQueue-0] DEBUG org.jabref.logic.remote.client.RemoteClient - Could not ping server at port 6050
java.net.ConnectException: Connection refused (Connection refused)
    at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_191]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_191]
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_191]
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_191]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_191]
    at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_191]
    at java.net.Socket.connect(Socket.java:538) ~[?:1.8.0_191]
    at java.net.Socket.<init>(Socket.java:434) ~[?:1.8.0_191]
    at java.net.Socket.<init>(Socket.java:244) ~[?:1.8.0_191]
    at org.jabref.logic.remote.client.RemoteClient.openNewConnection(RemoteClient.java:64) ~[JabRef-4.3.1.jar:?]
    at org.jabref.logic.remote.client.RemoteClient.ping(RemoteClient.java:28) ~[JabRef-4.3.1.jar:?]
    at org.jabref.JabRefMain.handleMultipleAppInstances(JabRefMain.java:136) ~[JabRef-4.3.1.jar:?]
    at org.jabref.JabRefMain.start(JabRefMain.java:121) ~[JabRef-4.3.1.jar:?]
    at org.jabref.JabRefMain.lambda$start$0(JabRefMain.java:51) ~[JabRef-4.3.1.jar:?]
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) [?:1.8.0_191]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) [?:1.8.0_191]
    at java.awt.EventQueue.access$500(EventQueue.java:97) [?:1.8.0_191]
    at java.awt.EventQueue$3.run(EventQueue.java:709) [?:1.8.0_191]
    at java.awt.EventQueue$3.run(EventQueue.java:703) [?:1.8.0_191]
    at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_191]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) [?:1.8.0_191]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) [?:1.8.0_191]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) [?:1.8.0_191]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_191]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_191]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_191]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_191]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_191]
07:05:42.524 [AWT-EventQueue-0] DEBUG org.jabref.JabRefGUI - Initializing frame
File: grouptree.fxml not found, attempting with camel case
07:05:43.355 [JavaFX Application Thread] DEBUG org.jabref.gui.DefaultInjector - Instantiate org.jabref.gui.groups.GroupTreeController
File: grouptree.css not found, attempting with camel case
07:05:45.670 [AWT-EventQueue-0] DEBUG org.jabref.JabRefGUI - Finished adding panels

# [here, I quit Jabref from the menu, then it hangs - no subsequent error message is shown in terminal]

07:05:56.476 [AWT-EventQueue-0] DEBUG org.jabref.logic.remote.server.RemoteListenerServerThread - Interrupting JabRef - Remote Listener Server on port 6050

# [after waiting a couple minutes, I kill the java process]

Alexandres-MBP ~

Addendum : disabling "Listen for remote operations" prevents the ConnectionException error message but JabRef still hangs on exit.

champagnealexandre commented 5 years ago

Hey in the meantime, as long as I properly close the library when I'm finished working - JabRef 4.3.1 seems to be working fine apart from this (I'll update on this as I continue setting up my library) - can I continue using it by just killing the process to exit JabRef? I just don't want to corrupt anything, but I presume that wouldn't cause any serious trouble?

Siedlerchr commented 5 years ago

The problem with the process should be fixed in the latest Master version. It was just a leftover thread which did not exit correctly. Therefore, it's safe to kill the remaining process.

Does the master / latest dev version hang at the same place?

champagnealexandre commented 5 years ago

Let's say I wipe 4.3.1 and test the master JabRef_macos_5_0-dev--snapshot--2019-01-05--master--d281ece4b. If I open JabRef, create a new BibTeX library, then do Import into current library on a PDF file, I get the import dialog but as soon as I press Ok JabRef crashes immediately (logfile here). Interesting fact : Import into new library seems to work somewhat (I get an error message but the entry is created and I can save the library thereafter).

When JabRef 5.0 crashes, it exits with SIGSEGV and the logfile ends with :

# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

..so maybe it's related to Java itself and not JabRef's code.

Finally, quitting JabRef 5.0 executes correctly (doesn't hang like 4.3.1).

**

Sorry about the confusion in my first post, I was facing several problems and thought they could be somewhat related, and I'm not that used to debugging on MacOS/Java. But to summarize, there was three problems :

1) 4.3.1 hangs on exit (but since if it's safe to kill the process afterward, then it's no big deal - moreover 5.0 doesn't exhibit the same problem so I consider this one solved) 2) 5.0 crashes on new entry (this one is still to solve) 3) damaged dmg files for <4.0 (obsolete because I can circumvent problem 1)

So I can use 4.3.1 in the meantime, and this thread can actually be dedicated to problem 2. Thanks for your help so far!

Let me know if I can be of further help.

champagnealexandre commented 5 years ago

Additional info : seems a bit weird, but when I add my hostname to the loopback address in /etc/hosts, i.e. the following line :

127.0.0.1   localhost Alexandres-MBP.local

then I can import one entry item in 5.0 without any problem. However, deleting that entry and importing a second one crashes JabRef.

fordham007 commented 5 years ago

I have similar problems running JabRef 4.3.1 under Mojave 10.14.2

But they don't seem to be identical: my main issue is that JabRef is very, very, very, slow - coloured spinning wheel shows, app shows as "Not Responding" in ActivityMonitor - but does eventually complete actions. And will close.

Only solution I can find proposed is to hack the /etc/hosts file to show the local host name explicitly as per last comment. Similar advice shows under the current JabRef FAQs on https://help.jabref.org/en/FAQosx (tho' in relation to High Sierra, not Mojave).

My problems with this are (1) this is a scary thing to do to a private system file (for relatively naive users like me) - in fact I don't know how to override the protections so I can edit the /etc/hosts anyway, so I havn't tried (2) previous comment suggests it may not work anyway.

Right now my practical resort is to switch to BibDesk which works entirely happily. But would prefer JabRef for compatibility with other collaborators on writing projects. This seems to be a known issue - where exactly is the problem (MacOS, JabRef, Java ...) and is a solution/workaround likely ?

Thanks for any advice

champagnealexandre commented 5 years ago

fordham007,

Do you mind typing the following commands in the MacOS terminal to determine which Java version you're on and pasting the results here?

First execute

export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

then

java -version

Also, editing "system files" is pretty common in the *nix world (which MacOS is a part of). Technically, you would have to do something like

sudo emacs /etc/hosts

then enter the administrator account's password, modify the file, and finally while holding control type the letters xs (to save the file) immediately followed by xc (while still holding control), which will bring you back to the terminal shell.

tobiasdiez commented 5 years ago

@champagnealexandre Thanks for the detailed feedback. We are currently investigating the root for the huge performance and freezing issues on MacOS. It appears however that these problems come from some multi-threading issues that are hard to debug. So it may take some time until we can provide a fix. So probably the best bet is to keep using 4.3.1 for the moment.

@LinusDietz can you send me please the stack trace we were speaking about the last time? Thanks

champagnealexandre commented 5 years ago

No problem, thanks! Will this issue be updated as 5.0 is investigated or is there a separate issue I can follow?

And except for one single crash that happened yesterday, 4.3.1 seems to be working well enough so I can live with that ;-) I'll open separate issues if this reoccurs for 4.3.1.

Thanks again.

fordham007 commented 5 years ago

Thank you to contributors for advice.

  1. Output from java - version is: java version "1.8.0_192" Java(TM) SE Runtime Environment (build 1.8.0_192-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)

This is consistent with what you get from the Java Control Panel under "System Preferences"

  1. Editing /etc/hosts as described has actually worked - thank you for advice on sudo etc. Important point for novices is that the required hostname is what you get from typing "hostname" as a command in Terminal - typically ends in .local, not just the system name.

  2. Effect on JabRef is that I can now actually use JabRef 4.3.1 - hooray ! HOWEVER: I get the same problem that others report, which is that JabRef refuses to quit via usual commands in menu(s). Forcing quit works and the saved .bib file appears undamaged, so this is acceptable as a workaround.

Hope this helps developers get to the bottom of this.

champagnealexandre commented 5 years ago

Glad it is working for you fordham007!

jgonthier commented 5 years ago

Hello,

I have the same problem: Jabref 5.0 and Jabref 4.3.1 hang upon trying to import, whether in the current library or in a new library. I have this problem both using the dmg images or the .jar with a separately installed JDK. Java version is

java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

Editing the /etc/hosts file did not solve the problem on Jabref 4.3.1 even after a reboot.

In addition, I see the following error in the terminal when trying to import:

Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff88642210) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x131ad1dc8). One of the two will be used. Which one is undefined.

Edit: I'm on MacOS Mojave 10.14.3

jgonthier commented 5 years ago

Good news: Jabref 4.1 seems to be working smoothly. Bad news: the error message I reported above also appears with Jabref 4.1, so it is probably unrelated to the problem.

Siedlerchr commented 5 years ago

@jgonthier okay, thasnk for the info. The error message you encounter is probably an apple warning we can't do anyhting about. Where exactly does your problem occur in the latest 5.0 dev version? Does a file select dialog appear?

jgonthier commented 5 years ago

@Siedlerchr I just checked, and I was wrong. I re-installed 4.3.1 when I thought I installed 5.0-dev. (This is because of Mac's security: when I tried to allow the 5.0 installer, it instead open the 4.3.1 installer since the disk image was still mounted with the same name... Macs...) Sorry about the confusion. Importing works with Jabref 5.0 dev, however it hangs when I try to quit.

Siedlerchr commented 5 years ago

Okay, thanks for the update. Just to make sure, you don't have any old java version left (see https://github.com/JabRef/jabref/issues/3587#issuecomment-387705258) you should uninstall first all jabref and then manually clear the contents)

Regarding the import, it will take some time probably until the import is finished and then JabRef should behave normally again. If I remember correctly the import is not yet done properly in the background, this is another issue.

jgonthier commented 5 years ago

So every time I tried installing a new version, I first deleted the previous one from Applications, like mentioned in the comment you reference. The installer didn't suggest an update and seemed to be doing a clean install. I can probably use 4.1 until 5.0 is released though, so I should be all set. Thanks!

Siedlerchr commented 5 years ago

We now did a lot of changes and nearly removed all swing stuff, so would you mind testing the current master snapshot again? https://builds.jabref.org/master/

gwynhwyfer commented 5 years ago

Hello @Siedlerchr, I've been following this thread to get JabRef working on my MacBook Pro running Mojave (10.14.3). Previously I tried using JabRef 4.3.1, but it was freezing right after clicking ok on the import screen. Happy to report that the current master snapshot is now working to import .bib files!

Siedlerchr commented 5 years ago

Yeah! Great that it works now fine. If you encounter any other issues, please open a new issue

jgonthier commented 5 years ago

Just tested the latest dev snapshot and it works for me as well. Thank you!