Starting Appium server programmatically on MAC


#14

Alright. Found it! Here’s the syntax for future reference:

node /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 127.0.0.1 --port 4723 --full-reset
–device-name “iPhone 6”
–platform-name iOS
–platform-version “8.3”
–app “/My.app”
–browser-name iOS -l

Cheers, Pavel


#15

This means that node executable is added to your system variables… Glad it worked :smile:


Start Appium server on Mac machine but eclipse and all code is on other windows machine
#16

Hey, it’s me, bugging again :smile:
After I managed to launch Appium via terminal I am trying to do so programmatically using SSH.NET library (my tests being written in .Net)
This is how I initiate the test:

            SshClient ssh = new SshClient(myURL, 22, myUser, myPass);
        string unixCommand = "node /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 127.0.0.1 --port 4723 --full-reset --device-name \"iPhone 6\" --platform-name iOS --platform-version \"8.3\" --app \"myApp.app\" --browser-name iOS -l --log /Users/QA/Library/Logs/Appium/1.log";
        {
            ssh.Connect();
            ssh.RunCommand(unixCommand);
            ssh.Disconnect();

Now for some reason, Appium is initiated successfully with my tested app in the emulator and all. But then, I get stuck in the RunCommand part until the session times out.
I expect to move on to ssh.Disconnect but I just get stuck there in the initiation.
Any idea?
Thanks, Pavel


#17

Here’s what I see when debugging:
2015-04-21 12:03:32:982 - info: [debug] Starting Appium in pre-launch mode
2015-04-21 12:03:32:985 - info: Pre-launching app
2015-04-21 12:03:32:987 - info: [debug] Using local app from command line: /Users/pavelzagalsky/Google Drive/Clarizen/1.1.1.7/Clarizen.app
2015-04-21 12:03:33:006 - info: [debug] Setting Xcode version
2015-04-21 12:03:33:062 - info: [debug] Setting iOS SDK Version
2015-04-21 12:03:33:117 - info: [debug] Getting sdk version from xcrun with a timeout
2015-04-21 12:03:33:124 - info: [debug] iOS SDK Version set to 8.3
2015-04-21 12:03:33:124 - info: [debug] Checking whether instruments supports our device string
2015-04-21 12:03:33:124 - info: [debug] Getting list of devices instruments supports
2015-04-21 12:03:33:130 - info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
2015-04-21 12:03:33:593 - info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.3”,“iOSSDKVersion”:“8.3”,“deviceName”:“iPhone 6”,“platformVersion”:“8.3”}
2015-04-21 12:03:33:594 - info: [debug] fixDevice is on
2015-04-21 12:03:33:594 - info: [debug] Final device string is: ‘iPhone 6 (8.3 Simulator)’
2015-04-21 12:03:33:594 - info: [debug] iOS sim UDID is 3BC16EF3-1ED3-4658-8363-FF290597CAF4
2015-04-21 12:03:33:595 - info: [debug] Detecting automation tracetemplate
2015-04-21 12:03:33:603 - info: [debug] Not auto-detecting udid, running on sim
2015-04-21 12:03:33:605 - info: [debug] Could not parse plist file (as binary) at /Users/QA/Google Drive/Clarizen/1.1.1.7/Clarizen.app/en.lproj/Localizable.strings
2015-04-21 12:03:33:605 - info: Will try to parse the plist file as XML
2015-04-21 12:03:33:605 - info: [debug] Could not parse plist file (as XML) at /Users/QA/Google Drive/Clarizen/1.1.1.7/Clarizen.app/en.lproj/Localizable.strings
2015-04-21 12:03:33:605 - warn: Could not parse app Localizable.strings assuming it doesn’t exist
2015-04-21 12:03:33:606 - info: [debug] Getting bundle ID from app
2015-04-21 12:03:33:609 - info: [debug] Parsed app Info.plist (as binary)
2015-04-21 12:03:33:610 - info: [debug] Creating instruments
2015-04-21 12:03:33:611 - info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
2015-04-21 12:03:33:612 - info: [debug] Preparing uiauto bootstrap
2015-04-21 12:03:33:612 - info: [debug] Dynamic bootstrap dir: /Users/pavelzagalsky/Library/Application Support/appium/bootstrap
2015-04-21 12:03:33:613 - info: [debug] Dynamic env: {“nodePath”:"/usr/local/bin/node",“commandProxyClientPath”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js",“instrumentsSock”:"/tmp/instruments_sock",“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“oneByOne”}
2015-04-21 12:03:33:629 - info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

2015-04-21 12:03:33:629 - info: [debug] Dynamic bootstrap path: /Users/QA/Library/Application Support/appium/bootstrap/bootstrap-20805c3827813407.js
2015-04-21 12:03:33:633 - info: [debug] Reusing dynamic bootstrap: /Users/QA/Library/Application Support/appium/bootstrap/bootstrap-20805c3827813407.js
2015-04-21 12:03:33:633 - info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.3”,“iOSSDKVersion”:“8.3”,“deviceName”:“iPhone 6”,“platformVersion”:“8.3”}
2015-04-21 12:03:33:633 - info: [debug] fixDevice is on
2015-04-21 12:03:33:634 - info: [debug] Final device string is: ‘iPhone 6 (8.3 Simulator)’
2015-04-21 12:03:33:635 - info: [debug] We’re on iOS7.1+ so forcing defaultDevice on
2015-04-21 12:03:33:635 - info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.3”,“iOSSDKVersion”:“8.3”,“deviceName”:“iPhone 6”,“platformVersion”:“8.3”}
2015-04-21 12:03:33:636 - info: [debug] fixDevice is on
2015-04-21 12:03:33:636 - info: [debug] Final device string is: ‘iPhone 6 (8.3 Simulator)’
2015-04-21 12:03:33:638 - info: [debug] Parsed app Info.plist (as binary)
2015-04-21 12:03:33:643 - info: [debug] Wrote new app Info.plist with device type
2015-04-21 12:03:33:644 - info: [debug] Checking whether we need to set app preferences
2015-04-21 12:03:33:644 - info: [debug] Running ios sim reset flow
2015-04-21 12:03:33:644 - info: [debug] Killing the simulator process
2015-04-21 12:03:33:645 - info: [debug] Killall iOS Simulator
2015-04-21 12:03:33:647 - info: [debug] Killing any other simulator daemons
2015-04-21 12:03:33:724 - info: [debug] Cleaning sim data files
2015-04-21 12:03:33:727 - info: Executing: xcrun simctl erase 3BC16EF3-1ED3-4658-8363-FF290597CAF4 with timeout 2000
2015-04-21 12:03:33:946 - info: [debug] Cleaning app data files
2015-04-21 12:03:33:947 - warn: Applications directory /Users/QA/Library/Developer/CoreSimulator/Devices/3BC16EF3-1ED3-4658-8363-FF290597CAF4/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
2015-04-21 12:03:33:947 - warn: Applications directory /Users/pavelzagalsky/Library/Developer/CoreSimulator/Devices/3BC16EF3-1ED3-4658-8363-FF290597CAF4/data/Containers/Bundle/Application doesn’t exist. Have you run this simulator before?
2015-04-21 12:03:33:947 - info: Couldn’t find app directories to delete. Probably it’s not installed
2015-04-21 12:03:33:948 - info: [debug] Not setting locale
2015-04-21 12:03:33:948 - info: [debug] No iOS / app preferences to set
2015-04-21 12:03:33:949 - info: [debug] Starting iOS 8.* simulator log capture
2015-04-21 12:03:33:966 - info: [debug] Not pre-launching simulator
2015-04-21 12:03:33:967 - info: [debug] No device id or app, not installing to real device.
2015-04-21 12:03:33:967 - info: [debug] Starting command proxy.
2015-04-21 12:03:33:972 - info: [debug] Instruments socket server started at /tmp/instruments_sock
2015-04-21 12:03:33:972 - info: [debug] Starting instruments
2015-04-21 12:03:33:978 - info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
2015-04-21 12:03:33:979 - info: Launching instruments
2015-04-21 12:03:33:987 - info: [debug] Attempting to run app on iPhone 6 (8.3 Simulator)
2015-04-21 12:03:33:989 - info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w “iPhone 6 (8.3 Simulator)” “/Users/pavelzagalsky/Google Drive/Clarizen/1.1.1.7/Clarizen.app” -e UIASCRIPT “/Users/pavelzagalsky/Library/Application Support/appium/bootstrap/bootstrap-20805c3827813407.js” -e UIARESULTSPATH /tmp/appium-instruments
2015-04-21 12:03:33:990 - info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib",“LIB_PATH”:"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6"}
2015-04-21 12:03:33:990 - info: [debug] And launch timeouts (in ms): {“global”:90000}
2015-04-21 12:03:34:503 - info: [debug] [INST] Waiting for device to boot…
2015-04-21 12:03:34:556 - info: [debug] [INST STDERR] 2015-04-21 15:03:34.555 instruments[2456:46374] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-04-21 12:03:39:237 - info: Instruments is ready to receive commands
2015-04-21 12:03:39:238 - info: [debug] Instruments launched. Starting poll loop for new commands.
2015-04-21 12:03:39:238 - info: [debug] Setting bootstrap config keys/values
2015-04-21 12:03:39:238 - info: [debug] Pushing command to appium work queue: “target = $.target();\nau = $;\n$.isVerbose = true;\n”
2015-04-21 12:03:39:240 - info: [debug] Socket data received (2 bytes)
2015-04-21 12:03:39:243 - info: [debug] Socket data being routed.
2015-04-21 12:03:39:243 - info: [debug] Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;

