Instruments exiting on startup

We are trying to run some automation on real devices and cannot get instruments to start up.

OSX: 10.10
iOS: 7.1
Appium: 1.3.4
Xcode: 6.1.1

Nearly every time we try and start the test, the instruments process fails with the message:

info: [debug] [INSTSERVER] Instruments exited with code 0

This is a bit odd, as instruments is still visible in activity monitor. Still, Appium kills it and tries again, but we get the same thing.

The other posts I’ve read on this suggest running the 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 173806281f89a72546c2c82cf37da3d113d6951a com.thetestpeople.SafariLauncher -e UIASCRIPT "/Users/mobiletest/Library/Application Support/appium/bootstrap/bootstrap-2807cf70fc8a8843.js"

but we get this error:

2015-01-23 11:29:11 +0000 Error: Script threw an uncaught JavaScript error: JSON Parse error: Invalid number on line 2567 of bootstrap-2807cf70fc8a8843.js
2015-01-23 11:29:12 +0000 Stopped: Script was stopped by the user
Instruments Trace Complete (Duration : 8.871321s; Output : /tmp/appium-instruments/instrumentscli0.trace)

That line of bootstrap-xxx.js is actually blank, but it’s just below sendResultAndGetNext.

Any ideas? We’re pretty close to giving up now.

Can you provide appium logs?

Sure, here you are. We just tried another phone on iOS 8.1 and got the same error.

info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {“log”:“/Users/mobiletest/appium.log”,“defaultCommandTimeout”:0}
info: Console LogLevel: debug
info: File LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“iPhone”,“browserVersion”:“600.1.4”,“udid”:“6f5f37413b9a6d375557efe9779d0722374b3df4”,“javascriptEnabled”:true,“app”:“/Users/mobiletest/SafariLauncher/app/8.1/SafariLauncher.app”,“platform”:“MAC”,“browserName”:“safari”,“version”:“”,“platformVersion”:“8.1”,“platformName”:“iOS”}}
info: Client User-Agent string: Python-urllib/2.7
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : browserVersion, javascriptEnabled, platform, version
info: [debug] Configuring Safari session
info: [debug] Using local app from desired caps: /Users/mobiletest/SafariLauncher/app/8.1/SafariLauncher.app
info: [debug] Creating new appium session a0a99b3a-30c9-47ff-9ad3-83103ab471fc
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.1
info: [debug] Not checking whether simulator is available since we’re on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Users/mobiletest/SafariLauncher/app/8.1/SafariLauncher.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
parseFileSync() is deprecated. Use parseStringSync() instead.
info: [debug] Could not parse plist file (as XML) at /Users/mobiletest/SafariLauncher/app/8.1/SafariLauncher.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings; assuming it doesn’t exist
info: [debug] Getting bundle ID from app
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Creating instruments
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
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/mobiletest/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:“/usr/local/bin/node/bin/node”,“commandProxyClientPath”:“/usr/local/bin/node/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”}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do no…anually modify!
info: [debug] Dynamic bootstrap path: /Users/mobiletest/Library/Application Support/appium/bootstrap/bootstrap-2807cf70fc8a8843.js
info: [debug] Reusing dynamic bootstrap: /Users/mobiletest/Library/Application Support/appium/bootstrap/bootstrap-2807cf70fc8a8843.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“iPhone”,“platformVersion”:“8.1”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone (8.1)’
info: [debug] Not setting device type since we’re on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we’re on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we’re using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Not pre-launching simulator
info: [debug] Checking app install status using: /usr/local/bin/node/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 6f5f37413b9a6d375557efe9779d0722374b3df4 --bundle com.thetestpeople.SafariLauncher
info: [debug] Installing app using cmd: /usr/local/bin/node/lib/node_modules/appium/build/fruitstrap/fruitstrap install --id 6f5f37413b9a6d375557efe9779d0722374b3df4 --bundle “/Users/mobiletest/SafariLauncher/app/8.1/SafariLauncher.app”
info: [debug] Starting command proxy.
info: [debug] Command proxy started
info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 6f5f37413b9a6d375557efe9779d0722374b3df4
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 6f5f37413b9a6d375557efe9779d0722374b3df4 com.thetestpeople.SafariLauncher -e UIASCRIPT “/Users/mobiletest/Library/Application Support/appium/bootstrap/bootstrap-2807cf70fc8a8843.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] JM waiting for exit
info: [debug] [INST STDERR] 2015-01-23 12:09:17.333 instruments[2704:45398] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: Instruments is ready to receive commands
info: [debug] JM launchHandler
info: [debug] JM launched ok
info: [debug] Instruments launched. Starting poll loop for new commands.
info: [debug] Setting bootstrap config keys/values
info: [debug] Pushing command to appium work queue: “target = $.target();\nau = $;\n$.isVerbose = true;\n”
info: [debug] Socket data received (2 bytes)
info: [debug] Socket data being routed.
info: [debug] Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;

