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

Can't update #779

Open
4 of 7 tasks
mbierman opened this issue Apr 16, 2024 · 18 comments
Open
4 of 7 tasks

Can't update #779

mbierman opened this issue Apr 16, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@mbierman
Copy link

mbierman commented Apr 16, 2024

Please Confirm

  • I have read the FAQ and Wiki where most common issues can be resolved
  • I have searched Discussions to see if the same question has already been asked
  • This is a bug and not a question about audio routing or configuration, which should be posted in Discussions

macOS Version

macOS 13 Ventura

BlackHole Build(s) Affected

  • 2 channel
  • 16 channel
  • 64 channel
  • other/custom build

Describe the bug

macOS 14.4.1 (23E224)
Updating with homebrew is failing

Reproduction Steps

brew update
brew outdated
brew upgrade --greedy
brew cleanup

Expected Behavior

Update using homebrew should work

Screenshots

==> Upgrading blackhole-2ch
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/ef939c438c5519c1dc533f8384691106bc2262d9/Casks/b/blackhole-2ch.rb
Already downloaded: /Users/michael/Library/Caches/Homebrew/downloads/abaf20d208584f623d2627beaa5ae3045b883ebc804c27d35b9bc886a3c6dedd--blackhole-2ch.rb
==> Downloading https://existential.audio/downloads/BlackHole2ch-0.6.0.pkg
Already downloaded: /Users/michael/Library/Caches/Homebrew/downloads/094ac75837aa76e51e9defa1f6623144c5a3b223a1b426cf5ddb42c224e70c4a--BlackHole2ch-0.6.0.pkg
==> Uninstalling packages with sudo; the password may be necessary:
Could not kickstart service "com.apple.audio.coreaudiod": 1: Operation not permitted
==> Purging files for version 0.6.0 of Cask blackhole-2ch
Error: blackhole-2ch: Failure while executing; `/usr/bin/sudo -E -- /bin/launchctl kickstart -kp system/com.apple.audio.coreaudiod` exited with 1. Here's the output:
Could not kickstart service "com.apple.audio.coreaudiod": 1: Operation not permitted

@mbierman mbierman added the bug Something isn't working label Apr 16, 2024
@BetterB0y
Copy link

Uninstall is not working too.

@devinroth
Copy link
Member

devinroth commented Apr 16, 2024 via email

@BetterB0y
Copy link

Okey, I will try contact brew. Still you've got readme to update. There are still kickstart commands.

@devinroth
Copy link
Member

devinroth commented Apr 16, 2024 via email

@mbierman
Copy link
Author

@devinroth @BetterB0y Sorry you lost me a bit. I don't see anything in the readme about updating. Do I have to uninstall and reinstall? it would be great if homebrew was fixed. I really prefer using that to handle this stuff when possible.

@BetterB0y
Copy link

@mbierman Command is still in readme. It's not resolving anything about this issue.

@gnattu
Copy link

gnattu commented Apr 16, 2024

I found a way to workaround this:

You go to the Caskroom for the cask, on Apple Silicon macs, it is here:

/opt/homebrew/Caskroom/blackhole-2ch/.metadata/0.5.0/

On Intel Macs, it is here:

/usr/local/Caskroom/blackhole-2ch/.metadata/0.5.0/

And you will see a folder with a date, cd into it, you will see the blackhole-2ch.rb

Edit it that file, change

system_command "/bin/launchctl",
                   args:         [
                     "kickstart",
                     "-kp",
                     "system/com.apple.audio.coreaudiod",
                   ],
                   sudo:         true,
                   must_succeed: true

to

system_command "/usr/bin/killall",
                   args:         ["coreaudiod"],
                   sudo:         true,
                   must_succeed: true

Then save the file, and then uninstall should success.

@BetterB0y
Copy link

@gnattu it worked for blackhole-2ch. What about blackhole-16ch? Is it okey to just delete blackhole-16ch dir from Caskroom?

@gnattu
Copy link

gnattu commented Apr 16, 2024

@gnattu it worked for blackhole-2ch. What about blackhole-16ch? Is it okey to just delete blackhole-16ch dir from Caskroom?

No, you do the same for the blackhole-16ch.rb to replace the system_command

@BetterB0y
Copy link

There is .pkg file only there. No .rb file

@gnattu
Copy link

gnattu commented Apr 16, 2024

The .metadata folder is a hidden and you cannot navigate into it using finder directly. You replace the path and cd into it directly.

@BetterB0y
Copy link

Thanks. It worked. I used cd but something weird happened and i wasn't in .metadata dir.

@rubincc
Copy link

rubincc commented Apr 16, 2024

Thanks @devinroth and @gnattu.
After brew remove (following your suggestion) I did a brew install and now everything works.

@WolfLink
Copy link

To be it clear, you can run "brew upgrade" after editing blackhole-2ch.rb to successfully upgrade to the latest version (which should then upgrade fine in the future).

@bevanjkay
Copy link

A potentially easier solution, that makes it less likely to leave the cask file in an unreadable state is to remove the file from the Caskroom and then reinstall it.

This will cause Brew to use the most up-to-date uninstall stanza, instead of the one that was present when the installed version was installed.

Silicon Mac
rm -rfi /opt/homebrew/Caskroom/blackhole-2ch/

Intel Mac
rm -rfi /usr/local/Caskroom/blackhole-2ch/

Then reinstall
brew reinstall blackhole-2ch

@booi
Copy link

booi commented May 1, 2024

A potentially easier solution, that makes it less likely to leave the cask file in an unreadable state is to remove the file from the Caskroom and then reinstall it.

This will cause Brew to use the most up-to-date uninstall stanza, instead of the one that was present when the installed version was installed.

Silicon Mac rm -rfi /opt/homebrew/Caskroom/blackhole-2ch/

Intel Mac rm -rfi /usr/local/Caskroom/blackhole-2ch/

Then reinstall brew reinstall blackhole-2ch

This oddly didn't work for me as it just downloaded 0.5.0 to run uninstall first which failed. The previous fix of patching the .rb file did work though.

@rodrigopait
Copy link

That's the solution at list with 2ch:

Known Issues
To improve security and stability, using launchctl kickstart -k is no longer permitted for critical system processes. If a process must be forcefully terminated, it is recommended to use kill instead. (123028502)

https://developer.apple.com/documentation/macos-release-notes/macos-14_4-release-notes#Core-Audio

If remove the -k parameter works fine.

@booi
Copy link

booi commented May 3, 2024

If remove the -k parameter works fine.

I don't think that's right. What we need is for coreaudiod to restart which we were doing with launchctl kickstart -k. Merely removing the -k will mean it won't restart coreaudiod.

I think the correct solution is here: #779 (comment) . Since coreaudiod is considered a core service, it will restart if killed.

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

9 participants