Could not find button to launch Safari

Hi,

I’m trying to test a web app - using SafariLauncher on a real iPad (iOS 8.4).

The problem is I get the error “Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using”

But when I run the my test Appium installs SafariLauncher on the iPad and it opens Safari successfully, but dies with the above error, it seems as though it can launch Safari okay but I can’t figure out why it crashes as soon as it does? full log can be found below:

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}
info: <-- GET /wd/hub/status 200 0.935 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --address "203.250.9.187" --command-timeout "7200" --debug-log-spacing --platform-version "8.4" --platform-name "iOS" --app "/Users/MobileApps/Desktop/SafariLauncher.app" --udid "cb67f2d79a8d76e0cbc51d013dcff44413163a44" --full-reset --default-device

info: Welcome to Appium v1.4.8 (REV c8179bd8352d3c62d98fa58b324491230df9342a)

info: Appium REST http interface listener started on 203.250.9.187:4723
info: [debug] Non-default server args: {"app":"/Users/MobileApps/Desktop/SafariLauncher.app","udid":"cb67f2d79a8d76e0cbc51d013dcff44413163a44","address":"203.250.9.187","fullReset":true,"platformName":"iOS","platformVersion":"8.4","defaultDevice":true,"defaultCommandTimeout":7200,"debugLogSpacing":true}
info: Console LogLevel: debug

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

info: <-- GET /wd/hub/status 200 11.140 ms - 104 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"8.4","browserName":"Safari","platformName":"iOS","deviceName":"Dev Mobile Orchard iPad (8.4)"}}

info: Client User-Agent string: Apache-HttpClient/4.3.6 (java 1.5)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: ****        NEW SESSION           ***
info: ****        NEW SESSION           ***

info: ****        NEW SESSION           ***
info: ****        NEW SESSION           ***
info: ****        NEW SESSION           ***
info: ****        NEW SESSION           ***
info: ****        NEW SESSION           ***
info: ****        NEW SESSION           ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: [debug] Configuring Safari session
info: [debug] Using local .zip from command line: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip
info: [debug] Copying local zip to tmp dir
info: [debug] /Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip copied to /var/folders/kq/hs00kz0n6cv75byw1wljxm_w0000gp/T/11583-11635-1uklzbr/appium-app.zip

info: [debug] Unzipping /var/folders/kq/hs00kz0n6cv75byw1wljxm_w0000gp/T/11583-11635-1uklzbr/appium-app.zip

info: [debug] Testing zip archive: /var/folders/kq/hs00kz0n6cv75byw1wljxm_w0000gp/T/11583-11635-1uklzbr/appium-app.zip

info: [debug] Zip archive tested clean

info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/kq/hs00kz0n6cv75byw1wljxm_w0000gp/T/11583-11635-1uklzbr/SafariLauncher.app
info: [debug] Creating new appium session 2c2209d9-69c8-4991-8e7f-a385413ee5ff
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid...
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /var/folders/kq/hs00kz0n6cv75byw1wljxm_w0000gp/T/11583-11635-1uklzbr/SafariLauncher.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /var/folders/kq/hs00kz0n6cv75byw1wljxm_w0000gp/T/11583-11635-1uklzbr/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: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/MobileApps/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/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":"grouped"}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...

info: [debug] Dynamic bootstrap path: /Users/MobileApps/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js

info: [debug] Reusing dynamic bootstrap: /Users/MobileApps/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js

info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid cb67f2d79a8d76e0cbc51d013dcff44413163a44

info: [debug] Starting command proxy.

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 cb67f2d79a8d76e0cbc51d013dcff44413163a44
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 cb67f2d79a8d76e0cbc51d013dcff44413163a44 com.safariLauncher.safariLaucher -e UIASCRIPT "/Users/MobileApps/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"},"isShuttingDown":false},"sessionId":"2c2209d9-69c8-4991-8e7f-a385413ee5ff"}

info: <-- GET /wd/hub/status 200 6.528 ms - 178 {"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"},"isShuttingDown":false},"sessionId":"2c2209d9-69c8-4991-8e7f-a385413ee5ff"}

info: [debug] [INST STDERR] 2015-09-03 14:53:23.209 instruments[11648:368253] WebKit Threading Violation - initial use of WebKit from a secondary thread.

info: Instruments is ready to receive commands

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-09-03 13:52:47 +0000 Debug: evaluation finished

info: [debug] [INST] 2015-09-03 13:52:47 +0000 Debug: responding with:

info: [debug] [INST] 2015-09-03 13:52:47 +0000 Debug: Running system command #1: /Applications/Appium.app/Contents/Resources/node/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}...

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] Not setting initial orientation because we're on SafariLauncher
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-09-03 13:52:48 +0000 Debug: Got new command 1 from instruments: au.mainApp().getTreeForXML()

info: [debug] [INST] 2015-09-03 13:52:48 +0000 Debug: evaluating au.mainApp().getTreeForXML()

info: [debug] Socket data received (282 bytes)