info: [debug] [INST] 2015-01-23 12:09:21 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-01-23 12:09:21 +0000 Debug: responding with:
info: [debug] [INST] 2015-01-23 12:09:21 +0000 Debug: Running system command #1: /usr/local/bin/node/bin/node /usr/local/bin/node/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:true}…
info: [debug] Socket data received (27 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:true}
info: [debug] Setting initial orientation to PORTRAIT
info: [debug] Pushing command to appium work queue: “au.setScreenOrientation(‘PORTRAIT’)”
info: [debug] Sending command to instruments: au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2015-01-23 12:09:22 +0000 Debug: Got new command 1 from instruments: au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2015-01-23 12:09:22 +0000 Debug: evaluating au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2015-01-23 12:09:22 +0000 Debug: target.setDeviceOrientation(“1”)
info: [debug] [INST] 2015-01-23 12:09:23 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-01-23 12:09:23 +0000 Debug: responding with:
2015-01-23 12:09:23 +0000 Debug: Running system command #2: /usr/local/bin/node/bin/node /usr/local/bin/node/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:“PORTRAIT”}…
info: [debug] Socket data received (33 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:“PORTRAIT”}
info: [debug] Waiting for app source to contain elements
info: [debug] Pushing command to appium work queue: “au.mainApp().getTreeForXML()”
info: [debug] Sending command to instruments: au.mainApp().getTreeForXML()
info: [debug] [INST] 2015-01-23 12:09:24 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()
info: [debug] [INST] 2015-01-23 12:09:24 +0000 Debug: evaluating au.mainApp().getTreeForXML()
info: [debug] [INST] 2015-01-23 12:09:24 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-01-23 12:09:24 +0000 Debug: responding with:d":true,“visible”:false,“hint”:null,“path”:“/0/0”,“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/1”,“x”:0,“y”:0,“width”:375,“height”:667},“>”:[{“UIAButton”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:false,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/1/0”,“x”:0,“y”:0,“width”:375,“height”:64.5},“>”:}},{“UIAButton”:{“@”:{“name”:“URL”,“label”:“Address”,“value”:“‎apple.com”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Double-tap to show controls”,“path”:“/0/1/1”,“x”:9.5,“y”:24.5,“width”:356,“height”:29},“>”:[{“UIAElement”:{“@”:{“name”:“URL”,“label”:“‎apple.com”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Double-tap to show controls”,“path”:“/0/1/1/0”,“x”:11.5,“y”:24.5,“width”:352,“height”:29},“>”:}},{“UIAButton”:{“@”:{“name”:“ReloadButton”,“label”:“reload”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/1/1”,“x”:336.5,“y”:24.5,“width”:29,“height”:29},“>”:}}]}},{“UIAButton”:{“@”:{“name”:“Cancel”,“label”:“Cancel”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/1/2”,“x”:379.5,“y”:24.5,“width”:56,“height”:29},“>”:}},{“UIAScrollView”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/3”,“x”:0,“y”:20,“width”:375,“height”:647},“>”:[{“UIAScrollView”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/3/0”,“x”:0,“y”:0,“width”:375,“height”:667},“>”:[{“UIAWebView”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/3/0/0”,“x”:0,“y”:64,“width”:375,“height”:1381},“>”:[{“UIAButton”:{“@”:{“name”:“Menu”,“label”:“Menu”,“value”:“”,“dom”:{“id”:“gh-svg-icons”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/0”,“x”:0,“y”:64,“width”:48,“height”:48},“>”:}},{“UIALink”:{“@”:{“name”:“Apple”,“label”:“Apple”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/1”,“x”:187,“y”:63,“width”:44,“height”:19},“>”:[{“UIALink”:{“@”:{“name”:“Apple”,“label”:“Apple”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/1/0”,“x”:187,“y”:63,“width”:44,“height”:19},“>”:[{“UIAStaticText”:{“@”:{“name”:“Apple”,“label”:“Apple”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/1/0/0”,“x”:187,“y”:63,“width”:44,“height”:19},“>”:}}]}}]}},{“UIALink”:{“@”:{“name”:“Start something new. When you start with amazing products, you can create amazing things.”,“label”:“Start something new. When you start with amazing products, you can create amazing things.”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2”,“x”:0,“y”:112,“width”:375,“height”:392},“>”:[{“UIALink”:{“@”:{“name”:“Start something new.”,“label”:“Start something new.”,“value”:“1”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/0”,“x”:58,“y”:137,“width”:259,“height”:35},“>”:[{“UIAStaticText”:{“@”:{“name”:“Start something new.”,“label”:“Start something new.”,“value”:“1”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/0/0”,“x”:58,“y”:137,“width”:259,“height”:35},“>”:}}]}},{“UIALink”:{“@”:{“name”:“When you start with amazing products, you can create amazing things.”,“label”:“When you start with amazing products, you can create amazing things.”,“value”:“2”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/1”,“x”:63,“y”:175,“width”:249,“height”:42},“>”:[{“UIAStaticText”:{“@”:{“name”:“When you start with amazing products, you can create amazing things.”,“label”:“When you start with amazing products, you can create amazing things.”,“value”:“2”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/1/0”,“x”:63,“y”:175,“width”:249,“height”:42},“>”:}}]}},{“UIALink”:{“@”:{“name”:“View the gallery, ”,“label”:“View the gallery, ”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/2”,“x”:131,“y”:221,“width”:114,“height”:25},“>”:[{“UIALink”:{“@”:{“name”:“View the gallery, ”,“label”:“View the gallery, ”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/2/0”,“x”:131,“y”:221,“width”:114,“height”:25},“>”:[{“UIAStaticText”:{“@”:{“name”:“View the gallery”,“label”:“View the gallery”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/2/0/0”,“x”:130,“y”:223,“width”:106,“height”:18},“>”:}},{“UIALink”:{“@”:{“name”:“”,“label”:“”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/2/0/1”,“x”:240,“y”:221,“width”:5,“height”:20},“>”:[{“UIAStaticText”:{“@”:{“name”:“”,“label”:“”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:true,“hint”:“”,“path”:“/0/1/3/0/0/2/2/0/1/0”,“x”:240,“y”:221,“width”:5,“height”:20},“>”:}}]}}]}}]}},{“UIALink”:{“@”:{“name”:null,“label”:null,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/2/3”,“x”:0,“y”:261,“width”:375,“height”:176},“>”:}}]}},{“UIALink”:{“@”:{“name”:“iPad Air 2 Watch the film “Change” >”,“label”:“iPad Air 2 Watch the film “Change” >”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/3”,“x”:0,“y”:64,“width”:0,“height”:0},“>”:[{“UIAStaticText”:{“@”:{“name”:“iPad Air 2 Watch the film “Change” >”,“label”:“iPad Air 2 Watch the film “Change” >”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/3/0”,“x”:0,“y”:64,“width”:0,“height”:0},“>”:}}]}},{“UIALink”:{“@”:{“name”:“iPhone 6 Bigger than bigger”,“label”:“iPhone 6 Bigger than bigger”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/4”,“x”:0,“y”:64,“width”:0,“height”:0},“>”:[{“UIAStaticText”:{“@”:{“name”:“iPhone 6 Bigger than bigger”,“label”:“iPhone 6 Bigger than bigger”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/4/0”,“x”:0,“y”:64,“width”:0,“height”:0},“>”:}}]}},{“UIALink”:{“@”:{“name”:“Apple Watch Our most personal device yet.”,“label”:“Apple Watch Our most personal device yet.”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/5”,“x”:0,“y”:64,“width”:0,“height”:0},“>”:[{“UIAStaticText”:{“@”:{“name”:“Apple Watch Our most personal device yet.”,“label”:“Apple Watch Our most personal device yet.”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/5/0”,“x”:0,“y”:64,“width”:0,“height”:0},“>”:}}]}},{“UIALink”:{“@”:{“name”:“iMac with Retina 5K Display”,“label”:“iMac with Retina 5K Display”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/6”,“x”:0,“y”:64,“width”:0,“height”:0},“>”:[{“UIAStaticText”:{“@”:{“name”:“iMac with Retina 5K Display”,“label”:“iMac with Retina 5K Display”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/6/0”,“x”:0,“y”:64,“width”:0,“height”:0},“>”:}}]}},{“UIAStaticText”:{“@”:{“name”:“Shop the”,“label”:“Shop the”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/7”,“x”:18,“y”:1296,“width”:48,“height”:13},“>”:}},{“UIALink”:{“@”:{“name”:“Apple Online Store”,“label”:“Apple Online Store”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/8”,“x”:65,“y”:1296,“width”:94,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Apple Online Store”,“label”:“Apple Online Store”,“value”:“”,“d
info: [debug] [INST] om”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/8/0”,“x”:65,“y”:1296,“width”:94,“height”:13},“>”:}}]}},{“UIAStaticText”:{“@”:{“name”:“(”,“label”:“(”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/9”,“x”:158,“y”:1296,“width”:7,“height”:13},“>”:}},{“UIALink”:{“@”:{“name”:“1-800-MY-APPLE”,“label”:“1-800-MY-APPLE”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/10”,“x”:164,“y”:1296,“width”:82,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“1-800-MY-APPLE”,“label”:“1-800-MY-APPLE”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/10/0”,“x”:164,“y”:1296,“width”:82,“height”:13},“>”:}}]}},{“UIAStaticText”:{“@”:{“name”:“),”,“label”:“),”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/11”,“x”:245,“y”:1296,“width”:7,“height”:13},“>”:}},{“UIAStaticText”:{“@”:{“name”:“visit an”,“label”:“visit an”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/12”,“x”:18,“y”:1311,“width”:39,“height”:13},“>”:}},{“UIALink”:{“@”:{“name”:“Apple Retail Store”,“label”:“Apple Retail Store”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/13”,“x”:56,“y”:1311,“width”:87,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Apple Retail Store”,“label”:“Apple Retail Store”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/13/0”,“x”:56,“y”:1311,“width”:87,“height”:13},“>”:}}]}},{“UIAStaticText”:{“@”:{“name”:“, or find a”,“label”:“, or find a”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/14”,“x”:142,“y”:1311,“width”:50,“height”:13},“>”:}},{“UIALink”:{“@”:{“name”:“reseller”,“label”:“reseller”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/15”,“x”:191,“y”:1311,“width”:36,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“reseller”,“label”:“reseller”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/15/0”,“x”:191,“y”:1311,“width”:36,“height”:13},“>”:}}]}},{“UIAStaticText”:{“@”:{“name”:“.”,“label”:“.”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/16”,“x”:226,“y”:1311,“width”:3,“height”:13},“>”:}},{“UIALink”:{“@”:{“name”:“Apple Info”,“label”:“Apple Info”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/17”,“x”:18,“y”:1338,“width”:52,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Apple Info”,“label”:“Apple Info”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/17/0”,“x”:18,“y”:1338,“width”:52,“height”:13},“>”:}}]}},{“UIALink”:{“@”:{“name”:“Site Map”,“label”:“Site Map”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/18”,“x”:83,“y”:1338,“width”:43,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Site Map”,“label”:“Site Map”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/18/0”,“x”:83,“y”:1338,“width”:43,“height”:13},“>”:}}]}},{“UIALink”:{“@”:{“name”:“Hot News”,“label”:“Hot News”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/19”,“x”:139,“y”:1338,“width”:49,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Hot News”,“label”:“Hot News”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/19/0”,“x”:139,“y”:1338,“width”:49,“height”:13},“>”:}}]}},{“UIALink”:{“@”:{“name”:“RSS Feeds”,“label”:“RSS Feeds”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/20”,“x”:201,“y”:1338,“width”:49,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“RSS Feeds”,“label”:“RSS Feeds”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/20/0”,“x”:201,“y”:1338,“width”:49,“height”:13},“>”:}}]}},{“UIALink”:{“@”:{“name”:“Jobs”,“label”:“Jobs”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/21”,“x”:263,“y”:1338,“width”:23,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Jobs”,“label”:“Jobs”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/21/0”,“x”:263,“y”:1338,“width”:23,“height”:13},“>”:}}]}},{“UIALink”:{“@”:{“name”:“Contact Us”,“label”:“Contact Us”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/22”,“x”:18,“y”:1362,“width”:54,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Contact Us”,“label”:“Contact Us”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/22/0”,“x”:18,“y”:1362,“width”:54,“height”:13},“>”:}}]}},{“UIALink”:{“@”:{“name”:“Choose your country or region”,“label”:“Choose your country or region”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/23”,“x”:86,“y”:1359,“width”:17,“height”:16},“>”:[{“UIAImage”:{“@”:{“name”:“Choose your country or region”,“label”:“Choose your country or region”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/23/0”,“x”:86,“y”:1359,“width”:17,“height”:16},“>”:}}]}},{“UIAStaticText”:{“@”:{“name”:“Copyright © 2015 Apple Inc. All rights reserved.”,“label”:“Copyright © 2015 Apple Inc. All rights reserved.”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/24”,“x”:18,“y”:1390,“width”:229,“height”:13},“>”:}},{“UIALink”:{“@”:{“name”:“Terms of Use”,“label”:“Terms of Use”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/25”,“x”:255,“y”:1390,“width”:63,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Terms of Use”,“label”:“Terms of Use”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/25/0”,“x”:255,“y”:1390,“width”:63,“height”:13},“>”:}}]}},{“UIALink”:{“@”:{“name”:“Updated Privacy Policy”,“label”:“Updated Privacy Policy”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/26”,“x”:18,“y”:1405,“width”:112,“height”:13},“>”:[{“UIAStaticText”:{“@”:{“name”:“Updated Privacy Policy”,“label”:“Updated Privacy Policy”,“value”:“”,“dom”:{“id”:“”},“enabled”:true,“valid”:true,“visible”:false,“hint”:“”,“path”:“/0/1/3/0/0/26/0”,“x”:18,“y”:1405,“width”:112,“height”:13},“>”:}}]}}]}},{“UIAImage”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/1/3/0/1”,“x”:369.5,“y”:67,“width”:2.5,“height”:247.5},“>”:}},{“UIAImage”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/1/3/0/2”,“x”:368,“y”:728.5,“width”:7,“height”:2.5},“>”:}}]}}]}},{“UIAToolbar”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/4”,“x”:0,“y”:623,“width”:375,“height”:44},“>”:[{“UIAImage”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/1/4/0”,“x”:0,“y”:623,“width”:375,“height”:44},“>”:}},{“UIAButton”:{“@”:{“name”:“Back”,“label”:“Back”,“value”:null,“dom”:null,“enabled”:false,“valid”:true,“visible”:true,“hint”:“Double-tap and hold to open history”,“path”:“/0/1/4/1”,“x”:0.5,“y”:625,“width”:42,“height”:40},“>”:}},{“UIAButton”:{“@”:{“name”:“Forward”,“label”:“Forward”,“value”:null,“dom”:null,“enabled”:false,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/4/2”,“x”:85,“y”:625,“width”:42,“height”:40},“>”:}},{“UIAButton”:{“@”:{“name”:“Share”,“label”:“Share”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/4/3”,“x”:161.5,“y”:624,“width”:51,“height”:40},“>”:}},{“UIAButton”:{“@”:{“name”:“Show Bookm
info: [debug] [INST] arks”,“label”:“Show Bookmarks”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/4/4”,“x”:239,“y”:625,“width”:57,“height”:40},“>”:}},{“UIAButton”:{“@”:{“name”:“Pages”,“label”:“Pages”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/1/4/5”,“x”:318.5,“y”:625,“width”:57,“height”:40},“>”:}}]}}]}},{“UIAWindow”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/2”,“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/3”,“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/3/0”,“x”:0,“y”:0,“width”:375,“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 centre., Swipe up with three fingers to reveal the control centre, Double-tap to scroll to top”,“path”:“/0/3/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”:“TTP Office”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification centre., Swipe up with three fingers to reveal the control centre, Double-tap to scroll to top”,“path”:“/0/3/0/1”,“x”:53,“y”:0,“width”:13,“height”:20},“>”:}},{“UIAElement”:{“@”:{“name”:“12:09”,“label”:“12:09”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification centre., Swipe up with three fingers to reveal the control centre, Double-tap to scroll to top”,“path”:“/0/3/0/2”,“x”:172,“y”:0,“width”:30,“height”:20},“>”:}},{“UIAElement”:{“@”:{“name”:“45% battery power, Charging”,“label”:“45% battery power, Charging”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification centre., Swipe up with three fingers to reveal the control centre, Double-tap to scroll to top”,“path”:“/0/3/0/3”,“x”:337,“y”:0,“width”:33,“height”:20},“>”:}}]}}]}},{“UIAWindow”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/4”,“x”:0,“y”:0,“width”:375,“height”:667},“>”:}}]}}}
info: [debug] [INST] 2015-01-23 12:09:24 +0000 Debug: Running system command #3: /usr/local/bin/node/bin/node /usr/local/bin/node/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:{“UIAApplication”:{“@”:{“name”:“Safari”,“label”:“Safari”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hin…
info: [debug] Socket data received (8102 bytes)
info: [debug] Socket data received (8190 bytes)
info: [debug] Socket data received (2828 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:{“UIAApplication”:{”@“:{“name”:“Safari”,“label”:“Safari”,“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,“vali
info: [debug] Navigating to most recently opened webview
info: [debug] [REMOTE] Getting WebKitRemoteDebugger pageArray
error: [REMOTE] Could not connect to WebKitRemoteDebugger server
info: [debug] Cleaning up appium session
info: [debug] Killall instruments
error: Failed to start an Appium session, err was: Error: Could not navigate to webview! Err: Error: connect ECONNREFUSED
info: [debug] Error: Could not navigate to webview! Err: Error: connect ECONNREFUSED
at null. (/usr/local/bin/node/lib/node_modules/appium/lib/devices/ios/ios.js:1573:12)
at null. (/usr/local/bin/node/lib/node_modules/appium/lib/devices/ios/ios-controller.js:1538:14)
at null. (/usr/local/bin/node/lib/node_modules/appium/lib/devices/ios/webkit-remote-debugger.js:73:14)
at ClientRequest. (/usr/local/bin/node/lib/node_modules/appium/node_modules/underscore/underscore.js:754:19)
at ClientRequest.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1551:9)
at Socket.emit (events.js:95:17)
at net.js:440:14
at process._tickDomainCallback (node.js:463:13)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Could not navigate to webview! Err: Error: connect ECONNREFUSED)”,“origValue”:“Could not navigate to webview! Err: Error: connect ECONNREFUSED”},“sessionId”:null}
info: ← POST /wd/hub/session 500 22238.038 ms - 248
info: → POST /wd/hub/session {“desiredCapabilities”:{“deviceName”:“iPhone”,“browserVersion”:“600.1.4”,“udid”:“6f5f37413b9a6d375557efe9779d0722374b3df4”,“javascriptEnabled”:true,“app”:”/Users/mobiletest/SafariLauncher/app/8.1/SafariLauncher.app",“platform”:“MAC”,“browserName”:“safari”,“version”:“”,“platformVersion”:“8.1”,“platformName”:“iOS”}}

Hi,

follow this link:
https://github.com/appium/appium/issues/3198

Thanks, but I read this yesterday and altered the delay time in the SafariLauncher project. It just delays the time before Safari starts and does not affect instruments at all.

It looks like we’re experiencing the issues mentioned there and in https://github.com/appium/appium/issues/3539

but we have the fix that @jlipps mentioned.

I tried setting the autoWebView capability mentioned in that post, but it didn’t make a difference. I think the WebkitRemoteDebugger is the problem though.

The Appium log says:

info: [debug] Navigating to most recently opened webview
info: [debug] [REMOTE] Getting WebKitRemoteDebugger pageArray
error: [REMOTE] Could not connect to WebKitRemoteDebugger server
info: [debug] Cleaning up appium session
info: [debug] Killall instruments
error: Failed to start an Appium session, err was: Error: Could not navigate to webview! Err: Error: connect ECONNREFUSED
info: [debug] Error: Could not navigate to webview! Err: Error: connect ECONNREFUSED
at null. (/usr/local/bin/node/lib/node_modules/appium/lib/devices/ios/ios.js:1573:12)
at null. (/usr/local/bin/node/lib/node_modules/appium/lib/devices/ios/ios-controller.js:1538:14)
at null. (/usr/local/bin/node/lib/node_modules/appium/lib/devices/ios/webkit-remote-debugger.js:73:14)
at ClientRequest. (/usr/local/bin/node/lib/node_modules/appium/node_modules/underscore/underscore.js:754:19)
at ClientRequest.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1551:9)
at Socket.emit (events.js:95:17)
at net.js:440:14
at process._tickDomainCallback (node.js:463:13)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Could not navigate to webview! Err: Error: connect ECONNREFUSED)”,“origValue”:“Could not navigate to webview! Err: Error: connect ECONNREFUSED”},“sessionId”:null}

