Does anybody know what does that error code mean? I get SMJobBless error with this return code value.
Failed to bless helper: Error Domain=CFErrorDomainLaunchd Code=9 "The operation couldn’t be completed. (CFErrorDomainLaunchd error 9.)"
I googled, looked answers in blogs posts, in Apple Docs, here there and couldn't find the answer what is this and how to fix it. On some support forum people say that reinstalling OS X helped to them.
It has happened on my ongoing project already couple of weeks ago, and the only thing which helped me to fix it, was changing name of my helper tool. Now it happened again.
Same time my code is working on other computers, only my workstation is affected by this issue.
Update: After renaming, it works again. Now I have two helper tool bundle identifiers "banned" on my system :-(
Update 2: It happens on other computers as well :-(
In my case the error
meant that helper tool was added to permanent disabled services list here:
I'm telling for Yosemite, older/younger OS versions may have them here(I haven't checked):
After some reading of launchctl manual page, I found that "unload" subcommand's argument -w adds service to this plist file. I used this flag in my uninstaller script, which lead to inability of "blessing" tool at next time.
There is seems to be no way to remove a service from that disabled.plist file. On each reboot the file is being restored from launchd cache, and flushing cache seems to be not implemented yet. It is only possible to enable service forever so launchd won't stop it from launch.
Here is a couple of links which may be useful to someone who will run into similar issue:
man launchctl