In Xcode, the app builds but fails to run with the following dialog of cryptic errors:
Code Block text Could not launch Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: The LaunchServices launcher has return an error. Please check the system logs for the underlying cause of the error. User Info: { DVTRadarComponentKey = 113722; } -- The operation couldn’t be completed. (OSStatus error -10826.) Domain: NSOSStatusErrorDomain Code: -10826 User Info: { "_LSFunction" = "_LSLaunchWithRunningboard"; "_LSLine" = 2508; } -- The operation couldn’t be completed. Launched process exited during launch. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launched process exited during launch.
Finder complains about permission when launching, and the Console reports this message:
Code Block text Unable to obtain a task name port right for pid 2071: (os/kern) failure (0x5)
I thought it could be a signing issue and have tried automatic, manual, codesign and every option I can find for the app and associated libraries. I've tried this in Xcode 12.2 and the 12.3 Beta and haven't been able to find any helpful answers online.
I'm not sure what to try next. Anyone have more insight into these error messages or at least another place I can look to find details?
Thanks 🙂
I have this same problem with a project that was running / building fine (Swift MacOS app on M1 Pro Xcode 13.2.1) until I did all the necessary configurations to upload the app to Test Flight. Now I get this message. Have tried the signing and build folder clean options mentioned in this thread. No luck. It's a show stopper for me. If I can't resolve it I'll have to create an entirely new fork of my project that I never use with Test Flight. Don't see any other option at moment.
@deep-mac Try changing your Bundle ID, run the app once from Xcode, then change it back. That should force Launchd to update the apps known code signing requirements. Launchd caches code signing requirements and sometimes that cache gets corrupted when code signing changes. Such as what might happen when deploying to Test Flight. Forking your project wouldn't work unless that fork uses a different Bundle ID.