WDA is not listening at 'http://localhost:8100/'

I’m working through the Appium Pro Intro Workshop. I’m working on Mac Catalina 10.15.4, XCode version 11.4.
In the Appium Session Video/Module, The AndroidCapabilitiesTest runs fine.
The IOSCapabilitiesTest does not.
I can see on the iPhone 11(running 13.3) simulator the installation and removal of TheApp and the WebDriverAgent. It appears that Xcode automation can’t communicate with WebDriverAgent.

Here is some of the log: [DevCon Factory] Successfully requested the connection for FC279262-79F5-4A9B-9054-791D2504BEB6:8100

[debug] [XCUITest] Starting WebDriverAgent initialization with the synchronization key ‘XCUITestDriver’

[debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’

[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body

[WD Proxy] Got an unexpected response with status undefined: {“errno”:-61,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:8100}

[debug] [XCUITest] WDA is not listening at ‘http://localhost:8100/

[debug] [XCUITest] WDA is currently not running. There is nothing to cache

[debug] [XCUITest] Trying to start WebDriverAgent 2 times with 10000ms interval

[debug] [XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities

[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1586642218288 (17:56:58 GMT-0400 (Eastern Daylight Time))

[XCUITest] Launching WebDriverAgent on the device

[WebDriverAgent] Fetching dependencies

[WebDriverAgent] Dependencies up-to-date

[debug] [XCUITest] Killing running processes ‘xcodebuild.*FC279262-79F5-4A9B-9054-791D2504BEB6, FC279262-79F5-4A9B-9054-791D2504BEB6.*XCTRunner, xctest.*FC279262-79F5-4A9B-9054-791D2504BEB6’ for the device FC279262-79F5-4A9B-9054-791D2504BEB6…

[debug] [XCUITest] ‘pgrep -ifn xcodebuild.*FC279262-79F5-4A9B-9054-791D2504BEB6’ didn’t detect any matching processes. Return code: 1

[debug] [XCUITest] ‘pgrep -ifn FC279262-79F5-4A9B-9054-791D2504BEB6.*XCTRunner’ didn’t detect any matching processes. Return code: 1

[debug] [XCUITest] ‘pgrep -ifn xctest.*FC279262-79F5-4A9B-9054-791D2504BEB6’ didn’t detect any matching processes. Return code: 1

[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=FC279262-79F5-4A9B-9054-791D2504BEB6 IPHONEOS_DEPLOYMENT_TARGET=13.3 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent’

[debug] [XCUITest] Output from xcodebuild will only be logged if any errors are present there. To change this, use ‘showXcodeLog’ desired capability

[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start

[debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’

[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body

[WD Proxy] Got an unexpected response with status undefined: {“errno”:-61,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:8100}

[debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’

[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body

It keeps trying and eventually fails.

Interestingly, the test appears to rerun or at least I see TheApp and the WebDriverAgent uninstalled and reinstalled twice before the test fails.

I’m thinking I have an XCUITest/XCode and WebDriverAgent version incompatibility issue.

Any feedback on this would be great as I’ve been stuck on this too long.

Thank you.

Jack

Make sure the WebDriverAgent sources are signed properly and can be installed on the device. Consider enabling xcodebuild logs in caps to track WDA build progress and make sure you follow https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md

Hi Mykola-Mokhnach. Thank you for replying

The WDA does get installed on the device.

I’ll look into determining if the WDA is signed properly and will trying enabling xcode build logs in caps.

I’m using a simulator and working through Appium Pro Intro Workshop, but will check out that document to see if there is something relevant.

Thank you.

If this is a simulator then no signing is required. Check xcodebuild logs and make sure you use the most recent Appium server version

Thank you. Sorry for the long delay.

I’m running v1.16.0 of the Appium Server from the command line.
I have v1.15.1 desktop version as well but it crashes if I try to use it so I don’t.
There is not problem building the WDA as it gets deployed.
Build log looks good:
SLF010#22%[email protected]#39"Xcode.IDEActivityLogDomainType.BuildLog63"Testing project WebDriverAgent with scheme WebDriverAgentRunner63"Testing project WebDriverAgent with scheme WebDriverAgentRunnera9dd97fc3427c241^2e7679fd3427c241^-125"note: Using new build system
note: Building targets in parallel
note: Planning build
note: Using build description from disk
4(21%[email protected]"Using new build system-609118713#18446744073709551615#0#-0#–6"Notice–[email protected]"Building targets in parallel-609118713#18446744073709551615#0#-0#–6"Notice–[email protected]"Planning build-609118713#18446744073709551615#0#-0#–6"Notice–[email protected]"Using build description from disk-609118714#18446744073709551615#0#-0#–6"Notice–0#0#0#—36"723E3BBF-3703-47A9-8302-72B8C3228C0915"Build succeeded-

My V1.6.0 Appium Server output clearly shows that it can’t connect to the WDA:
Proxying [GET /status] to [GET http://localhost:8100/status] with no body

[WD Proxy] Got an unexpected response with status undefined: {“errno”:-61,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:8100}

I tried checking for ports listening while running the IOSCapabilitiesTest via:
lsof -nP +c 15 | grep LISTEN (less the stars)
But nothing is running on 8100 before during or after the test.

Might I need to do something with IOS security or even my router to to allow 8100?

Any help is much appreciated as I’m dead in the water.

Jack

1 Like

Hey @Jack_Mason I am facing the exact situation since last two days. What did you do to eliminate the error? Please help, any help will be greatly appreciated.
Appium: 1.16.0
Xcode: 11.5
IOS: 13.2