Appium server hangs when started from Java code

Hi,
I am trying to open the appium server from Java code.
I opened is using Process with the command /bin/sh -c appium
I also open ios_webkit_debugger_proxy from Java code:
ios_webkit_debugger_proxy -c udid: 27753 -d

Mac OS X 10.9.4
iPhone 5s iOS 7.1.2
Appium 1.3.4
Node 0.10
The app is a hhybrid app and I need to switch to the WebView context at the beginning of the test.

For some reason the elements cannot be found when Appium is started this way. If I open both Appium and Ios Webkit from terminal, using the same commnads, everything runs fine.

The Log of appium is:
IosWebKitJob is running.
OUTPUT> e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{“desiredCapabilities”:{“newCommandTimeout”:“10000”,“platformVersion”:“7.1.2”,“app”:"/Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app",“autoWebviewTimeout”:“25000”,“deviceName”:“ngtvs iPhone”,“platformName”:“iOS”,“fullReset”:“false”,“udid”:“ea2334bcdb592360912314de2f33be8bf5b40462”,“noReset”:“true”}}e[39m
OUTPUT> e[36minfoe[39m: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
OUTPUT> e[33mwarne[39m: Converting cap fullReset from string to boolean. This might cause unexpected behavior.
OUTPUT> e[33mwarne[39m: Converting cap noReset from string to boolean. This might cause unexpected behavior.
OUTPUT> e[36minfoe[39m: [debug] Using local app from desired caps: /Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app
OUTPUT> e[36minfoe[39m: [debug] Creating new appium session 7139ec78-921a-46d2-910c-70215b858c79
OUTPUT> e[36minfoe[39m: [debug] Removing any remaining instruments sockets
OUTPUT> e[36minfoe[39m: [debug] Cleaned up instruments socket /tmp/instruments_sock
OUTPUT> e[36minfoe[39m: [debug] Setting Xcode folder
OUTPUT> e[36minfoe[39m: [debug] Setting Xcode version
OUTPUT> e[36minfoe[39m: [debug] Setting iOS SDK Version
OUTPUT> e[36minfoe[39m: [debug] Getting sdk version from xcrun with a timeout
OUTPUT> e[36minfoe[39m: [debug] iOS SDK Version set to 8.1
OUTPUT> e[36minfoe[39m: [debug] Not checking whether simulator is available since we’re on a real device
OUTPUT> e[36minfoe[39m: [debug] Detecting automation tracetemplate
OUTPUT> e[36minfoe[39m: [debug] Not auto-detecting udid, running on sim
OUTPUT> e[36minfoe[39m: [debug] Could not parse plist file (as binary) at /Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app/en.lproj/Localizable.strings
OUTPUT> e[36minfoe[39m: Will try to parse the plist file as XML
OUTPUT> parseFileSync() is deprecated. Use parseStringSync() instead.
OUTPUT> e[36minfoe[39m: [debug] Could not parse plist file (as XML) at /Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app/en.lproj/Localizable.strings
OUTPUT> e[33mwarne[39m: Could not parse app Localizable.strings; assuming it doesn’t exist
OUTPUT> e[36minfoe[39m: [debug] Getting bundle ID from app
OUTPUT> e[36minfoe[39m: [debug] Could not parse plist file (as binary) at /Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app/Info.plist
OUTPUT> e[36minfoe[39m: Will try to parse the plist file as XML
OUTPUT> parseStringSync() is deprecated. Use parse() instead.
OUTPUT> e[36minfoe[39m: [debug] Parsed app Info.plist (as XML)
OUTPUT> e[36minfoe[39m: [debug] Creating instruments
OUTPUT> e[36minfoe[39m: 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
OUTPUT> e[36minfoe[39m: [debug] Preparing uiauto bootstrap
OUTPUT> e[36minfoe[39m: [debug] Dynamic bootstrap dir: /Users/ngtv/Library/Application Support/appium/bootstrap
OUTPUT> e[36minfoe[39m: [debug] Dynamic env: {“nodePath”:"/usr/local/Cellar/node/0.10.33_1/bin/node",“commandProxyClientPath”:"/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js",“instrumentsSock”:"/tmp/instruments_sock",“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“sendKeyStrategy”:“grouped”}
OUTPUT> e[36minfoe[39m: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
OUTPUT> …
OUTPUT> e[36minfoe[39m: [debug] Dynamic bootstrap path: /Users/ngtv/Library/Application Support/appium/bootstrap/bootstrap-53ce4583016f26ea.js
OUTPUT> e[36minfoe[39m: [debug] Reusing dynamic bootstrap: /Users/ngtv/Library/Application Support/appium/bootstrap/bootstrap-53ce4583016f26ea.js
OUTPUT> e[36minfoe[39m: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“ngtvs iPhone”,“platformVersion”:“7.1.2”}
OUTPUT> e[36minfoe[39m: [debug] fixDevice is on
OUTPUT> e[36minfoe[39m: [debug] Final device string is: ‘ngtvs iPhone (7.1.2 Simulator)’
OUTPUT> e[36minfoe[39m: [debug] Not setting device type since we’re on a real device
OUTPUT> e[36minfoe[39m: [debug] Checking whether we need to set app preferences
OUTPUT> e[36minfoe[39m: [debug] Not setting iOS and app preferences since we’re on a real device
OUTPUT> e[36minfoe[39m: [debug] Reset not set, not ending sim or cleaning up app state
OUTPUT> e[36minfoe[39m: [debug] Not setting locale because we’re using a real device
OUTPUT> e[36minfoe[39m: [debug] No iOS / app preferences to set
OUTPUT> e[36minfoe[39m: [debug] Starting iOS device log capture via deviceconsole
OUTPUT> e[36minfoe[39m: [debug] Not pre-launching simulator
OUTPUT> e[36minfoe[39m: [debug] Creating iDevice object with udid ea2334bcdb592360912314de2f33be8bf5b40462
OUTPUT> e[36minfoe[39m: [debug] Checking app install status using: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id ea2334bcdb592360912314de2f33be8bf5b40462 --bundle *
OUTPUT> e[36minfoe[39m: [debug] App is not installed. Will try to install the app.
OUTPUT> e[36minfoe[39m: [debug] Installing app using cmd: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap install --id ea2334bcdb592360912314de2f33be8bf5b40462 --bundle “/Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app”
OUTPUT> e[36minfoe[39m: [debug] Starting command proxy.
OUTPUT> e[36minfoe[39m: [debug] Instruments socket server started at /tmp/instruments_sock
OUTPUT> e[36minfoe[39m: [debug] Starting instruments
OUTPUT> e[36minfoe[39m: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
OUTPUT> e[36minfoe[39m: Launching instruments
OUTPUT> e[36minfoe[39m: [debug] Attempting to run app on real device with UDID ea2334bcdb592360912314de2f33be8bf5b40462
OUTPUT> e[36minfoe[39m: [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 ea2334bcdb592360912314de2f33be8bf5b40462 * -e UIASCRIPT “/Users/ngtv/Library/Application Support/appium/bootstrap/bootstrap-53ce4583016f26ea.js” -e UIARESULTSPATH /tmp/appium-instruments
OUTPUT> e[36minfoe[39m: [debug] And extra without-delay env: {}
OUTPUT> e[36minfoe[39m: [debug] And launch timeouts (in ms): {“global”:90000}
OUTPUT> e[36minfoe[39m: [debug] e[33m[INST STDERR] 2014-12-19 10:53:55.113 instruments[675:1003] WebKit Threading Violation - initial use of WebKit from a secondary thread.e[39m
OUTPUT> e[36minfoe[39m: Instruments is ready to receive commands
OUTPUT> e[36minfoe[39m: [debug] Instruments launched. Starting poll loop for new commands.
OUTPUT> e[36minfoe[39m: [debug] Setting bootstrap config keys/values
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “target = $.target();\nau = $;\n$.isVerbose = true;\n”
OUTPUT> e[36minfoe[39m: [debug] Socket data received (2 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: target = $.target();
OUTPUT> au = $;
OUTPUT> $.isVerbose = true;
OUTPUT>
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:01 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:01 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:01 +0000 Debug: Running system command #1: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:true}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (27 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:true}
OUTPUT> e[36minfoe[39m: [debug] Setting initial orientation to PORTRAIT
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.setScreenOrientation(‘PORTRAIT’)”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.setScreenOrientation(‘PORTRAIT’)
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:02 +0000 Debug: Got new command 1 from instruments: au.setScreenOrientation(‘PORTRAIT’)e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:02 +0000 Debug: evaluating au.setScreenOrientation(‘PORTRAIT’)e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:02 +0000 Debug: target.setDeviceOrientation(“1”)e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:03 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:03 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:03 +0000 Debug: Running system command #2: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:“PORTRAIT”}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (33 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:“PORTRAIT”}
OUTPUT> e[36minfoe[39m: [debug] Waiting for app source to contain elements
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.mainApp().getTreeForXML()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.mainApp().getTreeForXML()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:04 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:04 +0000 Debug: evaluating au.mainApp().getTreeForXML()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:04 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:04 +0000 Debug: responding with:“visible”:true,“hint”:null,“path”:"/0/0",“x”:0,“y”:0,“width”:320,“height”:568},">":[{“UIAScrollView”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/0",“x”:0,“y”:0,“width”:320,“height”:568},">":[{“UIAWebView”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/0/0",“x”:0,“y”:0,“width”:320,“height”:568},">":[]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/0/1",“x”:316.5,“y”:0,“width”:3.5,“height”:568},">":[]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/0/2",“x”:0,“y”:564.5,“width”:320,“height”:3.5},">":[]}}]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/0/1",“x”:0,“y”:0,“width”:320,“height”:568},">":[]}},{“UIAActivityIndicator”:{"@":{“name”:“In progress”,“label”:“In progress”,“value”:“1”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/2",“x”:150,“y”:274,“width”:20,“height”:20},">":[]}},{“UIAStaticText”:{"@":{“name”:“The current net is wifi.”,“label”:“The current net is wifi.”,“value”:“The current net is wifi.”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/3",“x”:84.52000427246094,“y”:530.10498046875,“width”:150.95999145507812,“height”:17.895000457763672},">":[]}}]}},{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1",“x”:0,“y”:0,“width”:320,“height”:568},">":[{“UIAStatusBar”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/0",“x”:0,“y”:0,“width”:320,“height”:20},">":[{“UIAElement”:{"@":{“name”:“No SIM”,“label”:“No SIM”,“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/1/0/0",“x”:6,“y”:0,“width”:42,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“3 of 3 Wi-Fi bars”,“label”:“3 of 3 Wi-Fi bars”,“value”:“WLAN-82HK3A”,“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/1/0/1",“x”:53,“y”:0,“width”:13,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“11:54”,“label”:“11:54”,“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/1/0/2",“x”:146,“y”:0,“width”:29,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“100% battery power, On AC Power”,“label”:“100% battery power, On AC 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/1/0/3",“x”:282,“y”:0,“width”:33,“height”:20},">":[]}}]}}]}}]}}}e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:54:04 +0000 Debug: Running system command #3: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:{“UIAApplication”:{"@":{“name”:“DT”,“label”:“DT”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:n…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (3702 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:{“UIAApplication”:{"@":{“name”:“DT”,“label”:“DT”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0",“x”:0,“y”:20,“width”:320,“height”:548},">":[{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,
OUTPUT> e[36minfoe[39m: [debug] Device launched! Ready for commands
OUTPUT> e[36minfoe[39m: [debug] Setting command timeout to 10000 secs
OUTPUT> e[36minfoe[39m: [debug] Appium session started with sessionId 7139ec78-921a-46d2-910c-70215b858c79
OUTPUT> e[36minfoe[39m: e[37m<-- POST /wd/hub/session e[39me[36m303e[39me[90m 25170.774 ms - 9e[39m e[90me[39m
OUTPUT> e[36minfoe[39m: e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79e[39m e[90m{}e[39m
OUTPUT> e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:{“webStorageEnabled”:false,“locationContextEnabled”:false,“browserName”:“iOS”,“platform”:“MAC”,“javascriptEnabled”:true,“databaseEnabled”:false,“takesScreenshot”:true,“networkConnectionEnabled”:false,“warnings”:{},“desired”:{“newCommandTimeout”:“10000”,“platformVersion”:“7.1.2”,“app”:"/Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app",“autoWebviewTimeout”:“25000”,“deviceName”:“ngtvs iPhone”,“platformName”:“iOS”,“fullReset”:false,“udid”:“ea2334bcdb592360912314de2f33be8bf5b40462”,“noReset”:true},“newCommandTimeout”:“10000”,“platformVersion”:“7.1.2”,“app”:"/Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app",“autoWebviewTimeout”:“25000”,“deviceName”:“ngtvs iPhone”,“platformName”:“iOS”,“fullReset”:false,“udid”:“ea2334bcdb592360912314de2f33be8bf5b40462”,“noReset”:true},“sessionId”:“7139ec78-921a-46d2-910c-70215b858c79”}
OUTPUT> e[36minfoe[39m: e[37m<-- GET /wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79 e[39me[32m200e[39me[90m 2.619 ms - 938e[39m e[90m{“status”:0,“value”:{“webStorageEnabled”:false,“locationContextEnabled”:false,“browserName”:“iOS”,“platform”:“MAC”,“javascriptEnabled”:true,“databaseEnabled”:false,“takesScreenshot”:true,“networkConnectionEnabled”:false,“warnings”:{},“desired”:{“newCommandTimeout”:“10000”,“platformVersion”:“7.1.2”,“app”:"/Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app",“autoWebviewTimeout”:“25000”,“deviceName”:“ngtvs iPhone”,“platformName”:“iOS”,“fullReset”:false,“udid”:“ea2334bcdb592360912314de2f33be8bf5b40462”,“noReset”:true},“newCommandTimeout”:“10000”,“platformVersion”:“7.1.2”,“app”:"/Users/ngtv/Projects/repository/git-bare/automation-appium/src/test/resources/phone/EasyHome.app",“autoWebviewTimeout”:“25000”,“deviceName”:“ngtvs iPhone”,“platformName”:“iOS”,“fullReset”:false,“udid”:“ea2334bcdb592360912314de2f33be8bf5b40462”,“noReset”:true},“sessionId”:“7139ec78-921a-46d2-910c-70215b858c79”}e[39m
trying to switch to WEBVIEW context…
OUTPUT> e[36minfoe[39m: e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79/contextse[39m e[90m{}e[39m
OUTPUT> e[36minfoe[39m: [debug] e[90m[REMOTE] Getting WebKitRemoteDebugger pageArraye[39m
OUTPUT> e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:[“NATIVE_APP”,“WEBVIEW_1”],“sessionId”:“7139ec78-921a-46d2-910c-70215b858c79”}
OUTPUT> e[36minfoe[39m: e[37m<-- GET /wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79/contexts e[39me[32m200e[39me[90m 7.759 ms - 98e[39m e[90m{“status”:0,“value”:[“NATIVE_APP”,“WEBVIEW_1”],“sessionId”:“7139ec78-921a-46d2-910c-70215b858c79”}e[39m
Loaded contexts are: [NATIVE_APP, WEBVIEW_1]
OUTPUT> e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79/contexte[39m e[90m{“name”:“WEBVIEW_1”}e[39m
OUTPUT> e[36minfoe[39m: [debug] Attempting to set context to ‘WEBVIEW_1’
OUTPUT> e[36minfoe[39m: [debug] e[90m[REMOTE] Debugger web socket connected to url [ws://localhost:27753/devtools/page/1]e[39m
OUTPUT> e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:“WEBVIEW_1”,“sessionId”:“7139ec78-921a-46d2-910c-70215b858c79”}
OUTPUT> e[36minfoe[39m: e[37m<-- POST /wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79/context e[39me[32m200e[39me[90m 19.909 ms - 83e[39m e[90m{“status”:0,“value”:“WEBVIEW_1”,“sessionId”:“7139ec78-921a-46d2-910c-70215b858c79”}e[39m
OUTPUT> e[36minfoe[39m: e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79/contexte[39m e[90m{}e[39m
OUTPUT> e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:“WEBVIEW_1”,“sessionId”:“7139ec78-921a-46d2-910c-70215b858c79”}
OUTPUT> e[36minfoe[39m: e[37m<-- GET /wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79/context e[39me[32m200e[39me[90m 0.865 ms - 83e[39m e[90m{“status”:0,“value”:“WEBVIEW_1”,“sessionId”:“7139ec78-921a-46d2-910c-70215b858c79”}e[39m
Switched to context… WEBVIEW_1
Core Before
Verify Home Page elements
OUTPUT> e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/7139ec78-921a-46d2-910c-70215b858c79/elemente[39m e[90m{“using”:“id”,“value”:“Image_Home_Back”}e[39m
OUTPUT> e[36minfoe[39m: [debug] Waiting up to 0ms for condition
OUTPUT> e[36minfoe[39m: [debug] e[90m[REMOTE] Executing ‘find_element’ atom in default contexte[39m
OUTPUT> e[36minfoe[39m: [debug] e[90m[REMOTE] Sending javascript commande[39m
OUTPUT> e[36minfoe[39m: [debug] e[90m[REMOTE] Remote debugger data sent [{“method”:“Runtime.evaluate”,“params”:{“objectGroup”:“console”,“includeCommandLineAPI”:true,“doNotPauseOnExceptionsAndMuteConsole”:true,“expression”:"(function(){return function(){function h(a){return…]e[39m
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:20 +0000 Debug: Got new command 3 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:20 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:20 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:20 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:20 +0000 Debug: Running system command #4: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:21 +0000 Debug: Got new command 4 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:21 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:21 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:21 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:21 +0000 Debug: Running system command #5: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:22 +0000 Debug: Got new command 5 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:22 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:22 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:22 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:22 +0000 Debug: Running system command #6: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:23 +0000 Debug: Got new command 6 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:23 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:23 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:23 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:23 +0000 Debug: Running system command #7: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:24 +0000 Debug: Got new command 7 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:24 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:24 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:24 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:24 +0000 Debug: Running system command #8: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:25 +0000 Debug: Got new command 8 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:25 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:26 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:26 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:26 +0000 Debug: Running system command #9: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:27 +0000 Debug: Got new command 9 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:27 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:27 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:27 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:27 +0000 Debug: Running system command #10: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:28 +0000 Debug: Got new command 10 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:28 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:28 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:28 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:28 +0000 Debug: Running system command #11: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:29 +0000 Debug: Got new command 11 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:29 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:29 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:29 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:29 +0000 Debug: Running system command #12: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:30 +0000 Debug: Got new command 12 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:30 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:30 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:30 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:30 +0000 Debug: Running system command #13: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}
OUTPUT> e[36minfoe[39m: [debug] atom did not return yet, checking to see if we are blocked by an alert
OUTPUT> e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.alertIsPresent()”
OUTPUT> e[36minfoe[39m: [debug] Sending command to instruments: au.alertIsPresent()
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:31 +0000 Debug: Got new command 13 from instruments: au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:31 +0000 Debug: evaluating au.alertIsPresent()e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:31 +0000 Debug: evaluation finishede[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:31 +0000 Debug: responding with:e[39m
OUTPUT> e[36minfoe[39m: [debug] e[32m[INST] 2014-12-19 08:55:31 +0000 Debug: Running system command #14: /usr/local/Cellar/node/0.10.33_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:false}…e[39m
OUTPUT> e[36minfoe[39m: [debug] Socket data received (28 bytes)
OUTPUT> e[36minfoe[39m: [debug] Socket data being routed.
OUTPUT> e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:false}

How to resolve this issue?

This is a very old post. Now you can start de Appium server programatically, please search the post with the appium update - for java client it was 3.4.0 I think

I am able to launch Appium programatically ,Some times appium is hanging continuously by displaing au.alertisdisplayed() in the appium logs.I am using latest java client only .How did you resolve this issue?.

If the data is huge in the application and you are using Xpath locator then only you will face this issue. Please don’t use xpath as class when data is huge.