Connection refused error when using wdaLocalPort

Hello,

Problem
I am having issues with my real iOS devices connecting to my appium server when sending any wdaLocalPort other than 8100 to Appium. I want to be able to use wdaLocalPort so that I can run some parallel tests.

Environnment
Here are the capabilities i am sending:
capabilities = {}
capabilities[“platformName”] = “iOS”
capabilities[“automationName”] = “XCUITest”
capabilities[“deviceName”] = “TestDevice”
capabilities[“udid”] = “udid”
capabilities[“wdaLocalPort”] = 8101
capabilities[“app”] = “settings”
capabilities[“usePrebuiltWDA”] = “true”

Running on a Macbook(intel)
MacOS: 12.6.8
appium: 2.0.1
xcuitest: 4.34.0
Mobile platform/version under test: 15.7

I am building the WebDriverAgentRunner from the xcodeproj that comes with the xcuitest driver

Logs
Here are my appium logs when trying to connect:

Funny thing is if I send the default wdaLocalPort(8100) my device can connect to my appium server perfectly fine.
I was wondering if anyone had any clue what could be the cause of this? Is there some kind of setting i should be tweaking within the xcode project when i am building wda for my device?

you did not mention what error you see while having issue …

hello. has this issue been resolved? I had same issue.

Hi, I get the same issue as @sonny_uplavan - i’m able to run the ios automation when the wdaLocalPort is set to 8100 but when it’s set to any other port number (8101 for exp) I get something like this:

[XCUITestDriver@81cc (4ad14761)] Proxying [GET /status] to [GET http://127.0.0.1:8101/status] with no body

[iProxy@00008030:8101] Connection was refused to port 8101

[XCUITestDriver@81cc (4ad14761)] socket hang up

[Xcode] xcodebuild exited with code ‘70’ and signal ‘null’

I’m using Appium v2.3.0 but also get this issue on latest version (Appium v2.11.1) . @sonny_uplavan - did you manage to resolve this? If so how? My appium logs are attached:

appium_logs.txt (21.3 KB)

I got the same problem, after the appium and wda update, WDA starts only on the default port, when i try other ports using wdaLocalPort capability it shows an error “socket hang up”