donaldlab / osprey-gui

A cross-platform GUI for OSPREY 3
GNU General Public License v2.0
0 stars 0 forks source link

Doesn't open in macOS Catalina (10.15) #12

Open gusennan opened 4 years ago

gusennan commented 4 years ago

When trying to open the application in Catalina, after unpacking and running the application, a message pops up saying:

Screen Shot 2020-05-23 at 8 58 28 PM

It seems to be caused by a couple of issues. The first is the quarantine extended attribute on the application (and all files below it).

➜  Desktop xattr -l Osprey.app
com.apple.quarantine: 0183;5ec9b1bd;Safari;55894F4A-3BE8-4A37-8DC4-5B8947137275

This is usually used to prompt users to verify they want to run an application they downloaded from the internet. But that's not what the error message is indicating. A little deeper searching found this:

➜  Desktop codesign --verify --verbose --verbose=4 ./Osprey.app
./Osprey.app: code has no resources but signature indicates they must be present

The app is failing its code sign checks, hence the error message. It turns out this is a known bug in jpackager and jlink, see this and this.

gusennan commented 4 years ago

One work-around is to remove the extended attributes:

sudo xattr -cr Osprey.app

gusennan commented 4 years ago

@cuchaz when you provided to seminar students, did you re-sign the application package or anything like that?

cuchaz commented 4 years ago

I didn't sign any of the packages. It was always on the TODO list to bug Apple for the developer certificates, but it hasn't happened yet.

gusennan commented 4 years ago

Oh. What do you think about the workaround asking people to use xattr in the meantime?

cuchaz commented 4 years ago

I don't know much about how things work in Mac-land. If you think it will work, go for it.

gusennan commented 4 years ago

It allowed me to run the app on macOS 10.15 catalina, but it's a bit of a hack. I think OpenJDK is targeting a JDK15 release for the underlying bug. Let's leave this open so we can remember to revisit this later.

cuchaz commented 4 years ago

Ok, sounds good. If the bug is in jpackager, another option to get quicker results is use a pre-release version of jpackager to build the OSX packages. Then we might not have to wait for the full release cycle to finish for JDK15, which I think would take about 4-5 months or so.