# Appium failing to work with Launchd

**URL:** <https://discuss.appium.io/t/appium-failing-to-work-with-launchd/11950>\
**Category:** Issues/Bugs\
**Created:** [September 1, 2016, 12:01am UTC](https://discuss.appium.io/t/appium-failing-to-work-with-launchd/11950 "2016-09-01T00:01:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LiamBui](https://discuss.appium.io/letter_avatar_proxy/v4/letter/l/da6949/32.png) [@LiamBui](https://discuss.appium.io/u/LiamBui)\
**Post date:** [September 1, 2016, 12:01am UTC](https://discuss.appium.io/t/appium-failing-to-work-with-launchd/11950/1 "2016-09-01T00:01:33Z")

</div>

Hi,

Not exactly an issue with Appium but I’ve encountered a compatibility issue between Appium and Launchd, specifically when the --default-capabilites flag is used. Previously when using Appium 1.4, my Launchd plist file contained the following Appium flags

```
    <string>/usr/local/bin/appium</string>
    <string>--port</string>
    <string>4724</string>
    <string>--full-reset</string>
    <string>--bootstrap-port</string>
    <string>2251</string>
    <string>--avd</string>
    <string>AVD_for_Samsung_Galaxy_S6-Google_APIs_API_Level_22</string>
    <string>--avd-args</string>
    <string>-wipe-data -port 5554</string>
    <string>--log-timestamp</string>
    <string>--local-timezone</string>
    <string>--log</string>
    <string>/Users/tcagent/Selenium/Selenium-Node/AVD_for_Samsung_Galaxy_S6-Google_APIs_API_Level_22/logs/appium.log</string>
    <string>--nodeconfig</string>
    <string>/Users/tcagent/Selenium/Selenium-Node/AVD_for_Samsung_Galaxy_S6-Google_APIs_API_Level_22/conf/nodeconfig.json</string>
    <string>--suppress-adb-kill-server</string>
    <string>--device-ready-timeout</string>
    <string>30</string>

```

Which worked fine. However when I updated to Appium 1.5.3 and changed the Appium flags to include --default-capabilities, it no longer launched. When launching the process via Launchd, the process would appear for a brief moment however would quickly be removed again. If I grabbed the Launchd command before it disappeared and manually ran it, it would launch fine.

After a little poking around I found that Launchd has an issue with the curly braces of --default-capabilities. My Launchd plist file for Appium 1.5.3 is below:

```
    <string>/usr/local/bin/appium</string>
    <string>--default-capabilities</string>
    <string>'{"fullReset": "true", "avd": "AVD_for_Samsung_Galaxy_S6-Google_APIs_API_Level_22", "avdArgs": "-wipe-data -port 5554", "deviceReadyTimeout": "30"}'</string>
    <string>--port</string>
    <string>4724</string>
    <string>--bootstrap-port</string>
    <string>2251</string>
    <string>--log-timestamp</string>
    <string>--local-timezone</string>
    <string>--log</string>
    <string>/Users/tcagent/Selenium/Selenium-Node/AVD_for_Samsung_Galaxy_S6-Google_APIs_API_Level_22/logs/appium.log</string>
    <string>--nodeconfig</string>
    <string>/Users/tcagent/Selenium/Selenium-Node/AVD_for_Samsung_Galaxy_S6-Google_APIs_API_Level_22/conf/nodeconfig.json</string>
    <string>--suppress-adb-kill-server</string>

```

Thought I’d raise this here even though its a Launchd issue; just in case someone is facing the same issue. Google-ing my problem yielded in no results ☹

---

<div class="post-metadata">

**Author:** ![TuHuynh](https://discuss.appium.io/user_avatar/discuss.appium.io/tuhuynh/32/2487_2.png) [@TuHuynh](https://discuss.appium.io/u/TuHuynh)\
**Post date:** [September 1, 2016, 6:56am UTC](https://discuss.appium.io/t/appium-failing-to-work-with-launchd/11950/2 "2016-09-01T06:56:18Z")

</div>

> [@LiamBui](#):
>
> \<string\>–port\</string\>  
> \<string\>4724\</string\>

Why did you use this port for Appium? Any specific reason?

I suggest to use another port, pls.
