Error : For whatever reason, could not click the 'launch safari' button of SafariLauncher

Hi

I am getting following error when i launch safarilauncher application Error: “For whatever reason, could not click the ‘launch safari’ button of SafariLauncher”.

Below is complete log.

info: Client User-Agent string: Apache-HttpClient/4.4.1 (Java/1.8.0_60)

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/2b/qb4wl9_93gscb9zc4qtjx5hh0000gn/T/115811-21732-qvfl9z/appium-app.zip

info: [debug] Unzipping /var/folders/2b/qb4wl9_93gscb9zc4qtjx5hh0000gn/T/115811-21732-qvfl9z/appium-app.zip

info: [debug] Testing zip archive: /var/folders/2b/qb4wl9_93gscb9zc4qtjx5hh0000gn/T/115811-21732-qvfl9z/appium-app.zip

info: [debug] Zip archive tested clean

info: [debug] Unzip successful

info: [debug] Using locally extracted app: /var/folders/2b/qb4wl9_93gscb9zc4qtjx5hh0000gn/T/115811-21732-qvfl9z/SafariLauncher.app

info: [debug] Creating new appium session 520c50a7-858d-4cc4-bac8-528c929cd9da

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/2b/qb4wl9_93gscb9zc4qtjx5hh0000gn/T/115811-21732-qvfl9z/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/2b/qb4wl9_93gscb9zc4qtjx5hh0000gn/T/115811-21732-qvfl9z/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/sos/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/sos/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js

info: [debug] Reusing dynamic bootstrap: /Users/sos/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 18a182f2b5520b2638af3f3ecaaf76b16a98c378

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”:“520c50a7-858d-4cc4-bac8-528c929cd9da”}

info: <-- GET /wd/hub/status 200 2.391 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”},“isShuttingDown”:false},“sessionId”:“520c50a7-858d-4cc4-bac8-528c929cd9da”}

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 18a182f2b5520b2638af3f3ecaaf76b16a98c378
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 18a182f2b5520b2638af3f3ecaaf76b16a98c378 com.saxobank.SafariLauncher -e UIASCRIPT “/Users/sos/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: [debug] [INST STDERR] 2015-09-11 17:45:58.699 instruments[21745:859377] 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-11 12:09:33 +0000 Debug: evaluation finished

info: [debug] [INST] 2015-09-11 12:09:33 +0000 Debug: responding with:

info: [debug] [INST] 2015-09-11 12:09:33 +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-11 12:09:34 +0000 Debug: Got new command 1 from instruments: au.mainApp().getTreeForXML()

info: [debug] [INST] 2015-09-11 12:09:34 +0000 Debug: evaluating au.mainApp().getTreeForXML()

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

