Issue in appium - ios-webkit-debug-proxy is getting crashed and Could not navigate to webview in ios 8

Hi all,
I am using xcode 6, Mac 10.10.1, Apiium 1.3.3 and ios 8.1
I installed ios-webkit-debug-proxy through terminal command brew and

For running my testcase, first of all I start debug-proxy at 27753 port and after that launch appium and run my java tstcase with capabilities

    desiredCapabilities.setCapability("browserName", "Safari");
    desiredCapabilities.setCapability("deviceName", "iPad");
    desiredCapabilities.setCapability("versionName", "8.1");
    desiredCapabilities.setCapability("platformName", "iOS");

then my safarilauncher is lauching but after that ios-webkit-debug-proxy is crashing with error messege
Invalid messege_rpc_applicationUpdated

i have done this step 7 times and i am getting same error.
I am totaly stuck @ this point So plz help me.

regards,
Sarafarazahamd M

Hi,
please find logs as follows

ios-webkit-debug-proxy error log-

Invalid message _rpc_applicationUpdated:
WIRApplicationBundleIdentifierKey
com.apple.WebKit.WebContent
WIRHostApplicationIdentifierKey
PID:235
WIRApplicationNameKey

WIRIsApplicationProxyKey

WIRIsApplicationActiveKey
0
WIRApplicationIdentifierKey
PID:642

Here is my Appium log,

nfo: --> POST /wd/hub/session {“desiredCapabilities”:{“safariIgnoreFraudWarning”:“true”,“platformVersion”:“8.1”,“platformName”:“iOS”,“deviceName”:“iPad”,“browserName”:“Safari”,“safariAllowPopups”:false}}

info: Client User-Agent string: Apache-HttpClient/4.3.2 (java 1.5)

warn: Converting cap safariIgnoreFraudWarning from string to boolean. This might cause unexpected behavior.

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/_5/h_pymt_x25s0vtpwrhmskblr0000gp/T/114112-26888-1dnohiz/appium-app.zip

info: [debug] Unzipping /var/folders/_5/h_pymt_x25s0vtpwrhmskblr0000gp/T/114112-26888-1dnohiz/appium-app.zip

info: [debug] Testing zip archive: /var/folders/_5/h_pymt_x25s0vtpwrhmskblr0000gp/T/114112-26888-1dnohiz/appium-app.zip

info: [debug] Zip archive tested clean

info: [debug] Unzip successful

info: [debug] Using locally extracted app: /var/folders/_5/h_pymt_x25s0vtpwrhmskblr0000gp/T/114112-26888-1dnohiz/submodules/SafariLauncher/build/Debug-iphoneos/SafariLauncher.app

info: [debug] Creating new appium session 3488ec52-9be6-458f-bcbe-47ec41ed24ff

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 /var/folders/_5/h_pymt_x25s0vtpwrhmskblr0000gp/T/114112-26888-1dnohiz/submodules/SafariLauncher/build/Debug-iphoneos/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/_5/h_pymt_x25s0vtpwrhmskblr0000gp/T/114112-26888-1dnohiz/submodules/SafariLauncher/build/Debug-iphoneos/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

parseFileSync() is deprecated. Use parseStringSync() instead.

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/sas/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,“sendKeyStrategy”:“grouped”}

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

info: [debug] Dynamic bootstrap path: /Users/sas/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js

info: [debug] Reusing dynamic bootstrap: /Users/sas/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.js

info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“iPad”,“platformVersion”:“8.1”}

info: [debug] fixDevice is on

info: [debug] Final device string is: ‘iPad (8.1 Simulator)’

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: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 71025dee76d37d3fb8be2475f2b89705f80096d5 --bundle com.bytearc.SafariLauncher

info: [debug] Installing app using cmd: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id 71025dee76d37d3fb8be2475f2b89705f80096d5 --bundle “/var/folders/_5/h_pymt_x25s0vtpwrhmskblr0000gp/T/114112-26888-1dnohiz/submodules/SafariLauncher/build/Debug-iphoneos/SafariLauncher.app”

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 71025dee76d37d3fb8be2475f2b89705f80096d5

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 71025dee76d37d3fb8be2475f2b89705f80096d5 com.byte -e UIASCRIPT “/Users/sas/Library/Application Support/appium/bootstrap/bootstrap-0943baae6b1d6f5b.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] 2014-12-02 14:22:28.081 instruments[26922:1086468] 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] 2014-12-02 08:52:32 +0000 Debug: evaluation finished

