Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Jun 21, 2018 09:31

Connection Error Handling

If you receive a "Failed to establish a new connection" error message

Probable cause: Address of Instrumentation Service may be blocked

What to do: Verify (using ping) that your Mac Workstation can reach the address:

If the address is reachable, and you are still receiving the error message then contact Perfecto Support.

Parameters and Keychain Unlocking and General Configuration

These tips will help you avoid any problems with the keychain certificate

  • Make sure XCode is installed and has been opened at least once (opening it for the first time will prompt installation of tools required by the script).
  • Make sure the Python “requests” module is installed:
    • Execute the following command: pip3 install requests
      Module is installed correctly if result of the command indicates “Requirement already satisfied”
    • If prompted to install the module – accept it.
  • Make sure all parameter values are spelled correctly, including:
    • Name of the certificate exactly as spelled in the Keychain,
    • Paths to the security token and the Perfecto Lab URL.
  • Make sure that the security token file is saved as a plain text file, not rtf format.
  • Verify that Mac Workstation's Security Keychain is unlocked by executing the following command before executing the script: security unlock-keychain

Code Sign Error Handling

If a code signing exception is indicated at the end of the script execution, this may indicate the need to perform Keychain maintenance.

Perform the following procedure:

  1. Delete the generated instrumentation_temp directory (if it exists).
  2. Delete the signing certificates that were used from the Keychain.
  3. Delete the Apple WWDR (Worldwide Developer Relations Certification Authority) certificate from both the login and System Keychains (see the attached screenshot for the exact name).
  4. Download and install the certificate (both in the login and System keychains)
    (for more information see this documentation).
  5. Re-import your signing certificate to the login keychain.

Try to rerun the script, if the problem persists, try the option below

To verify that the certificate signing of the application is not a result of using the certificate name

Perform the following procedure:

  1. Delete the generated instrumentation_temp directory (if it exists).
  2. Run the following command:
    security find-identity -p codesigning
  3. Find the line containing the required signing certificate name.
  4. Copy the long hex value (it should contain 40 characters).
  5. Pass it to the script instead of the certificate name (to the -c parameter) inside quotes.
    The command should look like the following:

    python3 customInstrumentWrapper.pyc -i ORIGINAL_IPA_FILE.ipa
      -o OUTPUT_FILE.ipa 
     -t TOKEN_FILE.txt 
     -p "PROVISIONING_PROFILE_FILE.mobileprovision" 
     -c “0123456789ABCDEF0123456789ABCDEF01234567" 
     -v VERSION

    Add the required instrumentation types (-ih or -is) at the end of the command.

Try to rerun the script, if the problem persists, contact Perfecto Support.