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

**URL:** <https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791>\
**Category:** Mobile\
**Tags:** cocoapods, fastlane, ios\
**Created:** [April 10, 2017, 3:22am UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791 "2017-04-10T03:22:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SatoTakeshiX](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/satotakeshix/32/6805_2.png) [@SatoTakeshiX](https://discuss.circleci.com/u/SatoTakeshiX)\
**Post date:** [April 10, 2017, 3:22am UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791/1 "2017-04-10T03:22:50Z")

</div>

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

```auto
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

```auto
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

![](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/circleci/original/3X/8/f/8fd319884f4241cc50f119fa07c1a3950eeab9c5.jpeg)

* * *

# what happen in circle ci

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

```auto
  - bundle exec fastlane beta

```

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

```auto
[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.

```auto
[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.

---

<div class="post-metadata">

**Author:** ![temych](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/temych/32/15820_2.png) [@temych](https://discuss.circleci.com/u/temych)\
**Post date:** [April 10, 2017, 3:42pm UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791/2 "2017-04-10T15:42:07Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![SatoTakeshiX](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/satotakeshix/32/6805_2.png) [@SatoTakeshiX](https://discuss.circleci.com/u/SatoTakeshiX)\
**Post date:** [April 11, 2017, 7:26am UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791/3 "2017-04-11T07:26:09Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![starhoshi](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/starhoshi/32/6842_2.png) [@starhoshi](https://discuss.circleci.com/u/starhoshi)\
**Post date:** [April 11, 2017, 1:08pm UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791/4 "2017-04-11T13:08:26Z")

</div>

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

> <https://github.com/fastlane/fastlane/issues/6866#issuecomment-260510558>

example:

```auto
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

> **[CircieCI の Xcode を 8.3 にしたら Gym で ARCHIVE FAILED になる解決方法 - Qiita](https://qiita.com/star__hoshi/items/a57608258e2598fa7d25)**
>
> CircleCI が Xcode8.3 に対応したので、 circle.yml の xcode version を 8.3 にしたら ARCHIVE FAILED と出てしまった。
> 
> 他にも困ってそうな人がちらほら。
> 
> \* \[Xcod...

---

<div class="post-metadata">

**Author:** ![b-outlaw](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/b-outlaw/32/15997_2.png) [@b-outlaw](https://discuss.circleci.com/u/b-outlaw)\
**Post date:** [April 26, 2017, 9:41pm UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791/5 "2017-04-26T21:41:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![philwebster](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/philwebster/32/13857_2.png) [@philwebster](https://discuss.circleci.com/u/philwebster)\
**Post date:** [April 29, 2017, 5:27am UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791/6 "2017-04-29T05:27:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anon47539524](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon47539524](https://discuss.circleci.com/u/anon47539524)\
**Post date:** [May 16, 2017, 9:26am UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791/7 "2017-05-16T09:26:59Z")

</div>

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.

> [@Make Fastlane match use circle.keychain](https://discuss.circleci.com/t/make-fastlane-match-use-circle-keychain/12601):
>
> Some users have complained about builds using Fastlane being stuck since we shipped the Xcode 8.3 image which includes a OS bump to macOS Sierra. The symptoms are can be many but the underlying issue is always the same: macOS Sierra changed the way code signing credentials are handled and it basically boils down to: Fastlane puts the credentials into your keychain but codesign is trying to access them. macOS Sierra considers this an access violation and denies access. In order to work around t…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:33am UTC](https://discuss.circleci.com/t/running-script-cp-embed-pods-frameworks-not-running-and-time-out/11791/8 "2018-06-18T11:33:39Z")

</div>


