E0264 Unable to execute '"/usr/bin/codesign" ...'

From RAD Studio
Jump to: navigation, search

Go Up to Platform Assistant Server Errors Index


The execution of codesign on the Mac finished with an error. While there are several possible causes, you should:

The Platform Assistant Server Could Not Find a Matching Certificate

The error message may include the following line:

<configured certificate name>: no identity found

If you see this line, it means that the string specified with the -s command-line option in the call to codesign does not match the name of any of the certificates installed on your Mac.

To check that you have a valid certificate installed on your Mac:

  1. Open Keychain Access on your Mac.
  2. Select login under Keychains.
  3. Select My Certificates under Category.

In the central list of Keychain Access, you should have a valid certificate for the target platform configuration (macOS - Application Store): the 3rd Party Mac Developer Application certificate and the 3rd Party Mac Developer Installer certificate.

If you do not have these valid certificates, you need to get one. See Provisioning an macOS Application.

If you do have a valid certificate, but the string specified with the -s command-line option in the call to codesign does not match the name of any of the certificates listed in Keychain Access for macOS - Application Store, you must configure RAD Studio with the right certificate names. See Configuring Your Provisioning Profiles on RAD Studio.

The Specified Certificate Name Is Ambiguous

The error message may include the following line:

<configured certificate name>: ambiguous (matches "<one certificate name>" and "<another certificate name>" in /Users/<username>/Library/Keychains/login.keychain

Open the Keychain Access application on your Mac, select My Certificates and remove any expired certificate. After you remove expired certificates, the list of certificates should not contain certificates with the same name and code.

If you are code-signing an application for the macOS target platform, open on RAD Studio the Provisioning page for the macOS - Application Store target and specify the complete name of your 3rd Party Mac certificates. For example: "3rd Party Mac Developer Application: YourTeamName (AB345ZC79)" or "3rd Party Mac Developer Installer: YourTeamName (AB345ZC79)".

Gain Execution Permission on codesign

In order to run codesign, you need execution permission on /usr/bin/codesign. To check your permissions on /usr/bin/codesign, open a terminal an run:

$ ls -l /usr/bin/codesign

The output should start with this string: -rwxr-xr-x. If the output starts with a different string, such as -rwxr--r--, run the following command to gain permission to execute codesign:

$ sudo chmod +x /usr/bin/codesign

User canceled the operation

This message means that codesign was denied permission to sign the application. If the certificate that RAD Studio is trying to use to sign the application needs confirmation before allowing the access to it, codesign raises a dialog during the deployment asking the user for permission: codesign wants to sign using key <key_name> in your keychain. The user can Deny, Allow, or Always Allow the operation.

It is possible that you get this error without manually denying the permission to the application to use the certificate. To check the access privileges for a developer certificate:

  1. On macOS, open Keychain Access.
  2. Go to My Certificates and expand the certificate you want to check.
  3. Right-click the private key and click Get Info.
  4. Go to the Access Control tab.
  5. Check the selected item:
    1. If Confirm before allowing access is selected, a dialog appears on macOS each time that an application wants to use this certificate.
    2. If Allow all applications to access this item. (Access to this item is not restricted) is selected, no permission is required to use this certificate.
  6. Select Allow all applications to access this item. (Access to this item is not restricted).

See Also