streamlink / streamlink-twitch-gui

A multi platform Twitch.tv browser for Streamlink
https://streamlink.github.io/streamlink-twitch-gui/
MIT License
2.7k stars 204 forks source link

macOS 15.1 on trying to open: The application “Finder” does not have permission to open “(null).” #1027

Closed dimitarvp closed 2 weeks ago

dimitarvp commented 3 weeks ago

Checklist

Streamlink Twitch GUI version

v2.5.2

Streamlink version

6.11.0

Operating system, environment and configuration details

macOS 15.1, Intel Mac

Description

Just upgraded to macOS 15.1 and tried to start the app. I got two identical windows stack on top of each other and I am posting a screenshot after I put them side by side. Both say the same thing:

The application “Finder” does not have permission to open “(null).”

I have opened the app contents and I actually can't find the binary that is the app itself. Maybe Apple quarantined it and removed it? No idea.

The app is installed through homebrew. I have reinstalled it to no effect, same error appears.

I also tried uninstalling it with homebrew and just unpacking the app given in the GitHub releases page -- same error again.

Image

Debug log

Inapplicable, can't start the app.

bastimeyer commented 3 weeks ago

That's nothing I can do about here and also nothing I am willing to investigate myself, as I'm not an Apple user. I'm not going to spend a couple of hours updating my macOS VMs and testing this.

According to Google, this is a bug in the recent macOS version. Lots of users are having the same issue with other applications which were not installed from the Apple app store. Just search for that same error message and you'll find various other posts about this particular issue.

Check your user/app permissions. Otherwise, check Apple's support forums. https://docs.brew.sh/FAQ#why-cant-i-open-a-mac-app-from-an-unidentified-developer

Since this is not an issue with Streamlink Twitch GUI itself (or NW.js), I'm going to close this.

dimitarvp commented 3 weeks ago

Forgot to say. Simply right-clicking on the app and doing Show Package Contents and then going inside Contents -> MacOS and opening nwjs makes the app open successfully. It also produces a sticky Terminal.app window but for now I can live with it.

bastimeyer commented 3 weeks ago

So after two hours of fiddling around with my current macOS VM setup, I updated to 15.1 Sequoia.

I had a quick look at the system settings, but neither adding the application to the "Developer Tools" nor adding it to "Application Management" under the "Privacy & Security" section helped.

Then I had a look at the app's Info.plist file and compared it with other ones, with an eye on STG's own stuff and modifications. I believe the issue is caused by the LSEnvironment key. After commenting out its node (including its respective value node) from the XML tree, the application managed to launch just fine after disabling the untrusted developer nonsense.

I will have another look later today, but I'll be out of the house in a bit now.

So if you want to verify this, then edit /Applications/Streamlink Twitch GUI.app/Contents/Info.plist and remove the LSEnvironment key and its respecting value.

diff --git a/Applications/Streamlink Twitch GUI.app/Contents/Info.plist b/Applications/Streamlink Twitch GUI.app/Contents/Info.plist
index 109ce61..793d763 100644
--- a/Applications/Streamlink Twitch GUI.app/Contents/Info.plist
+++ b/Applications/Streamlink Twitch GUI.app/Contents/Info.plist
@@ -65,11 +65,6 @@
     <string>15C65</string>
     <key>GPUEjectPolicy</key>
     <string>wait</string>
-    <key>LSEnvironment</key>
-    <dict>
-      <key>PATH</key>
-      <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
-    </dict>
     <key>LSFileQuarantineEnabled</key>
     <true/>
     <key>LSHasLocalizedDisplayName</key>
dimitarvp commented 3 weeks ago

Just tried the workaround by removing / commenting out the section you pointed me at. The app started just fine.

Thank you. Waiting on next release when that won't be necessary. In the meantime you unblocked me.

Any explanation why this seemingly innocuous section made so much trouble?

bastimeyer commented 3 weeks ago

Reopening for visibility until I've published a new release. I'll focus on Streamlink 7.0.0 first though, which will probably happen tomorrow.

In the mean time, simply update the Info.plist, just like I mentioned, or run the nwjs executable from within the Streamlink Twitch GUI.app/Contents/MacOS directory.


you unblocked me

??? Nobody was ever blocked here. There's also nothing in the GH orga's audit log in regards to recent moderations. Closing an issue does not mean blocking.

why this seemingly innocuous section made so much trouble?

This section in the app manifest was intended for updating the user's PATH environment variable years ago on older macOS versions, so the Streamlink executable could be found automatically without users having to select the path manually, depending on how Streamlink and Streamlink Twitch GUI were installed.

Apparently, this is not supported anymore on the recent macOS version or it requires special permissions. Either way, it's outdated and therefore can simply be removed.

dimitarvp commented 3 weeks ago

lol 😆 No, I meant I was annoyed that I have to start the app in an convoluted way, and you unblocked me in the sense of being able to open it normally. Sorry for the confusion.

RE: PATH, I see, thank you.

bastimeyer commented 2 weeks ago

I'll focus on Streamlink 7.0.0 first

Streamlink 7.0.0 has been published now.

However, there's a build issue here which needs to be resolved first. The patch release will probably have to wait until tomorrow, because it's annoying to fix and will take a bit of time. I didn't notice the build issue after I had already pushed the tag (deleted again).

https://github.com/streamlink/streamlink-twitch-gui/actions/runs/11656626804/job/32453083095

bastimeyer commented 2 weeks ago

https://github.com/streamlink/streamlink-twitch-gui/releases/latest

dimitarvp commented 1 week ago

Sorry to come back to this, I haven't restarted the app in a while and had to reboot my Mac so this just came up:

Basically macOS says that it could not verify that the app is free of malware. Can't open it at all. Only suggests to move it to trash. :(

Even the workaround to show package contents and right-click nwjs is not working anymore.

EDIT: I also tried manually installing from releases, same result (was installing and updating through the Homebrew recipe before).

bastimeyer commented 1 week ago

This is not related to this issue at all. it's simply the "unverified developer" issue, because the app isn't signed.

Once you see the "Move to trash" dialog, ignore it, go to your system settings, privacy and security, scroll down and allow "Streamlink Twitch GUI" to be run.

dimitarvp commented 1 week ago

Been several days, managed to forget. You are right of course. Thank you.