And at the same time we get this from WebkitRemoteDebugger:

Invalid message _rpc_applicationUpdated: <dict>
	<key>WIRApplicationIdentifierKey</key>
	<string>PID:512</string>
	<key>WIRIsApplicationProxyKey</key>
	<true/>
	<key>WIRApplicationNameKey</key>
	<string></string>
	<key>WIRApplicationBundleIdentifierKey</key>
	<string>com.apple.WebKit.WebContent</string>
	<key>WIRIsApplicationActiveKey</key>
	<integer>0</integer>
	<key>WIRHostApplicationIdentifierKey</key>
	<string>PID:170</string>
</dict>
ss.remove_fd(10)
Disconnected :27753 from iPhone (6f5f37413b9a6d375557efe9779d0722374b3df4)

It’s ok, we’ve fixed it. @jchuong has updated ios-webkit-debug-proxy to handle the situation where the PID has changed.

We pulled and built the latest https://github.com/jchuong/ios-webkit-debug-proxy and the tests run now.

1 Like

Well, here we are again. ios-webkit-debug-proxy is not working again. Extensive searches have brought up either “it works for me” or “iOS automation on real devices? Are you mad?” so if anyone has any better ideas…

What we’re getting this time is

Unknown app_id PID:340
Invalid message _rpc_applicationSentListing: <dict>
	<key>WIRApplicationIdentifierKey</key>
	<string>PID:340</string>
	<key>WIRListingKey</key>
	<dict>
	</dict>
