# Setting up mobile automation project in macOS - Build Failed

**URL:** <https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749>\
**Category:** Mobile Testing\
**Tags:** mobile-testing, katalon-studio\
**Created:** [August 21, 2018, 8:57am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749 "2018-08-21T08:57:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [August 21, 2018, 8:57am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/1 "2018-08-21T08:57:58Z")

</div>

Hi All,

Doing step by step with this tutorial :

[https://www.katalon.com/resources-center/tutorials/set-up-mobile-automation-project-macos/](https://www.katalon.com/resources-center/tutorials/set-up-mobile-automation-project-macos/)

when doing this step :

- Select **WebDriverAgentLib** , and in the Signing section, check **Automatically manage signing** and select a team.

and Got an error :

CodeSign /Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/Frameworks/YYCache.framework  
cd /usr/local/lib/node\_modules/appium/node\_modules/appium-xcuitest-driver/WebDriverAgent  
export CODESIGN\_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign\_allocate  
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity: “XXXXXX”

```
/usr/bin/codesign --force --sign xxxxxxxxxx --preserve-metadata=identifier,entitlements,flags --timestamp=none /Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/Frameworks/YYCache.framework  

```

/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/Frameworks/YYCache.framework: replacing existing signature  
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/Frameworks/YYCache.framework: errSecInternalComponent  
**Command /usr/bin/codesign failed with exit code 1**

i use iOS version 11.4.1

xcode version 9.4.1

Can anyone help me?

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [August 24, 2018, 3:10pm UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/2 "2018-08-24T15:10:21Z")

</div>

Hi Fransiscus,

My first guess is that something is wrong with the framework dependencies installed by Carthage (YYCache is one of those).

For some reason, when you install Appium on MacOS, the WebDriverAgent/Carthage directory - where the project dependencies are stored - is actually a file, not a directory.

You can confirm if this is the case by looking at the Carthage file’s properties in your WebDriverAgent folder.

First, go to the folder where the WebDriverAgent code is installed. Probably in your case:

```auto
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent

```

Then look at what type of file “Carthage” is:

```auto
ls -l Carthage

```

If the output doesn’t start with a “d”, then it’s just a file.

Correct:

```auto
drwxr-xr-x

```

Incorrect

```auto
-rwxr-xr-x

```

To fix this, in your WebDriverAgent folder, remove the Carthage file:

```auto
rm Carthage

```

Then create a directory correctly:

```auto
mkdir Carthage

```

Finally, try running the bootstrap.sh command again:

```auto
./Scripts/bootstrap.sh -d

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [August 27, 2018, 3:46am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/3 "2018-08-27T03:46:13Z")

</div>

Hi Chris,

Thanks before for your help.

I try and follow your steps, is this correct?

![](https://s3.amazonaws.com/katalon-forum/editor/kx/a3e4ggxuirx1.png "Image: https://s3.amazonaws.com/katalon-forum/editor/kx/a3e4ggxuirx1.png")

[Screen Shot 2018-08-27 at 10.29.58.png](https://s3.amazonaws.com/katalon-forum/editor/kx/a3e4ggxuirx1.png)

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [August 27, 2018, 4:08am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/4 "2018-08-27T04:08:29Z")

</div>

Hi Fransiscus, that does look right.

In XCode, when you set the “Automatically manage signing” for WebDriverAgentLib, do you see any errors on that screen (anything in red?) Can you check the same thing for WebDriverAgentRunner? You should also choose “Automatically manage signing” for WebDriverAgentRunner. Do you see anything in red when you do that?

- Chris

---

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [August 27, 2018, 5:06am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/5 "2018-08-27T05:06:36Z")

</div>

Hi Chris,

When open XCode and try to build found this :

![](https://s3.amazonaws.com/katalon-forum/editor/48/y34qarfslk0q.png "Image: https://s3.amazonaws.com/katalon-forum/editor/48/y34qarfslk0q.png") ![](https://s3.amazonaws.com/katalon-forum/editor/pn/wppfsandifi8.png)

Is That errors you mean?

[Screen Shot 2018-08-27 at 11.51.41.png](https://s3.amazonaws.com/katalon-forum/editor/48/y34qarfslk0q.png)

[Screen Shot 2018-08-27 at 11.49.48.png](https://s3.amazonaws.com/katalon-forum/editor/pn/wppfsandifi8.png)

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [August 27, 2018, 2:52pm UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/6 "2018-08-27T14:52:54Z")

</div>

Hi Fransiscus,

I’m not that concerned about the red in the file navigator at this point (usually that means that the file isn’t where the Xcode project thinks it is, but I don’t think it should affect code signing).

Could you please click the dropdown for “WebDriverAgentLib” near the top of the screen (in the same row as General, Resource Tags, etc.)?

Choose “WebDriverAgentRunner” and see if there are any red errors near the middle of the screen in the “Signing” section.

You’ll want to do the same thing you did before to set “Automatically manage signing” and select your Team and Signing Certificate.

If you’re still seeing errors then, please include a screenshot of that WebDriverAgentRunner page, too.

Thanks,

Chris

---

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [August 28, 2018, 3:01am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/7 "2018-08-28T03:01:05Z")

</div>

Hi Chris,

![](https://s3.amazonaws.com/katalon-forum/editor/5p/sm8rshehpmwu.png "Image: https://s3.amazonaws.com/katalon-forum/editor/5p/sm8rshehpmwu.png")

Is this what you mean?

Already Select Team and Signing Certificate.

Automatically signing running well, but when build, WebDriverAgentLib build failed.

[Screen Shot 2018-08-27 at 11.52.23.png](https://s3.amazonaws.com/katalon-forum/editor/5p/sm8rshehpmwu.png)

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [August 28, 2018, 3:34am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/8 "2018-08-28T03:34:22Z")

</div>

Yes, that was the screen I wanted to see. At first glance, that looks right.

Can you tell me:

1. What type of certificate is the signing certificate? Is it “iPhone Developer” or “Distribution”?
2. If you click the “Code sign error” message, do you see more info? Is that what you pasted in your original message or is there more?

---

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [August 28, 2018, 4:33am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/9 "2018-08-28T04:33:06Z")

</div>

1. I use iPhone Developer signing certificate

2. i already paste to you the code sign error.

![](https://s3.amazonaws.com/katalon-forum/editor/fz/bwwoyrazaez8.png "Image: https://s3.amazonaws.com/katalon-forum/editor/fz/bwwoyrazaez8.png")

i already talked to my iOS developer about this problem, maybe from the certificate or not. After discussion and track the error it’s not from certificate.

When i Select Team as “none”, build success.

[Screen Shot 2018-08-28 at 11.26.40.png](https://s3.amazonaws.com/katalon-forum/editor/fz/bwwoyrazaez8.png)

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [August 28, 2018, 2:21pm UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/10 "2018-08-28T14:21:16Z")

</div>

That is interesting. So can you set the WebDriverAgentLib signing to “None” and the WebDriverAgentRunner signing to “Automatically manage signing”? The Runner is supposed to build, copy, and sign the Lib anyway when it builds, so I don’t think you need to build the WebDriverAgentLib alone, just the WebDriverAgentRunner.

If that doesn’t work, it looks like there are a bunch of other possible solutions to this signing issue that you could try: [https://stackoverflow.com/questions/2017756/command-usr-bin-codesign-failed-with-exit-code-1](https://stackoverflow.com/questions/2017756/command-usr-bin-codesign-failed-with-exit-code-1)

- Chris

---

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [August 29, 2018, 6:08am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/11 "2018-08-29T06:08:53Z")

</div>

Yes, i can build with WebDriverAgentLib set “None” and WebDriverAgentRunner “Automatically” but always error when open record mobile or spy mobile. Then i try find solution by googling it, i try every steps but never success. I came to this forum find solution. Maybe should i uninstall katalon and clean all data then install and set up new one?

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [August 29, 2018, 2:20pm UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/12 "2018-08-29T14:20:11Z")

</div>

Ah, so if you’re getting an error when trying to record mobile or spy, that might be something different. Can you share the error is when trying to do the spy mobile?

---

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [August 30, 2018, 4:23am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/13 "2018-08-30T04:23:14Z")

</div>

The Problem are :

1. When build WebDriverAgent, already automatically signing and set Team both WebDriverAgentLib and WebDriverAgentRunner were failed with error \*\*Command /usr/bin/codesign failed with exit code 1  
\*\*

2. It can build WebDriverAgentLib with select Team “None” and WebDriverAgentRunner automatically signing.

both of them when open Katalon studio and spy mobile show this error:

![](https://s3.amazonaws.com/katalon-forum/editor/da/k0ovwqrgyk2l.png)

[Screen Shot 2018-08-30 at 11.18.02.png](https://s3.amazonaws.com/katalon-forum/editor/da/k0ovwqrgyk2l.png)

---

<div class="post-metadata">

**Author:** ![Ctof](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ctof/32/6099_2.png) [@Ctof](https://forum.katalon.com/u/Ctof)\
**Post date:** [August 30, 2018, 11:54am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/14 "2018-08-30T11:54:47Z")

</div>

Hi,  
Have you tried this: npm install -g appium@1.8.1  
[http://forum.katalon.com/discussion/4258/i-cant-spy-or-record-on-android-mobile#latest](http://forum.katalon.com/discussion/4258/i-cant-spy-or-record-on-android-mobile#latest "Link: http://forum.katalon.com/discussion/4258/i-cant-spy-or-record-on-android-mobile#latest")

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [August 30, 2018, 3:40pm UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/15 "2018-08-30T15:40:41Z")

</div>

Hi Fransiscus,

Is that latest error with ios-deploy happening when you try to Spy Mobile on a real device? If so, are you giving it an .app file or an .ipa file?

You will need to provide a code signed .ipa file of the iOS app to run on a real device (similar to how you signed the WebDriverAgentRunner).

If you don’t have a signed .ipa file, can you try running Spy Mobile on a simulator with the .app file?

- Chris

---

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [August 31, 2018, 8:58am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/16 "2018-08-31T08:58:19Z")

</div>

> Ctof said:
> 
> Hi,  
> Have you tried this: npm install -g appium@1.8.1  
> [http://forum.katalon.com/discussion/4258/i-cant-spy-or-record-on-android-mobile#latest](http://forum.katalon.com/discussion/4258/i-cant-spy-or-record-on-android-mobile#latest)

Hi Ctof, thank you for your support. I already use appium 1.8.1

Hi Chris,

That is after i build WebDriverAgentLib and WebDriverAgentRunner i use .ipa file

Is that error related with error build WebDriverAgent?

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [September 6, 2018, 4:06am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/17 "2018-09-06T04:06:14Z")

</div>

Hi Fransiscus,

I’ve had problems running Katalon tests with an .ipa file in a simulator, and I believe it’s because most of the time, an .ipa file is created for the real device architectures (arm7 arm64) and not the simulator architectures (i386 x86\_64).

To check what your .ipa is built for, you can do the following:

- Change the .ipa extension to .zip (allow when prompted)  
- Extract the .zip  
- In a Terminal, navigate to the extracted Payload directory  
- In the Terminal, enter:

```auto
lipo -info MyApp.app/MyApp

```

Where “MyApp” is the name of your app. You should see a list of the architectures in the file.

If the architectures are arm7 and arm64, you won’t be able to use that .ipa in a simulator, including Mobile Spy or Test Recorder.

To get around this, I have been using the .app built by Xcode instead. This is an unsigned application and works much better on simulators. You can find the .app file in your “DerivedData/MyApp/Build/Products/Development-iphonesimulator” directory.

Hope this helps,

Chris

---

<div class="post-metadata">

**Author:** ![Fransiscus\_Denny](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@Fransiscus\_Denny](https://forum.katalon.com/u/Fransiscus_Denny)\
**Post date:** [September 6, 2018, 6:04pm UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/18 "2018-09-06T18:04:58Z")

</div>

Hi Chris,

So, first of all i need to check what my .ipa file built for?

Okay, i will try your steps. Thanks for your help

---

<div class="post-metadata">

**Author:** ![perry.g](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/perry.g/32/16103_2.png) [@perry.g](https://forum.katalon.com/u/perry.g)\
**Post date:** [July 10, 2020, 12:47pm UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/19 "2020-07-10T12:47:21Z")

</div>

Could you please here. Having too much hope from you.

I am not able to spy my attached iOS device in Katalon.Everything is configured properly but at last step when I try to spy the elements on screen i couldn’t it just highlighting main screen.I couldn’t locate any of the component on the screen.

Waiting for reply…!!

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [July 11, 2020, 11:00am UTC](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749/20 "2020-07-11T11:00:35Z")

</div>

Hi @perry.g,

Does the it work on a simulator (is it only a real device that has the issue)?

Could you please share a screenshot or video of what you’re seeing? Specifically, I’m looking for what you’re seeing in the Spy Mobile preview window and what’s showing in the “All Objects” window.

[Next page](https://forum.katalon.com/t/setting-up-mobile-automation-project-in-macos-build-failed/12749.md?page=2)
