igvteam / igv

Integrative Genomics Viewer. Fast, efficient, scalable visualization tool for genomics data and annotations
https://igv.org
MIT License
646 stars 387 forks source link

Mac Desktop IGV only runs in the user account where IGV was downloaded #1523

Closed mkraghuraman closed 3 months ago

mkraghuraman commented 5 months ago

On an M1 Mac (see the end for details), IGV_2.17.4 (desktop version with included Java) only runs in the user account that was used to download it. So if User 1 downloads it (and installs it in the Applications folder or in /Users/Shared), only User 1 and no other user account on the Mac is able to run IGV.

Things I've tried: (1) Re-booting the Mac: even then, only the original user (the account that downloaded IGV) can run it. On all other accounts -- admin or standard (non-admin) -- I get an error message saying, 'The application “IGV_2.17.4.app” can’t be opened.' So, it's not a matter of multiple instances of IGV being run.

(2) I've tried downloading it using Safari and using Firefox; same problem either way.

(3) In Terminal, I tried the command: open -n "/Applications/IGV_2.17.4.app" and got the following error:

The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600002c750e0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}

(4) I've also tried clearing all metadata on the downloaded IGV using the following command: xattr -cr "/Applications/IGV_2.17.4.app" Still no luck.

(5) I tried changing permissions (in Get Info) for "Everyone" to "Read and write" -- doesn't help.

Mac details: I've seen the same issue on two M1 Macs: • M1 Macbook Pro (14-inch. 2021) running macOS Sonoma 14.4 • M1 Mac Studio (2021) running macOS Sonoma 14.4.

Incidentally, an old version (IGV_2.4.6) does work on all user accounts on both Macs.

-Raghu

jrobinso commented 5 months ago

@helgathorv some notes: This problem was introduced with 2.17, 2.16.2 runs on multiple accounts. I suspect the problem is with either notarization, or Java. The major change for 2.17 was the change to Java 17 vs Java 11. I'm not sure if there were any notarization changes.

jrobinso commented 5 months ago

@mkraghuraman @helgathorv OK I have a workaround for this. The problem is with the permissions of the binary "IGV" script, located in /Applications/IGV_2.17.4.app/Contents/MacOS. I noticed the following differences in permisssions

2.16.2 (works): -rwxrwxr-x 2.17.4 : -rwxrw-r--

The workaround, from the user account who installed IGV (from a terminal window)

cd /Applications/IGV_2.17.4.app/Contents/MacOS
chmod a+x IGV

This worked in my testing. We will try to determine what is causing this permission change and fix it for the next release.

mkraghuraman commented 5 months ago

@jrobinso @helgathorv Thanks for looking into this matter!

I tried out the workaround you suggested. I no longer get the "application can't be opened" error, but the app still doesn't open. After running the chmod command, when I try to run IGV (from a non-downloaded user account) it gives one bounce in the Dock and then nothing further happens. I confirmed that the IGV script's permissions after running the chrmod command are -rwxrwxr-x.

But as a crude workaround, I found that I could just download one instance of IGV in each user account (saved to the Desktop, for instance) and run them that way. I can have IGV running simultaneously in both user accounts, presumably because they were being launched from separate copies of IGV.

-Raghu

jrobinso commented 5 months ago

Hmm, that's unfortunate, I'm not sure why that doesn't work. This might be another issue.

jrobinso commented 5 months ago

@mkraghuraman If you run IGV from the command line from a non-working account it might yield some information to the console, that is just run the following from a terminal

 /Applications/IGV_2.17.4.app/Contents/MacOS/IGV
mkraghuraman commented 5 months ago

@jrobinso Interesting -- it appears to be something Java related. This is what I get on the non-working account:

/Applications/IGV_2.17.4.app/Contents/MacOS/IGV
/Applications/IGV_2.17.4.app/Contents/MacOS
echo Using bundled JDK.
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.

On the working account IGV opens without a problem when I run the above command.

-Raghu

jrobinso commented 5 months ago

Hmm, it can't find the bundled runtime, which is a bit strange. Probably fixable as that is a path problem, however to avoid this issue you could install the "separate Java required" package and install Java independently. We use the open source Adoptium packages: https://adoptium.net/temurin/releases/. IGV currently requires Java 17, however it will work with the latest Java 21.

jrobinso commented 5 months ago

And one other thing to try, as this is a path issue, is run "IGV" from the app directory. In other words

cd /Applications/IGV_2.17.4.app/Contents/MacOS
./IGV
mkraghuraman commented 5 months ago

@jrobinso Progress! Running from the app directory (on the Java-included version) didn't work, but installing the "separate Java required" version with temurin Java 21 did work -- with one caveat, I still had to go in and change permissions with

cd /Applications/IGV_2.17.4.app/Contents/MacOS
chmod a+x IGV

as you'd originally suggested. But I can work with that, thanks for all your suggestions!

jrobinso commented 5 months ago

OK, thanks for the update. Leave this open until we figure out what in the process is changing the permission on the app.

mkraghuraman commented 5 months ago

Ok, will do.

jrobinso commented 3 months ago

This should be fixed in the next release (2.18.0), just tested on my Mac.

mkraghuraman commented 3 months ago

Great, thanks so much!- Raghu***M. K. RaghuramanUniversity of WashingtonDepartment of Genome Sciences Box 355065Seattle WA 98195-5065Phone +1 206 543 0334 (Office) +1 206 543 9447 (Lab)FAX +1 206 685 *@*.*****On Jul 26, 2024, at 11:02 AM, Jim Robinson @.***> wrote: This should be fixed in the next release (2.18.0), just tested on my Mac.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>