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

Process killed immediately when running on macOS #455

Open
4 of 6 tasks
isidjjchdhdhdh opened this issue Jun 8, 2024 · 12 comments
Open
4 of 6 tasks

Process killed immediately when running on macOS #455

isidjjchdhdhdh opened this issue Jun 8, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@isidjjchdhdhdh
Copy link

Version

v1.12.2

Platform

macOS 14

Steps to reproduce

Terminal looks like this:
(base) ➜ YoutubeDownloader.osx-arm64 ./YoutubeDownloader
[1] 4396 killed ./YoutubeDownloader

Details

can't open the app, no matter running in terminal or clicking the "YoutubeDownloader" in the folder

p.s. already allowed this app in system settings

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that this bug is reproducible on the latest version of the application
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project
  • I have not read any of the above and just checked all the boxes to submit the issue
@isidjjchdhdhdh isidjjchdhdhdh added the bug Something isn't working label Jun 8, 2024
@Tyrrrz
Copy link
Owner

Tyrrrz commented Jun 9, 2024

You might also need to allow ffmpeg and all dylib files. I don't use macOS, but this is what I heard.

@Tyrrrz Tyrrrz changed the title [macOS] process killed immediately when running Process killed immediately when running on macOS Jun 9, 2024
@fenhelix
Copy link

Allowing files does not stop the process from being killed.

@TheLazyHatGuy
Copy link
Contributor

It runs fine if you clone the project and build it locally. I guess there is something wrong with the packaging

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jun 25, 2024

Running it via dotnet run would work because dotnet is signed

@githal2022
Copy link

I don't work in terminal space - how do I use dotnet? It worked beautifully on Windows, but I really intended to use it with MacOS arm.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jul 3, 2024

You can download .NET runtime (or SDK) here: https://dotnet.microsoft.com/en-us/download

Then use the terminal, switch to the directory with the app, and run dotnet YoutubeDownloader.dll. The .NET CLI will act as a signed proxy and you should be able to run the app. You may have issues with the packaged ffmpeg executable, but you can work around that by deleting it and installing ffmpeg using your package manager instead.

@Raphael0010
Copy link

@githal2022

In first you need to install dotnet from brew with this command : brew install dotnet,
next you should use this command to authorize any application to run on your mac: sudo spctl --master-disable.

And now you can use the @Tyrrrz command : dotnet YoutubeDownloader.dll

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jul 25, 2024

@Raphael0010 with sudo spctl --master-disable can you run the application directly with ./YoutubeDownloader?

@Raphael0010
Copy link

When I run : ./YoutubeDownloader
I have : [1] 10295 killed ./YoutubeDownloader

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jul 29, 2024

Okay that's unfortunate

@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 6, 2024

The solution to this issue is probably an app bundle, similar to Tyrrrz/DiscordChatExporter#1249

@DannyDorito24
Copy link

This is definitely a gatekeeper/signing problem, I'm doubtful that an app bundle would solve it. With gatekeeper disabled, it opens just fine. With gatekeeper enabled, it complains about the app itself, along with all of the libraries it tries to load. In pre-sequoia macOS it would probably only complain about the main executable. I have seen this with app bundles as well as raw executables like this. The only easy workaround is to disable gatekeeper for a bit, and once you've done that and opened the app, you can re-enable gatekeeper and it will continue to allow this app (although if you redownload it or download an update, you'll have to do this all again)

Alternatively, yt-dlp works great on macOS if you're okay with a bit of command line, since it's python no weirdness with gatekeeper is needed.

Reading through this again after writing this out though, I never got the "killed" message when trying to run it, even with gatekeeper enabled. Have you set Allow Applications from App Store and Known Developers in Privacy and Security? That could be the source of this issue, as if it's set to App Store only, I don't think it will let anything even try to run other than App Store downloads.
Screenshot 2024-11-18 at 2 54 01 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants