kyleneideck/BackgroundMusic

Unable to completely uninstall Background Music app after upgrade

Markmaster opened this issue · 1 comments

Example bug report template

Don't worry if you have trouble getting some of this info. Just leave it out.

Description of the bug
During update via homebrew I got this error:
CleanShot 2024-05-16 at 10 46 31@2x
I recently attempted to upgrade the Background Music app on my macOS system using Homebrew. The upgrade from version 0.4.0 to 0.4.3 seemed to complete, but when trying to uninstall the app afterward, I encountered an issue where the coreaudiod system service could not be restarted properly.

Steps to reproduce

Steps to reproduce the bug. This usually doesn't need to be super detailed.

  1. Go to '...'
  2. Click on '...'
  3. See error message '...'

run brew upgrade. Get this output:
markmaster@EMSIAC ~ % brew upgrade
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################### 100.0%
==> Casks with 'auto_updates true' or 'version :latest' will not be upgraded; pa
==> Upgrading 1 outdated package:
background-music 0.4.0 -> 0.4.3
==> Upgrading background-music
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/e604ffd
######################################################################### 100.0%
==> Downloading https://github.com/kyleneideck/BackgroundMusic/releases/download
Already downloaded: /Users/markmaster/Library/Caches/Homebrew/downloads/f26261d677adedfa65aaf9099670dfbb0a883dfa3b6a01e3ceb1a9859659e34f--BackgroundMusic-0.4.3.pkg
==> Removing launchctl service com.bearisdriving.BGM.XPCHelper
Password:
==> Uninstalling packages with sudo; the password may be necessary:
==> Removing files:
/Library/Application Support/Background Music
/Library/Audio/Plug-Ins/HAL/Background Music Device.driver
/usr/local/libexec/BGMXPCHelper.xpc
Could not kickstart service "com.apple.audio.coreaudiod": 1: Operation not permitted
==> Purging files for version 0.4.3 of Cask background-music
Error: background-music: 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

Versions

Please complete the following information.

  • Background Music: The app itself I have manually delete already. Looks like it 0.4.0
  • macOS: 14.5 (23F79)

Hardware

Delete this part if you think it's probably not necessary.

  • Computer: MacBook Pro 16-inch 2019
  • Audio Device:
    Phobos:

Input Channels: 1
Manufacturer: Apple Inc.
Current SampleRate: 24000
Transport: Bluetooth
Input Source: Default

Phobos:

Manufacturer: Apple Inc.
Output Channels: 2
Current SampleRate: 48000
Transport: Bluetooth
Output Source: Default

MacBook Pro Microphone:

Default Input Device: Yes
Input Channels: 1
Manufacturer: Apple Inc.
Current SampleRate: 48000
Transport: Built-in
Input Source: MacBook Pro Microphone

MacBook Pro Speakers:

Default Output Device: Yes
Default System Output Device: Yes
Manufacturer: Apple Inc.
Output Channels: 2
Current SampleRate: 48000
Transport: Built-in
Output Source: MacBook Pro Speakers

MMAudio Device:

Input Channels: 2
Manufacturer: MMAudio Device contributors
Output Channels: 2
Current SampleRate: 44100
Transport: Virtual
Input Source: Default
Output Source: Default

MMAudio Device (UI Sounds):

Input Channels: 2
Manufacturer: MMAudio Device contributors
Output Channels: 2
Current SampleRate: 44100
Transport: Virtual
Input Source: Default
Output Source: Default

Microsoft Teams Audio:

Input Channels: 2
Manufacturer: Microsoft Corp.
Output Channels: 2
Current SampleRate: 48000
Transport: Virtual
Input Source: Microsoft Teams Audio Device
Output Source: Microsoft Teams Audio Device

Debug logs

If you think the developers might not be able to reproduce the bug on their computers, e.g. because an important feature is completely broken and they would have noticed, it can help to include debug logs. This takes a little effort, so feel free to leave it out at first.

Debug logs attached here

Other info
The error I received was:
"Error: 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"
I tried multiple troubleshooting steps including:

Manually removing related files/directories (/Library/Application Support/Background Music, /usr/local/libexec/BGMXPCHelper.xpc, etc.)
Using sudo launchctl commands to unload/remove the BGM helper process
Rebooting into Safe Mode and attempting the uninstall process

However, none of these steps resolved the issue with the coreaudiod service refusing to restart after the Background Music files were removed.
System Details:

macOS version: [your version]
Homebrew version: [your version]

I would appreciate any guidance on how to properly and completely uninstall the Background Music app after this failed upgrade, or at least how to get the coreaudiod service running properly again.


Tips
(Delete this section before posting.)

Is this a duplicate of #727?