iOS Connectivity issues : Could not connect to WebKitRemoteDebugger server

Hi , We are facing following issue with iPhone 5&6 while launching Safari browser. Please help.

  error: [REMOTE] Could not connect to WebKitRemoteDebugger server

  error: Failed to start an Appium session, err was: Error: Could not navigate to webview! Err: Error:    getaddrinfo ENOTFOUND localhost

info: [debug] Error: Could not navigate to webview! Err: Error: getaddrinfo ENOTFOUND localhost

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

at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1543:21

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

at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-hybrid.js:62:21)

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:883:21)

at ClientRequest.emit (events.js:107:17)

at Socket.socketErrorListener (_http_client.js:272:9)

at Socket.emit (events.js:107:17)

Are you running ios webkit debug proxy server?

Hi @RaviK,

Please install and run ios_webkit_debug_proxy (if you have not done yet), you shoud see something like this : Listing devices on :9221
Connected :9222 to YOURDEVICENAME(UDID).

It is recommended to run ios-webkit-debug-proxy-launcher.js if the debugger crashes in between.
Please let me know if you still face the issues or need more info.

THANKS,
Amarnath Rayudu

2017-01-11 05:27:55:507 - error: [REMOTE] Could not connect to WebKitRemoteDebugger server
2017-01-11 05:27:55:510 - error: Failed to start an Appium session, err was: Error: Could not navigate to webview! Err: Error: connect ECONNREFUSED 127.0.0.1:27753