info: [debug] [INST] 2014-12-02 08:52:32 +0000 Debug: responding with:

info: [debug] [INST] 2014-12-02 08:52:32 +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] 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] 2014-12-02 08:52:33 +0000 Debug: Got new command 1 from instruments: au.setScreenOrientation(‘PORTRAIT’)

info: [debug] [INST] 2014-12-02 08:52:33 +0000 Debug: evaluating au.setScreenOrientation(‘PORTRAIT’)

info: [debug] [INST] 2014-12-02 08:52:33 +0000 Debug: target.setDeviceOrientation(“1”)

info: [debug] [INST] 2014-12-02 08:52:34 +0000 Debug: evaluation finished

info: [debug] [INST] 2014-12-02 08:52:34 +0000 Debug: responding with:

info: [debug] [INST] 2014-12-02 08:52: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”:“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] 2014-12-02 08:52:35 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()

info: [debug] [INST] 2014-12-02 08:52:35 +0000 Debug: evaluating au.mainApp().getTreeForXML()

info: [debug] [INST] 2014-12-02 08:52:35 +0000 Debug: evaluation finished

info: [debug] [INST] 2014-12-02 08:52:35 +0000 Debug: responding with:abled":true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0",“x”:0,“y”:0,“width”:768,“height”:1024},">":[{“UIAStaticText”:{"@":{“name”:“Safari Launcher”,“label”:“Safari Launcher”,“value”:“Safari Launcher”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/0",“x”:192,“y”:512,“width”:384,“height”:50},">":[]}},{“UIAStaticText”:{"@":{“name”:" Pausing 04 seconds before launch",“label”:" Pausing 04 seconds before launch",“value”:" Pausing 04 seconds before launch",“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0/1",“x”:0,“y”:974,“width”:768,“height”:50},">":[]}}]}},{“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},">":[{“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”:768,“height”:20},">":[{“UIAElement”:{"@":{“name”:“iPad”,“label”:“iPad”,“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”:25,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“3 of 3 Wi-Fi bars”,“label”:“3 of 3 Wi-Fi bars”,“value”:“guest”,“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”:36,“y”:0,“width”:13,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“2:22 pm”,“label”:“2:22 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/1/0/2",“x”:361,“y”:0,“width”:46,“height”:20},">":[]}},{“UIAElement”:{"@":{“name”:“Bluetooth on”,“label”:“Bluetooth on”,“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”:682,“y”:0,“width”:8,“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/4",“x”:696,“y”:0,“width”:67,“height”:20},">":[]}}]}}]}}]}}}

info: [debug] [INST] 2014-12-02 08:52: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”:{“UIAApplication”:{"@":{“name”:“SafariLauncher”,“label”:“SafariLauncher”,"value…

info: [debug] Socket data received (3119 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”:20,“width”:768,“height”:1004},">":[{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,"en

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] Error: Could not navigate to webview! Err: Error: connect ECONNREFUSED

at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1556:12)

at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-controller.js:1532:14)

at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/webkit-remote-debugger.js:73:14)

at ClientRequest.<anonymous> (/Applications/Appium.app/Contents/Resources/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 15864.341 ms - 248

error: Failed to start an Appium session, err was: Error: Could not navigate to webview! Err: Error: connect ECONNREFUSED

I have the same error.

on github exists a issue

hopefully you can fix this

Hi All,

I was also facing this webkit crashing issue and trying its work around “./bin/ios-webkit-debug-proxy-launcher.js -c :27753 -d”

first i did “cd /usr/local/bin” on terminal
then “ios-webkit-debug-proxy-launcher.js -c ca666e295c7cd5a893e376989f3c4a3b24987534:27753 –d”

it says "command not found "

PLEASE HELP

thanks