2015-04-21 12:03:39:285 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: evaluation finished
2015-04-21 12:03:39:286 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: responding with:
2015-04-21 12:03:39:287 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: Running system command #1: /usr/local/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:true}…
2015-04-21 12:03:39:373 - info: [debug] Socket data received (27 bytes)
2015-04-21 12:03:39:373 - info: [debug] Socket data being routed.
2015-04-21 12:03:39:374 - info: [debug] Got result from instruments: {“status”:0,“value”:true}
2015-04-21 12:03:39:374 - info: [debug] Setting initial orientation to PORTRAIT
2015-04-21 12:03:39:374 - info: [debug] Pushing command to appium work queue: “au.setScreenOrientation(‘PORTRAIT’)”
2015-04-21 12:03:39:375 - info: [debug] Sending command to instruments: au.setScreenOrientation(‘PORTRAIT’)
2015-04-21 12:03:39:475 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: Got new command 1 from instruments: au.setScreenOrientation(‘PORTRAIT’)
2015-04-21 12:03:39:475 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: evaluating au.setScreenOrientation(‘PORTRAIT’)
2015-04-21 12:03:39:476 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: target.setDeviceOrientation(“1”)
2015-04-21 12:03:39:493 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: evaluation finished
2015-04-21 12:03:39:494 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: responding with:
2015-04-21 12:03:39:495 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: Running system command #2: /usr/local/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:“PORTRAIT”}…
2015-04-21 12:03:39:588 - info: [debug] Socket data received (33 bytes)
2015-04-21 12:03:39:589 - info: [debug] Socket data being routed.
2015-04-21 12:03:39:589 - info: [debug] Got result from instruments: {“status”:0,“value”:“PORTRAIT”}
2015-04-21 12:03:39:590 - info: [debug] Waiting for app source to contain elements
2015-04-21 12:03:39:590 - info: [debug] Pushing command to appium work queue: “au.mainApp().getTreeForXML()”
2015-04-21 12:03:39:590 - info: [debug] Sending command to instruments: au.mainApp().getTreeForXML()
2015-04-21 12:03:39:617 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()
2015-04-21 12:03:39:618 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: evaluating au.mainApp().getTreeForXML()
2015-04-21 12:03:39:753 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: evaluation finished
2015-04-21 12:03:39:755 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: responding with:valid":true,“visible”:true,“hint”:null,“path”:"/0/0",“x”:0,“y”:0,“width”:375,“height”:667},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/0",“x”:8,“y”:31,“width”:28,“height”:28},">":[]}},{“UIAStaticText”:{"@":{“name”:“Label”,“label”:“Label”,“value”:“Label”,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/1",“x”:44,“y”:32,“width”:51.5,“height”:26},">":[]}},{“UIATableView”:{"@":{“name”:“Empty list”,“label”:“Empty list”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/2",“x”:0,“y”:65,“width”:335,“height”:602},">":[]}},{“UIAActivityIndicator”:{"@":{“name”:“In progress”,“label”:“In progress”,“value”:“1”,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/3",“x”:149,“y”:315,“width”:37,“height”:37},">":[]}},{“UIAImage”:{"@":{“name”:“wallpaper_login-1-1080x1920”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/4",“x”:0,“y”:0,“width”:375,“height”:667},">":[]}},{“UIAImage”:{"@":{“name”:“logo-clarizen_white”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/5",“x”:93.5,“y”:102,“width”:188,“height”:45},">":[]}},{“UIAImage”:{"@":{“name”:“icon_field-user”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/6",“x”:75.5,“y”:255,“width”:24,“height”:24},">":[]}},{“UIATextField”:{"@":{“name”:null,“label”:null,“value”:“Username”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/7",“x”:107.5,“y”:250,“width”:200,“height”:34},">":[{“UIATextField”:{"@":{“name”:null,“label”:null,“value”:“Username”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/7/0",“x”:107.5,“y”:250,“width”:200,“height”:34},">":[]}}]}},{“UIAImage”:{"@":{“name”:“icon_field-password”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/8",“x”:75.5,“y”:299,“width”:24,“height”:24},">":[]}},{“UIASecureTextField”:{"@":{“name”:null,“label”:null,“value”:“Password”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/9",“x”:107.5,“y”:294,“width”:200,“height”:34},">":[{“UIASecureTextField”:{"@":{“name”:null,“label”:null,“value”:“Password”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/9/0",“x”:107.5,“y”:294,“width”:200,“height”:34},">":[]}}]}},{“UIAButton”:{"@":{“name”:“Log in”,“label”:“Log in”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/10",“x”:67.5,“y”:338,“width”:240,“height”:35},">":[]}},{“UIAButton”:{"@":{“name”:“Forgot your password?”,“label”:“Forgot your password?”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/11",“x”:114.5,“y”:554,“width”:146,“height”:29},">":[{“UIAStaticText”:{"@":{“name”:“Forgot your password?”,“label”:“Forgot your password?”,“value”:“Forgot your password?”,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/11/0",“x”:115,“y”:560.5,“width”:145.5,“height”:16.5},">":[]}}]}},{“UIAButton”:{"@":{“name”:“Change Server”,“label”:“Change Server”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/12",“x”:140.5,“y”:608,“width”:94,“height”:29},">":[]}},{“UIAActivityIndicator”:{"@":{“name”:“Progress halted”,“label”:“Progress halted”,“value”:“0”,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/13",“x”:169,“y”:315,“width”:37,“height”:37},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/13/0",“x”:169,“y”:315,“width”:37,“height”:37},">":[]}}]}}]}},{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1",“x”:0,“y”:0,“width”:375,“height”:667},">":[]}},{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/2",“x”:0,“y”:0,“width”:375,“height”:667},">":[{“UIAStatusBar”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/2/0",“x”:0,“y”:0,“width”:375,“height”:20},">":[{“UIAElement”:{"@":{“name”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:"/0/2/0/0",“x”:6,“y”:0,“width”:38,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“3 of 3 Wi-Fi bars”,“label”:“3 of 3 Wi-Fi bars”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:"/0/2/0/1",“x”:49,“y”:0,“width”:13,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“3:03 PM”,“label”:“3:03 PM”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:"/0/2/0/2",“x”:164,“y”:0,“width”:47,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“100% battery power”,“label”:“100% battery power”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:"/0/2/0/3",“x”:345,“y”:0,“width”:25,“height”:20},">":[]}}]}}]}}]}}}
2015-04-21 12:03:39:756 - info: [debug] [INST] 2015-04-21 12:03:39 +0000 Debug: Running system command #3: /usr/local/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:{“UIAApplication”:{"@":{“name”:“Clarizen”,“label”:“Clarizen”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“vis…
2015-04-21 12:03:39:786 - info: [debug] Socket data received (6294 bytes)
2015-04-21 12:03:39:786 - info: [debug] Socket data being routed.
2015-04-21 12:03:39:787 - info: [debug] Got result from instruments: {“status”:0,“value”:{“UIAApplication”:{”@":{“name”:“Clarizen”,“label”:“Clarizen”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0",“x”:0,“y”:20,“width”:375,“height”:647},">":[{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,"
2015-04-21 12:03:39:788 - info: [debug] Device launched! Ready for commands
2015-04-21 12:03:39:788 - info: [debug] Setting command timeout to the default of 60 secs
2015-04-21 12:03:39:789 - info: Welcome to Appium v1.3.6 (REV 004f52f249d3513809e7d0734d9205d1fec19f8e)
2015-04-21 12:03:39:789 - info: Appium REST http interface listener started on 127.0.0.1:4739
2015-04-21 12:03:39:792 - info: [debug] Non-default server args: {“app”:"/Users/pavelzagalsky/Google Drive/Clarizen/1.1.1.7/Clarizen.app",“address”:“127.0.0.1”,“port”:4739,“launch”:true,“log”:"/Users/QA/Library/Logs/Appium/1.log",“deviceName”:“iPhone 6”,“platformName”:“iOS”,“platformVersion”:“8.3”,“browserName”:“iOS”}
2015-04-21 12:03:39:793 - info: Console LogLevel: debug
2015-04-21 12:03:39:793 - info: File LogLevel: debug
2015-04-21 12:04:39:794 - info: [debug] Didn’t get a new command in 60 secs, shutting down…
2015-04-21 12:04:39:795 - info: Shutting down appium session
2015-04-21 12:04:39:795 - info: [debug] Stopping ios
2015-04-21 12:04:39:797 - info: [debug] Destroying instruments client socket.
2015-04-21 12:04:39:798 - info: [debug] Closing socket server.
2015-04-21 12:04:39:798 - info: [debug] Instruments socket server was closed
2015-04-21 12:04:39:799 - info: [debug] Sending sigterm to instruments
2015-04-21 12:04:39:802 - info: [debug] [INST] 2015-04-21 12:04:39 +0000 Stopped: Script was stopped by the user
2015-04-21 12:04:39:855 - info: [debug] [INST] 2015-04-21 12:04:39 +0000 Error: Script threw an uncaught JavaScript error: JSON Parse error: Unexpected EOF on line 2589 of bootstrap-20805c3827813407.js
2015-04-21 12:04:39:913 - info: [debug] [INST STDERR] 2015-04-21 15:04:39.912 instruments[2456:46376] Attempting to set event horizon when core is not engaged, request ignored
2015-04-21 12:04:39:914 - info: [debug] [INST STDERR] 2015-04-21 15:04:39.912 instruments[2456:46370] Attempting to set event horizon when core is not engaged, request ignored
2015-04-21 12:04:39:964 - info: [debug] [INST STDERR] 2015-04-21 15:04:39.963 instruments[2456:46372] Attempting to set event horizon when core is not engaged, request ignored
2015-04-21 15:04:39.964 instruments[2456:46372] Attempting to set event horizon when core is not engaged, request ignored
2015-04-21 12:04:40:439 - info: [debug] [INST] Instruments Trace Complete (Duration : 63.576191s; Output : /tmp/appium-instruments/instrumentscli0.trace)
2015-04-21 12:04:40:461 - info: [debug] [INSTSERVER] Instruments exited with code 0
2015-04-21 12:04:40:462 - info: [debug] Cleaning up after instruments exit
2015-04-21 12:04:40:463 - info: [debug] Stopping iOS log capture
2015-04-21 12:04:40:463 - info: [debug] Running ios sim reset flow
2015-04-21 12:04:40:463 - info: [debug] Killing the simulator process
2015-04-21 12:04:40:464 - info: [debug] Killall iOS Simulator
2015-04-21 12:04:40:467 - info: [debug] Killing any other simulator daemons
2015-04-21 12:04:40:540 - info: [debug] Cleaning sim data files
2015-04-21 12:04:40:543 - info: Executing: xcrun simctl erase 3BC16EF3-1ED3-4658-8363-FF290597CAF4 with timeout 2000
2015-04-21 12:04:40:756 - info: [debug] Cleaning app data files
2015-04-21 12:04:40:756 - warn: Applications directory /Users/QA/Library/Developer/CoreSimulator/Devices/3BC16EF3-1ED3-4658-8363-FF290597CAF4/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
2015-04-21 12:04:40:757 - warn: Applications directory /Users/QA/Library/Developer/CoreSimulator/Devices/3BC16EF3-1ED3-4658-8363-FF290597CAF4/data/Containers/Bundle/Application doesn’t exist. Have you run this simulator before?
2015-04-21 12:04:40:757 - info: Couldn’t find app directories to delete. Probably it’s not installed
2015-04-21 12:04:40:757 - info: [debug] Cleaning up appium session
2015-04-21 12:04:40:758 - info: [debug] We shut down because no new commands came in


#18

Please let me know Steps for MAC.
Thanks,
AJ.


#19

The execution is blocked until the connection that you have started with the RunCommand terminates. You can use Threads to overcome this. Or a simpler solution would be to use the solution I proposed here.


#20

Hi, how do you call this Appium.command file from Eclipse? Got a kind of stuck…


#21

@ildi, My scripts are executed by ant tool before calling the ant i’m calling the appium.command batch file

Appium.command content-

/usr/local/bin/appium

Ant.command content-

cd ‘dirname $0’ (to change directory to current directory )

open appium.command(To call the appium.command file in directory)

ant


#22

How To Create Bash File in iOS ?
Please Help.

Thanks,
Ajit.


#23

@AjitJ http://www.maclife.com/article/columns/terminal_101_automate_terminal_bash_scripts


#24

Hello Hassn,

Please look into this:

Samples-Mac-mini:~ Sampleit$ /bin/sh /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 127.0.0.1 --chromedriver-port 9516 --bootstrap-port 4725 --no-reset --local-timezone
/Applications/Appium.app/Contents/Resources/node/bin/node: /Applications/Appium.app/Contents/Resources/node/bin/node: cannot execute binary file
Samples-Mac-mini:~ Sampleit$


#25

@AjitJ
If you are typing the command in your terminal, you should remove the “/bin/sh” part. You only add it when you are executing from inside Java.


#26

Coooooool…Its Working Fine.

Thanks a LOT…
:grinning:


#27

Hello Hassan,

Please Look into This,

As I am trying to execute(Launhching) Appium Server from Jenkins Shell Command its showing Error as Below…

[31merrore[39m: Appium will not work if used or installed with sudo. Please rerun/install as a non-root user. If you had to install Appium using sudo npm install -g appium, the solution is to reinstall Node using a method (Homebrew, for example) that doesn’t require sudo to install global npm packages.
Build step ‘Execute shell’ marked build as failure
Finished: FAILURE

Please Help,
Thanks,
Ajit Jadhav.


#28

@AjitJ
The error message is self explanatory. Please uninstall Appium and reinstall it again without the “sudo” command as Appium can’t work if it was installed with Sudo command on Mac OS environment.


#29

but it works properly if executed from Terminal.


#30

Thanks. Its working.


#31

Hi Guys,

I am unable to starting iOS webkit debug proxy server and get iPhone information( UDID, Device Name and Device Version) from Terminal Using Java Code in mac machine. Is it possible to get the iOS device information from terminal using java code in mac machine. This is priority work for me. Please help me any one.

Thanks in advance.


#32

HI @Hassan_Radi

How can I start Appium sever from command prompt using external appium package. I have GUI of 1.4.8 and I am referring 1.4.12 code.

If I used below command, then it is picking up 1.4.8
/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js --address 127.0.0.1 --port 4723 --no-reset --show-ios-log --launch-timeout “120000”

Do you know which argument I should add for “External Appium Package”

Thanks
Sunny Sachdeva


#33

@sunny_sachdeva

You need to change this line to refer to the location of the 1.4.12 package.