BackgroundMusic icon indicating copy to clipboard operation
BackgroundMusic copied to clipboard

Error connecting to BGMXPCHelper

Open SpikeyMikey opened this issue 1 year ago • 10 comments

Every time I power on/restart my Mac mini 2018 (Ventura 13.6.7), I get this error msg: Error connecting to BGMXPCHelper Screenshot 2024-06-09 at 2 21 40 PM

And then Background Music will not work. I then need to reinstall "BackgroundMusic-0.4.3.pkg" in order for it to work again. However, once I shut down/restart my computer again, I have to go through that all over again.

I love Background Music! I've been using it for years without any issues, so I'm not sure what suddenly caused this issue, just in the past month or two. Maybe a MacOS Ventura update?

Anyone know how to resolve this? Thanks in advance for any help.

SpikeyMikey avatar Jul 18 '24 20:07 SpikeyMikey

I haven't heard of that happening before. Do you get any logs if you search for "BGMXPCHelper" in Console.app and then start Background Music (after restarting so the bug will occur)?

Can you also try this command and paste the output in here?

launchctl print system/com.bearisdriving.BGM.XPCHelper

It should give you some info about the BGMXPCHelper launch daemon.

And can you try unloading and reloading the launch daemon to see if that fixes it the same way reinstalling Background Music does?

sudo launchctl bootout system /Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist
sudo launchctl bootstrap system /Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist

kyleneideck avatar Jul 22 '24 16:07 kyleneideck

Thanks for the reply. I haven't used Console.app before, but I just opened it and tried searching for "BGMXPCHelper" in the upper-right search field, with my hard drive selected in the left column – No Messages. And I restarted my computer this morning, got the bug msg, then reinstalled Background Music. Not sure if I'm using the Console.app correctly.

I do know how to use Terminal a bit. Here's the output from that command:

system/com.bearisdriving.BGM.XPCHelper = {
	active count = 2
	path = /Library/LaunchDaemons/com.bearisdriving.BGM.XPCHelper.plist
	type = LaunchDaemon
	state = running

	program = /usr/local/libexec/BGMXPCHelper.xpc/Contents/MacOS/BGMXPCHelper
	arguments = {
		/usr/local/libexec/BGMXPCHelper.xpc/Contents/MacOS/BGMXPCHelper
	}

	default environment = {
		PATH => /usr/bin:/bin:/usr/sbin:/sbin
	}

	environment = {
		XPC_SERVICE_NAME => com.bearisdriving.BGM.XPCHelper
	}

	domain = system
	username = _BGMXPCHelper
	group = _BGMXPCHelper

	minimum runtime = 10
	exit timeout = 5
	runs = 1
	pid = 1527
	immediate reason = ipc (mach)
	forks = 0
	execs = 1
	initialized = 1
	trampolined = 1
	started suspended = 0
	proxy started suspended = 0
	last exit code = (never exited)

	endpoints = {
		"com.bearisdriving.BGM.XPCHelper" = {
			port = 0xa6b0b
			active = 1
			managed = 1
			reset = 0
			hide = 0
			watching = 0
		}
	}

	spawn type = adaptive (6)
	jetsam priority = 40
	jetsam memory limit (active) = (unlimited)
	jetsam memory limit (inactive) = (unlimited)
	jetsamproperties category = daemon
	jetsam thread limit = 32
	cpumon = default
	probabilistic guard malloc policy = {
		activation rate = 1/1000
		sample rate = 1/0
	}

	properties = inferred program | system service
}

In terms of unloading/reloading the launch daemon, not sure I did that right. First I entered the top 'sudo' line in Terminal and it asked me for my password. I entered my password and then nothing happened and Terminal just went back to waiting for the next prompt. Then I entered the 2nd 'sudo' line prompt and nothing happened. I also tried entering both lines together at the same time, but same result. No output code.

SpikeyMikey avatar Jul 22 '24 18:07 SpikeyMikey

FYI - just did a minor OS update – Ventura 13.6.8, but still having the same issue.

SpikeyMikey avatar Aug 05 '24 17:08 SpikeyMikey

Ventura 13.6.9 - same issue

SpikeyMikey avatar Aug 27 '24 05:08 SpikeyMikey

Have you tried the homebrew install? Have you tried Blackhole?

npmstart-pray avatar Aug 27 '24 22:08 npmstart-pray

Thanks for the reply. I'm not familiar with either of those things. Can you please explain? I'm not very code-savvy.

SpikeyMikey avatar Aug 27 '24 23:08 SpikeyMikey

Homebrew instructions are on the main page for this project in the readme, and I'm sure there are tutorials elsewhere online for the terminal/command line aspects of it. If I were you, I'd uninstall the package file and give the homebrew version a shot.

npmstart-pray avatar Aug 28 '24 01:08 npmstart-pray

Thank you for the tips. I looked into Homebrew, but am not confident I can handle installing/utilizing it properly...sounds a bit beyond my technical knowledge. I also installed and tried Blackhole, as an alternative. However, the reason I use Background Music is for the individual app volume controls. I could not find an option to do that with Blackhole, so I uninstalled it.

SpikeyMikey avatar Sep 09 '24 22:09 SpikeyMikey

I got same problem via using homebrew to install BackGround music 0.4.3 It pop that can't connect to BGMXPCHelper, and BGM just won't work at all My Mac is a intel Mac with Sonoma 14.5 installed 图片

ratio-dd avatar Dec 24 '24 14:12 ratio-dd

Surprisingly, after a Mac OS Ventura update (13.7.2) + a manual full-wipe uninstall of Background Music, then reinstall, this issue went away! Yay!

SpikeyMikey avatar Jan 16 '25 02:01 SpikeyMikey