</dict>

then the debugger disconnects. If we restart it, the same thing happens.

Try reinstalling ios_webkit_debug_proxy. It may help.

Please use ios-webkit-debug-proxy-launcher.js to run on iOS 8.1.x. run the command ./bin/ios-webkit-debug-proxy-launcher.js from terminal.

Thanks,
Amarnath Rayudu

I was facing similar issue, while executing test on real device Safari browser. Below are the steps that finally worked for me:

Build the SafariLauncher code on your local machine with your iOS Development certificate, Provisioning profile and Bundle ID as ‘com.bytearc.SafariLauncher’ and increase the default time to ’30’ in Root.plist.

Deploy the SafariLauncher app built using above configuration on your iOS real device.

Start the ‘ios_webkit_debug_proxy’ on port 27753 (ios_webkit_debug_proxy -c :27753 -d)

Set the below mentioned DesiredCapabilities for your driver instance.

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(CapabilityType.BROWSER_NAME, "Safari");
        capabilities.setCapability("platformName", "iOS");
        capabilities.setCapability("platformVersion", "8.3");
        capabilities.setCapability("deviceName", "iPhone 6");
        capabilities.setCapability("udid", "<udid>");
    capabilities.setCapability("bundleid", "com.apple.mobilesafari");    
     
     wd = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

