SMJobBless error with CFErrorDomainLaunchd Code 9

Does anyone know what this error code means? I get an SMJobBless error with this return error code value.

Failed to bless helper: Error Domain=CFErrorDomainLaunchd Code=9 "The operation couldn't be completed. (CFErrorDomainLaunchd error 9.)" 

I googled, looked at the answers on blog posts in Apple Docs, here and could not find the answer, what it is and how to fix it. People are talking (in some form of support that helped them reinstall OS X).

This happened to my current project a couple of weeks ago, and the only thing that helped me fix it changed the name of my helper tool. Now it happened again.

At the same time, when my code runs on other computers, this problem is only affected by my workstation.

Update: After renaming it works again. Now I have two middleware identifiers: "(forbidden) on my system: - (

Update 2: This happens on other computers too: - (

+7
cocoa macos launchd xpc smjobbless
source share
1 answer

In my case, an error

Failed to bless assistant: Domain Error = CFErrorDomainLaunchd Code = 9 "Operation could not be completed (error CFErrorDomainLaunchd 9.)"

meant that the helper tool was added to the list of permanently disabled services here:

 /private/var/db/com.apple.xpc.launchd/disabled.plist 

I tell for Yosemite, versions for older / younger versions may have them here (I have not tested):

 /var/db/launchd.db/com.apple.launchd.peruser.*user_id*/overrides.plist 

After some reading of the launchctl man page, I found that the argument of the sub-command "unload" -w adds the service to this plist file. I used this flag in my uninstaller script, which causes the blessing tool to fail the next time.

There seems to be no way to remove the service from this disabled.plist file. With each reboot, the file is restored from the launch cache, and clearing the cache does not seem to be implemented yet. This is only possible to enable the service forever, so launchdd will not stop it at startup.

Here are a few links that may be useful for those who encounter a similar problem:

+7
source share

All Articles