Appium 1.7.1 -XCode 9.2 Simulators issue - Could not navigate to webview! Err: connect ECONNREFUSED


#1

When running tests on Simulator in XCode 9.2 i got following error:

[debug] [XCUITest] WebDriverAgent running on ip ‘192.168.137.81’
[debug] [XCUITest] WebDriverAgent successfully started after 11182ms
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1513855591524 (19:26:31 GMT+0800 (+08))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {“desiredCapabilities”:{“bundleId”:“com.apple.mobilesafari”,“arguments”:["-u",“http://0.0.0.0:4723/welcome"],“shouldWaitForQuiescence”:true,“shouldUseTestManagerForVisibilityDetection”:false,“maxTypingFrequency”:60,"shouldUseSingletonTestManager”:true}}
[HTTP] --> GET /welcome {}
[debug] [HTTP] Sending welcome response with params: {“message”:“Let’s browse!”}
[HTTP] <-- GET /welcome 200 1 ms - 124
[debug] [JSONWP Proxy] Got response with status 200: {“value”:{“sessionId”:“72E3DFC9-6B6A-459C-A1B6-EAE3CE6DD0D9”,“capabilities”:{“device”:“ipad”,“browserName”:“Safari”,“sdkVersion”:“10.1”,“CFBundleIdentifier”:“com.apple.mobilesafari”}},“sessionId”:“72E3DFC9-6B6A-459C-A1B6-EAE3CE6DD0D9”,“status”:0}
[debug] [BaseDriver] Event ‘wdaSessionStarted’ logged at 1513855594610 (19:26:34 GMT+0800 (+08))
[debug] [XCUITest] Cannot find a match for DerivedData folder path from lsof. Trying to access logs
[XCUITest] Setting ‘555’ permissions to ‘/Users/iPoS/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/Attachments’ folder
[debug] [BaseDriver] Event ‘wdaPermsAdjusted’ logged at 1513855594675 (19:26:34 GMT+0800 (+08))
[debug] [BaseDriver] Event ‘wdaStarted’ logged at 1513855594675 (19:26:34 GMT+0800 (+08))
[debug] [XCUITest] Setting initial orientation to ‘PORTRAIT’
[debug] [JSONWP Proxy] Proxying [POST /orientation] to [POST http://localhost:8100/session/72E3DFC9-6B6A-459C-A1B6-EAE3CE6DD0D9/orientation] with body: {“orientation”:“PORTRAIT”}
[debug] [JSONWP Proxy] Got response with status 200: {“value”:{},“sessionId”:“72E3DFC9-6B6A-459C-A1B6-EAE3CE6DD0D9”,“status”:0}
[debug] [BaseDriver] Event ‘orientationSet’ logged at 1513855595855 (19:26:35 GMT+0800 (+08))
[debug] [XCUITest] Waiting for initial webview
[debug] [iOS] Navigating to most recently opened webview
[debug] [iOS] Retrieving contexts and views
[debug] [iOS] Selecting by url: true (expected url: ‘http://0.0.0.0:4723/welcome’)
[debug] [RemoteDebugger] useNewSafari --> false
[XCUITest] Error: Could not navigate to webview! Err: connect ECONNREFUSED ::1:27753
at XCUITestDriver.spinHandles$ (…/…/…/lib/commands/context.js:510:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
Error: Could not navigate to webview! Err: connect ECONNREFUSED ::1:27753
at XCUITestDriver.spinHandles$ (…/…/…/lib/commands/context.js:510:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at


#2

Any luck with that? I’m seeing the same issue.