"Running script '[CP] Embed Pods Frameworks' " not running and time out

I have a problem.
I am trying to build iOS, but processing stops with the next item.
And it becomes time out.

` Running script '[CP] Embed Pods Frameworks' `

Is there any idea?

The Stack

I will write my stack below.

circle.yml

machine:
  xcode:
    version: 8.3
  environment:
    XCODE_WORKSPACE: Mamorio.xcworkspace
    XCODE_SCHEME: Mamorio #=> スキーム名
    GYM_CODE_SIGNING_IDENTITY: "iPhone Distribution: OTOSHIMONO DOT COM, K.K. (9QV73U8RHE)" #=> コード署名に使うIDを設定(後述)

test:
  override:
    #- set -o pipefail && xcodebuild -workspace 'Mamorio.xcworkspace' -scheme 'Mamorio' clean build -sdk iphoneos10.0 CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= PROVISIONING_PROFILE= | tee $CIRCLE_ARTIFACTS/xcode_raw.log | xcpretty --color --report junit --output $CIRCLE_TEST_REPORTS/xcode/results.xml
    # workspaceに"Mamorio.xcworkspace"を使い。クリーンをする。ビルドする。
    - set -o pipefail #&& xcodebuild -workspace 'Mamorio.xcworkspace' -scheme 'Mamorio' clean build test -sdk iphoneos10.0 -destination 'platform=iOS,name=Generic iOS Device ,OS=latest' CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= PROVISIONING_PROFILE= | tee $CIRCLE_ARTIFACTS/xcode_raw.log | xcpretty --color --report junit --output $CIRCLE_TEST_REPORTS/xcode/results.xml

# 後述する fastlane を利用するために bundle install を行う
dependencies:
  pre:
    - bundle install --path=vendor/bundle
    - bundle exec pod install
    - xcodebuild -version -sdk
    - xcodebuild -showsdks
# サブモジュールの更新
checkout:
  post:
    - git submodule sync
    - git submodule update --init
# develop ブランチにコードがPushされた時に fastlane(後述) の beta レーンを実行
deployment:
  develop:
    branch: develop
    commands:
      - bundle exec fastlane beta
    timeout: 1800
  release:
    branch: master
    commands:
      - bundle exec fastlane release
    timeout: 1800


fastlane file

fastlane_version "2.23.0"

default_platform :ios
#xcversion(version: "8.2") # Selects Xcode 8.1.0
#xcode_select "/Applications/Xcode.app"
platform :ios do
  before_all do
    # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
    ENV["CRASHLYTICS_API_TOKEN"] = "<MYTOKEN>"
    ENV["CRASHLYTICS_BUILD_SECRET"] = "<MYSECRET>"

    cocoapods

  end

  desc "Runs all the tests"
  lane :test do
    scan
  end

  desc "ベータ版をFabric/Crashlyticsにデプロイ"
  lane :beta do

    #cert
    sigh(
      force: true
    )
    # match(type: "appstore") # more information: https://codesigning.guide
    gym(
      scheme: "Mamorio",
      workspace: "Mamorio.xcworkspace"
      )
       # Build your app - more options available
    # Fabric / Crashlytics へのデプロイ

    # crashlytics にipaをアップロードする処理を追加
    crashlytics(
      crashlytics_path: './Crashlytics.framework',
      api_token: ENV['CRASHLYTICS_API_TOKEN'],
      build_secret: ENV['CRASHLYTICS_BUILD_SECRET'],
      ipa_path: 'MAMORIO.ipa',
      notifications: true,
      notes: "[配布] Fastlaneによる自動デプロイ",
      #groups: "developer"  #=> 複数のグループを指定する場合はカンマ区切りで入力
      emails: "sato.takeshi1987@gmail.com,sato@mamorio.jp,t.sato@personal-factory.com"
    )
  end

  desc "Deploy a new version to the App Store"
  lane :release do

    # gym(scheme: "Mamorio") # Build your app - more options available
    #pilot # FlightTestにアップするコマンド
    # deliver(force: true)
    cert
    sigh
    #disable_automatic_code_signing(path: "Mamorio.xcworkspace")
    gym(scheme: "Mamorio", workspace: "Mamorio.xcworkspace", export_method: "app-store")
    #enable_automatic_code_signing(path: "Mamorio.xcworkspace")
    #pilot
    deliver(
    app_version: "",
    skip_metadata: true,
    skip_screenshots: true,
    submit_for_review: false,
    force: true,
    team_id: "OTOSHIMONO DOT COM, K.K."
    )
  end

  # You can define as many lanes as you want

  after_all do |lane|
    # This block is called, only if the executed lane was successful

    # slack(
    #   message: "Successfully deployed new App Update."
    # )
  end

  error do |lane, exception|
    # slack(
    #   message: exception.message,
    #   success: false
    # )
  end