Launch the Appium and execute your test.

Thanks
~Uday

running ios-webkit-debug-proxy-launcher.js stop the proxy showing the error ‘Unknown app_id PID:255 Invalid message _rpc_applicationSentListing:
WIRApplicationIdentifierKey’

SafariLauncher start with blank page as configured
But appium server shows error

Condition unmet after 1302ms. Timing out.
2015-07-22 11:11:55:784 - error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using
2015-07-22 11:11:55:785 - info: [debug] Cleaning up appium session
2015-07-22 11:11:55:785 - error: Failed to start an Appium session, err was: Error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using
2015-07-22 11:11:55:788 - info: [debug] Error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using
at [object Object]. (/Users/qa/automation/appium/appium1-4-8/lib/devices/ios/safari.js:70:17)
at [object Object]. (/Users/qa/automation/appium/appium1-4-8/lib/devices/common.js:77:12)
at [object Object].iOSController.handleFindCb (/Users/qa/automation/appium/appium1-4-8/lib/devices/ios/ios-controller.js:313:5)
at [object Object]. (/Users/qa/automation/appium/appium1-4-8/lib/devices/ios/ios-controller.js:138:14)
at next (/Users/qa/automation/appium/appium1-4-8/node_modules/async/lib/async.js:798:43)
at /Users/qa/automation/appium/appium1-4-8/node_modules/async/lib/async.js:32:16
at [object Object].exports.respond (/Users/qa/automation/appium/appium1-4-8/lib/devices/common.js:28:9)
at [object Object]. (/Users/qa/automation/appium/appium1-4-8/lib/devices/ios/ios.js:1479:18)
at getResultAndSendNext (/Users/qa/automation/appium/appium1-4-8/submodules/appium-uiauto/lib/command-proxy.js:146:20)
at Socket. (/Users/qa/automation/appium/appium1-4-8/submodules/appium-uiauto/lib/command-proxy.js:88:7)
at Socket.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickDomainCallback (node.js:381:11)
2015-07-22 11:11:55:789 - info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using)”,“origValue”:“Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using”},“sessionId”:null}
2015-07-22 11:11:55:790 - info: <-- POST /wd/hub/session 500 11023.907 ms - 378
2015-07-22 11:12:25:030 - info: [debug] Appium successfully registered with the grid on usb-etbuild5:4444

will try the other solution by udaykthakur

DID not work still same issue : error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using; any other suggestions please?

Did you get to resolve this issue? I am also getting “Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using” error while executing my test in iPhone 6 plus.