info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:{“UIAApplication”:{"@":{“name”:“SafariLauncher”,“label”:“SafariLauncher”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0",“x”:0,“y”:26.449981689453125,“width”:414,“height”:708.9750366210938},">":[{“UIAWindow”:{"@":{“name”:null,“label”:nul
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-11 12:09:34 +0000 Debug: evaluation finished

info: [debug] [INST] 2015-09-11 12:09:34 +0000 Debug: responding with:l,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0",“x”:0,“y”:0,“width”:414,“height”:736},">":[]}},{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1",“x”:0,“y”:0.574981689453125,“width”:414,“height”:734.8500366210938},">":[{“UIAStaticText”:{"@":{“name”:“Safari Launcher”,“label”:“Safari Launcher”,“value”:“Safari Launcher”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/0",“x”:103.5,“y”:13.512481689453125,“width”:414,“height”:64.6875},">":[]}},{“UIAButton”:{"@":{“name”:“launch safari”,“label”:“launch safari”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1",“x”:77.625,“y”:329.1875,“width”:258.75,“height”:77.625},">":[]}},{“UIAStaticText”:{"@":{“name”:" url: http://www.apple.com",“label”:" url: http://www.apple.com",“value”:" url: http://www.apple.com",“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/2",“x”:0,“y”:670.737548828125,“width”:414,“height”:64.6875},">":[]}}]}},{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/2",“x”:0,“y”:0.574981689453125,“width”:414,“height”:734.8500366210938},">":[{“UIAStatusBar”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/2/0",“x”:0,“y”:0.574981689453125,“width”:414,“height”:25.875},">":[{“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/2/0/0",“x”:7.762500286102295,“y”:0.574981689453125,“width”:54.337501525878906,“height”:25.875},">":[]}},{“UIAElement”:{"@":{“name”:“3 of 3 Wi-Fi bars”,“label”:“3 of 3 Wi-Fi bars”,“value”:“SAXO-USERS”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:"/0/2/0/1",“x”:68.56875610351562,“y”:0.574981689453125,“width”:16.818750381469727,“height”:25.875},">":[]}},{“UIAElement”:{"@":{“name”:“5:39 pm”,“label”:“5:39 pm”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:"/0/2/0/2",“x”:175.95001220703125,“y”:0.574981689453125,“width”:63.39375305175781,“height”:25.875},">":[]}},{“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/2/0/3",“x”:320.8500061035156,“y”:0.574981689453125,“width”:86.6812515258789,“height”:25.875},">":[]}}]}}]}}]}}}

info: [debug] [INST] 2015-09-11 12:09:34 +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”:“SafariLauncher”,“label”:“SafariLauncher”,"value…

info: [debug] [INST] 2015-09-11 12:09:35 +0000 Debug: Got new command 2 from instruments: au.getElementByAccessibilityId(‘launch safari’)

info: [debug] [INST] 2015-09-11 12:09:35 +0000 Debug: evaluating au.getElementByAccessibilityId(‘launch safari’)

info: [debug] [INST] 2015-09-11 12:09:35 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-09-11 12:09:35 +0000 Debug: Lookup returned [object UIAButton] with the name “launch safari” (id: 0).
info: [debug] [INST] 2015-09-11 12:09:35 +0000 Debug: responding with:
info: [debug] [INST] 2015-09-11 12:09:35 +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”:{“ELEMENT”:“0”}}…

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

info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:{“ELEMENT”:“0”}}
info: [debug] Pushing command to appium work queue: “au.getElement(‘0’).rect()”

info: [debug] Sending command to instruments: au.getElement(‘0’).rect()

info: [debug] [INST] 2015-09-11 12:09:36 +0000 Debug: Got new command 3 from instruments: au.getElement(‘0’).rect()

info: [debug] [INST] 2015-09-11 12:09:36 +0000 Debug: evaluating au.getElement(‘0’).rect()

info: [debug] [INST] 2015-09-11 12:09:36 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-09-11 12:09:36 +0000 Debug: responding with:
info: [debug] [INST] 2015-09-11 12:09:36 +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”:{“origin”:{“x”:77.625,“y”:329.1875},“size”:{“width”:258.75,“height”:77.625}}}…

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

info: [debug] Socket data being routed.

error: Error. For whatever reason, could not click the ‘launch safari’ button of SafariLauncher

info: [debug] Got result from instruments: {“status”:0,“value”:{“origin”:{“x”:77.625,“y”:329.1875},“size”:{“width”:258.75,“height”:77.625}}}
info: <-- POST /tap 500 3.715 ms - 66
info: [debug] Cleaning up appium session
info: [debug] Error: Error. For whatever reason, could not click the ‘launch safari’ button of SafariLauncher
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/safari.js:80:19)
at Request.self.callback (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/request/request.js:344:22)
at Request.emit (events.js:110:17)
at Request. (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/request/request.js:1239:14)
at Request.emit (events.js:129:20)
at IncomingMessage. (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/request/request.js:1187:12)
at IncomingMessage.emit (events.js:129:20)
at streamreadable.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. For whatever reason, could not click the ‘launch safari’ button of SafariLauncher)”,“origValue”:“Error. For whatever reason, could not click the ‘launch safari’ button of SafariLauncher”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 10005.794 ms - 298

error: Failed to start an Appium session, err was: Error: Error. For whatever reason, could not click the ‘launch safari’ button of SafariLauncher
Error: invalid json
at parse (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/body-parser/lib/types/json.js:79:15)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/body-parser/lib/read.js:102:18
at done (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/body-parser/node_modules/raw-body/index.js:248:14)
at IncomingMessage.onEnd (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/body-parser/node_modules/raw-body/index.js:294:7)
at IncomingMessage.g (events.js:199:16)
at IncomingMessage.emit (events.js:104:17)
at streamreadable.js:908:16
at process._tickDomainCallback (node.js:381:11)

Please help.

Regards,
Praveen