Unable to install Provisioning Profile through Jenkins Job

All,

I am currently facing an issue while trying to install a provisioning profile using the open command. The command works perfectly fine when executed through screen sharing and the terminal on the remote machine. However, when I attempt the same command using an SSH terminal connection on my local machine, it fails to work properly.

Here is the command I am using: open /Users/ec2-user/Desktop/ProvProfile/MyAppQA.mobileprovision

When I run this command in the SSH terminal connection on my local machine, I encounter the following error message: "The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10822 "kLSServerCommunicationErr: The server process (registration and recent items) is not available" UserInfo={_LSLine=3863, _LSFunction=_LSOpenStuffCallLocal}"

Furthermore, when I execute this command in a Jenkins job, it fails with the same error message: "The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10822 "kLSServerCommunicationErr: The server process (registration and recent items) is not available" UserInfo={_LSLine=3863, _LSFunction=_LSOpenStuffCallLocal}"

I am also attempting other commands concurrently, such as security import /Users/ec2-user/Desktop/ProvProfile/MyAppQA.mobileprovision -k /Users/ec2-user/Library/Keychains/login.keychain-db, but I encounter the following error: "security: SecKeychainItemImport: Unknown format in import."

The security import command does not work on the Mac agent's terminal, the SSH terminal on my local machine, or in the Jenkins job.

I would greatly appreciate any assistance in resolving this issue and finding a reliable way to install the provisioning profile using a Jenkins pipeline job.

Thank you for your attention and support.

I am currently facing an issue while trying to install a provisioning profile using the open command.

Say what!?!

This is not going to work because your CI system runs its jobs outside of a GUI login session and open needs to be in a GUI login session to run reliably.

Why are you trying to install a provisioning profile on your Mac? Standard practice is to embed the profile within the program to which the profile applies. See Placing Content in a Bundle for info on where to place your profile and TN3125 Inside Code Signing: Provisioning Profiles for more background on how profiles work.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Unable to install Provisioning Profile through Jenkins Job
 
 
Q