end

Xcode Setting Running script ‘[CP] Embed Pods Frameworks’

below image


what happen in circle ci

I commit to the development branch and are doing the following.

  - bundle exec fastlane beta

Nothing is output after the output below, then it becomes timeout.

[19:33:01]: ▸ Processing Mamorio-Info.plist
[19:33:01]: ▸ Generating 'MAMORIO.app.dSYM'
[19:33:02]: ▸ Running script 'Run Script'
[19:33:02]: ▸ Running script 'Run Script'
[19:33:02]: ▸ Running script '[CP] Copy Pods Resources'
[19:33:03]: ▸ Running script '[CP] Embed Pods Frameworks'
command bundle exec fastlane beta took more than 10 minutes since last output

What to expect

In my local mac, It was processed as follows.

[12:07:34]: ▸ Running script 'Run Script'
[12:07:34]: ▸ Running script 'Run Script'
[12:07:34]: ▸ Running script '[CP] Copy Pods Resources'
[12:07:47]: ▸ Running script '[CP] Embed Pods Frameworks'
[12:07:59]: ▸ Copying /Users/satoutakeshi/Library/Developer/Xcode/DerivedData/Mamorio-fezekkcyyctovocujugbjsainpd
p/Build/Intermediates/ArchiveIntermediates/Mamorio/BuildProductsPath/Release-iphoneos/MamorioSDK.framework
[12:08:00]: ▸ Signing /Users/satoutakeshi/Library/Developer/Xcode/DerivedData/Mamorio-fezekkcyyctovocujugbjsainpd
p/Build/Intermediates/ArchiveIntermediates/Mamorio/InstallationBuildProductsLocation/Applications/MAMORIO.app/Fra
meworks/MamorioSDK.framework
[12:08:00]: ▸ Touching MAMORIO.app

Thank you.

1 Like

@SatoTakeshiX I have had the similar issues. To fix it I returned back to Xcode 8.2.1 and everything is ok right now. As I know It’s known issue and associated with app signing. Support team said me that they are working on the issue.

1 Like

@temych Thanks.
In the circle.yml file, when I lowered the Xcode version to 8.2.1, the build went through. I am very grateful to you.

Are you using fastlane match? This may be the problem.

example:

create_keychain(
  name: ENV["MATCH_KEYCHAIN_NAME"], 
  password: ENV["MATCH_KEYCHAIN_PASSWORD"],
  timeout: 1800
)

match(keychain_name: ENV["MATCH_KEYCHAIN_NAME"], 
      keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"])

Infomation for japanese

I’m having the same time out issue.

Running script '[CP] Embed Pods Frameworks'

Using 8.2.1 isn’t an option as I’m using iOS 10.3 APIs.
I’m not using Fastlane.

Was also having this issue and ended up removing all usage of match in favor of uploading certs and provisioning profiles to the Circle project configuration page. In addition, I needed to set the export_method for gym to enterprise/appstore.

Hey everyone,

This is a known change in macOS Sierra and I’m working to get a proper fix into Fastlane as well as into our own codebase.
I was at Apple two weeks ago and the engineers told me that this is an intentional change. They want to prevent any other executable from accessing those certificates without prior being explicitly granted access to it.

You can work around it right now by adding this to your Fastfile (after you call Match to import your certs): security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k circle circle.keychain

Please note that you have to be sure that match is importing the certificates into the circle.keychain and not into the login.keychain.
Please checkout this post that published yesterday. By using this you don’t have to change your Fastfile at all. Fastlane Match will pickup the environment variables automatically.