Azure macOS Microsoft-hosted agent - [XCUITestDriver] connect ECONNREFUSED 127.0.0.1:8100

Hi, I have an issue with running Appium on Azure macOS Microsoft-hosted agent, the webDriverAgent cannot be started on the simulator and fails with timeout even though I increased it to 360 s.
Locally with the same configuration, Appium works fine.

VM is fresh, and no Appium is installed before the test run(so a solution like reinstalling Appium doesn’t help).

Configuration:
xcode: 14.0.1
iphonesimulator: 16.0
appium version: 2.0.0-beta.46
xcuitest: 4.12.2

Test running steps:
npm install -g appium@next
appium driver install xcuitest
appium plugin install execute-driver
appium --address=127.0.0.1 --port 4723 --use-plugins=execute-driver
dotnet test

Capabilities:
Creating session with W3C capabilities: {
“alwaysMatch”: {
“platformName”: “iOS”,
“appium:app”: “/test-app.zip”,
“appium:automationName”: “XCuiTest”,
“appium:deviceName”: “iPhone SE (3rd generation)”,
“appium:platformVersion”: “16.0”,
“appium:autoAcceptAlerts”: true,
“appium:launchTimeout”: 160000,
“appium:clearSystemFiles”: true,
“appium:showXcodeLog”: true,
“appium:useNewWDA”: false,
“appium:usePrebuiltWDA”: true,
“appium:wdaStartupRetries”: “4”,
“appium:iosInstallPause”: “8000”,
“appium:wdaStartupRetryInterval”: “20000”,
“appium:wdaLaunchTimeout”: 300000,
“appium:newCommandTimeout”: 300
},
“firstMatch”: [
{}
]
}

1 Like

2022-11-08T08:45:28.8136680Z [debug] [XCUITestDriver@28b0] “appium:usePrebuiltWDA”: true,

and then

2022-11-08T08:51:06.5287740Z [Xcode] Testing failed:
2022-11-08T08:51:06.5289350Z [Xcode] Test target WebDriverAgentRunner encountered an error (The bundle identifier for WebDriverAgentRunner-Runner.app couldn’t be read. No such file or directory: “/Users/runner/Library/Developer/Xcode/DerivedData/WebDriverAgent-dtmoeonrefnxsncuficthanbldlc/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app”.)

which is completely expected as there is nothing prebuilt to use.

Thank you for your response!
I rerun the test with usePrebuiltWDA: false

And I’m still getting the error:

connect ECONNREFUSED 127.0.0.1:8100

It’s a log file from the last run.

The problem was fixed by adding 10 minutes timeout.