info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {"status":0,"value":{"UIAApplication":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":false,"valid":false,"visible":false,"hint":null,"path":"/0","x":0.0000013775265870208386,"y":154998964224,"width":5.934762725701148e-7,"height":0.00003634630411397666},">":[]}}}

info: [debug] Waited for 1008ms so far

info: [debug] Pushing command to appium work queue: "au.mainApp().getTreeForXML()"

info: [debug] Sending command to instruments: au.mainApp().getTreeForXML()

info: [debug] [INST] 2015-09-03 13:52:48 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-09-03 13:52:48 +0000 Debug: responding with:
info: [debug] [INST] 2015-09-03 13:52:48 +0000 Debug: Running system command #2: /Applications/Appium.app/Contents/Resources/node/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":null,"label":null,"value":null,"dom":null,"enabl...

info: [debug] [INST] 2015-09-03 13:52:49 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()

info: [debug] [INST] 2015-09-03 13:52:49 +0000 Debug: evaluating au.mainApp().getTreeForXML()

info: [debug] [INST] 2015-09-03 13:52:50 +0000 Debug: evaluation finished

info: [debug] [INST] 2015-09-03 13:52:50 +0000 Debug: responding with:id":true,"visible":false,"hint":null,"path":"/0/0","x":0,"y":0,"width":768,"height":1024},">":[]}},{"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":768,"height":1024},">":[{"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":768,"height":98},">":[]}},{"UIAButton":{"@":{"name":"URL","label":"Address","value":"‎apple.com","dom":null,"enabled":true,"valid":true,"visible":true,"hint":"Edits the URL","path":"/0/1/1","x":180,"y":24,"width":408,"height":29},">":[{"UIAElement":{"@":{"name":"URL","label":"‎apple.com","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":"Edits the URL","path":"/0/1/1/0","x":182,"y":24,"width":404,"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":559,"y":24,"width":29,"height":29},">":[]}}]}},{"UIAToolbar":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/1/2","x":0,"y":24,"width":768,"height":29},">":[{"UIAImage":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/1/2/0","x":0,"y":24,"width":768,"height":29},">":[]}},{"UIAButton":{"@":{"name":"Back","label":"Back","value":null,"dom":null,"enabled":false,"valid":true,"visible":true,"hint":null,"path":"/0/1/2/1","x":14,"y":19,"width":42,"height":40},">":[]}},{"UIAButton":{"@":{"name":"Forward","label":"Forward","value":null,"dom":null,"enabled":false,"valid":true,"visible":true,"hint":null,"path":"/0/1/2/2","x":67,"y":19,"width":42,"height":40},">":[]}},{"UIAButton":{"@":{"name":"Show Bookmarks","label":"Show Bookmarks","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/1/2/3","x":111,"y":19,"width":57,"height":40},">":[]}},{"UIAButton":{"@":{"name":"Share","label":"Share","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/1/2/4","x":602,"y":18,"width":51,"height":40},">":[]}},{"UIAButton":{"@":{"name":"New tab","label":"New tab","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/1/2/5","x":654,"y":19,"width":53,"height":40},">":[]}},{"UIAButton":{"@":{"name":"Pages","label":"Pages","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/1/2/6","x":707,"y":19,"width":57,"height":40},">":[]}}]}},{"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":768,"height":1004},">":[{"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":768,"height":1024},">":[{"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":97,"width":768,"height":927},">":[{"UIAStaticText":{"@":{"name":"Safari cannot open the page “http://www.apple.com/” because your iPad is not connected to the Internet.","label":"Safari cannot open the page “http://www.apple.com/” because your iPad is not connected to the Internet.","value":"","dom":{"id":""},"enabled":true,"valid":true,"visible":true,"hint":"","path":"/0/1/3/0/0/0","x":83,"y":220,"width":602,"height":44},">":[]}}]}},{"UIAImage":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/3/0/1","x":765,"y":1017,"width":3,"height":7},">":[]}},{"UIAImage":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/3/0/2","x":761,"y":1118,"width":7,"height
":3},">":[]}}]}},{"UIAImage":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/3/1","x":761,"y":1021,"width":7,"height":3},">":[]}}]}},{"UIAStaticText":{"@":{"name":"Cannot Open Page, Tab","label":"Cannot Open Page, Tab","value":"Cannot Open Page, Tab","dom":null,"enabled":true,"valid":true,"visible":true,"hint":"Double-tap and hold, then move left or right to re-order.","path":"/0/1/4","x":0,"y":64,"width":256,"height":33},">":[]}},{"UIAStaticText":{"@":{"name":"Cannot Open Page","label":"Cannot Open Page","value":"Cannot Open Page","dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/5","x":74,"y":73,"width":108,"height":15},">":[]}},{"UIAStaticText":{"@":{"name":"Favourites, Tab","label":"Favourites, Tab","value":"Favourites, Tab","dom":null,"enabled":true,"valid":true,"visible":true,"hint":"Double-tap and hold, then move left or right to re-order.","path":"/0/1/6","x":256,"y":64,"width":256,"height":33},">":[]}},{"UIAStaticText":{"@":{"name":"Favourites","label":"Favourites","value":"Favourites","dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/7","x":354,"y":73,"width":60,"height":15},">":[]}},{"UIAScrollView":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/1/8","x":0,"y":64,"width":768,"height":33},">":[{"UIAImage":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/8/0","x":765,"y":28,"width":3,"height":36},">":[]}}]}},{"UIAStaticText":{"@":{"name":"Cannot Open Page, Tab","label":"Cannot Open Page, Tab","value":"Cannot Open Page, Tab","dom":null,"enabled":true,"valid":true,"visible":true,"hint":"Double-tap and hold, then move left or right to re-order.","path":"/0/1/9","x":539,"y":64,"width":229,"height":33},">":[]}},{"UIAStaticText":{"@":{"name":"Cannot Open Page","label":"Cannot Open Page","value":"Cannot Open Page","dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/10","x":586,"y":73,"width":108,"height":15},">":[]}},{"UIAButton":{"@":{"name":"Close Tab","label":"Close Tab","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/1/11","x":512,"y":64,"width":27,"height":33},">":[]}},{"UIAStaticText":{"@":{"name":"Cannot Open Page, Tab","label":"Cannot Open Page, Tab","value":"Cannot Open Page, Tab","dom":null,"enabled":true,"valid":true,"visible":false,"hint":"Double-tap and hold, then move left or right to re-order.","path":"/0/1/12","x":0,"y":64,"width":256,"height":33},">":[]}},{"UIAStaticText":{"@":{"name":"Cannot Open Page","label":"Cannot Open Page","value":"Cannot Open Page","dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/13","x":74,"y":73,"width":108,"height":15},">":[]}},{"UIAStaticText":{"@":{"name":"Favourites, Tab","label":"Favourites, Tab","value":"Favourites, Tab","dom":null,"enabled":true,"valid":true,"visible":false,"hint":"Double-tap and hold, then move left or right to re-order.","path":"/0/1/14","x":256,"y":64,"width":256,"height":33},">":[]}},{"UIAStaticText":{"@":{"name":"Favourites","label":"Favourites","value":"Favourites","dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1/15","x":354,"y":73,"width":60,"height":15},">":[]}}]}},{"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":768,"height":1024},">":[]}},{"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":768,"height":1024},">":[{"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":768,"height":20},">":[{"UIAElement":{"@":{"name":"iPad","label":"iPad","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":"Swipe do
wn with three fingers to reveal the 
info: [debug] [INST] 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":26,"height":20},">":[]}},{"UIAElement":{"@":{"name":"14:52","label":"14:52","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/1","x":369,"y":0,"width":30,"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 centre., Swipe up with three fingers to reveal the control centre, Double-tap to scroll to top","path":"/0/3/0/2","x":695,"y":0,"width":68,"height":20},">":[]}}]}}]}}]}}}
info: [debug] [INST] 2015-09-03 13:52:50 +0000 Debug: Running system command #3: /Applications/Appium.app/Contents/Resources/node/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":"Safari","label":"Safari","value":null,"dom":nul...

info: [debug] Socket data received (8178 bytes)
info: [debug] Socket data received (1174 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":768,"height":1004},">":[{"UIAWindow":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"val
info: [debug] On Safari Launcher. Tapping button to launch Safari
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: "au.getElementByAccessibilityId('launch safari')"
info: [debug] Sending command to instruments: au.getElementByAccessibilityId('launch safari')

info: [debug] [INST] 2015-09-03 13:52:51 +0000 Debug: Got new command 3 from instruments: au.getElementByAccessibilityId('launch safari')

info: [debug] [INST] 2015-09-03 13:52:51 +0000 Debug: evaluating au.getElementByAccessibilityId('launch safari')

info: [debug] [INST] 2015-09-03 13:52:52 +0000 Debug: evaluation finished

info: [debug] [INST] 2015-09-03 13:52:52 +0000 Debug: responding with:
info: [debug] [INST] 2015-09-03 13:52:52 +0000 Debug: Running system command #4: /Applications/Appium.app/Contents/Resources/node/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":""}...

info: [debug] Socket data received (25 bytes)

info: [debug] Socket data being routed.

error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using

info: [debug] Got result from instruments: {"status":0,"value":""}
info: [debug] Condition unmet after 1395ms. Timing out.
info: [debug] Cleaning up appium session
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].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/safari.js:70:17)
    at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:77:12)
    at [object Object].iOSController.handleFindCb (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-controller.js:313:5)
    at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-controller.js:138:14)
    at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:798:43)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:32:16
    at [object Object].exports.respond (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:28:9)
    at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1473:18)
    at getResultAndSendNext (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/lib/command-proxy.js:146:20)
    at Socket.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/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)
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}
info: <-- POST /wd/hub/session 500 16274.900 ms - 378 

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

Hi,
I’m seeing this error too on my iPhone 5.0 with iOS 9.
Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using

Does anyone have a fix?
Thanks for your help.

Hi…

Am facing the same error on El Captian, Appium 1.4.13, Xcode 9.2 and iOS 9.2.
Is there any fix?

Hi, please see: Error with SafariLauncher