[Pythonmac-SIG] Problem launching a py2app bundle from launchd on Mountain Lion

William R. Wing (Bill Wing) wrw at mac.com
Wed Aug 8 23:15:22 CEST 2012


With apologies for cross-posting (I also asked about this on stackoverflow), but I'm getting REALLY frustrated.

I have a python script called "Irrigate" that I've converted to a stand-alone application using py2app.  It runs just fine when double-clicked in the Finder, or opened in a terminal session.  However, when I try to have it launched by launched, it fails with the following message logged in the system log:

Aug  8 07:15:02 StraylightPro.local Irrigate[79689]: Irrigate Error
Aug  8 07:15:02 StraylightPro.local coreservicesd[77]: Application App:"Irrigate" [ 0x0/0x697596f]  @ 0x0x7fe77240cec0 tried to be brought forward, but isn't in fPermittedFrontASNs ( ( ASN:0x0-0x1cb2cb1:) ), so denying.

I discovered by trial and error that the .plist I submit to launchd apparently now has to contain a "SessionType" key, and the only key I can get launchd to accept is "Aqua" - which sort of seems consistent with the error message reference "tried to be brought forward".  If I use SessionType keys of either "StandardIO" or "Background", launchd won't accept the plist.

Googling for fPermittedFrontASNs (or pieces of this string), and searching Apple's developer docs hasn't produced anything.

I assume this is all tied to Apple's new security features in Mountain Lion and further that, if I just knew what extended attributes to add to the app.bundle or a key to add to the info.plist inside it, I'd be good to go.  Does anyone here know the answer?

Thanks,
Bill



More information about the Pythonmac-SIG mailing list