org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Unable to start WebDriverAgent: Error: We were not able to retrieve the /status response from the WebDriverAgent server after 3000ms timeout.Try to increase the value of ‘appium:wdaLaunchTimeout’ capability as a possible workaround.
This is the error I get after the application is installed on simulator programatically, and the WebDriverAgent is not started.
[AppiumDriver@1e90] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: Unable to start WebDriverAgent: Error: We were not able to retrieve the /status response from the WebDriverAgent server after 3000ms timeout.
macOs Sonoma14.2.1
Xcode 15.2
appium -v
2.4.0
appium driver list --installed
Listing installed drivers
Was it working before?
Looks like issue with webdriver configuration when setting up Appium. You need to configure it properly in order to use it with simulator or real device. You can follow the steps from appium website or from this video -
I am also facing same issue while launching the agent .here the IPA file is successfully installed but the time it should install the runner app and launch the agent same error as mentioned in description is appeared.
System Details :-
Mac OS :- Sonoma 14.4 (23E214)
Xcode :- 15.2 and even updated to 15.3
Appium - 2.5.1
Node -21.7.1
npm -10.5.0
IPAD with IOS :-17.4
Please suggest
Below are the log details for your reference :-
XCUITestDriver@d422] Matched ‘/status’ to command name ‘getStatus’
[XCUITestDriver@d422] Proxying [GET /status] to [GET http://127.0.0.1:8121/status] with no body
[XCUITestDriver@d422] connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] Matched ‘/status’ to command name ‘getStatus’
[XCUITestDriver@d422] Proxying [GET /status] to [GET http://127.0.0.1:8121/status] with no body
[XCUITestDriver@d422] connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] Matched ‘/status’ to command name ‘getStatus’
[XCUITestDriver@d422] Proxying [GET /status] to [GET http://127.0.0.1:8121/status] with no body
[XCUITestDriver@d422] connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] Matched ‘/status’ to command name ‘getStatus’
[XCUITestDriver@d422] Proxying [GET /status] to [GET http://127.0.0.1:8121/status] with no body
[XCUITestDriver@d422] connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] Error: Unable to connect to running WebDriverAgent: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] at /Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:393:17
[XCUITestDriver@d422] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[XCUITestDriver@d422] at wrapped (/Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:93:13)
[XCUITestDriver@d422] at retry (/Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:66:13)
[XCUITestDriver@d422] at retryInterval (/Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:103:10)
[XCUITestDriver@d422] at XcodeBuild.waitForStart (/Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:377:7)
[XCUITestDriver@d422] at /Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:359:26
[XCUITestDriver@d422] Unable to start WebDriverAgent: Error: We were not able to retrieve the /status response from the WebDriverAgent server after 60000ms timeout.Try to increase the value of ‘appium:wdaLaunchTimeout’ capability as a possible workaround.
[XCUITestDriver@d422] Matched ‘/status’ to command name ‘getStatus’
[XCUITestDriver@d422] Proxying [GET /status] to [GET http://127.0.0.1:8121/status] with no body
[XCUITestDriver@d422] connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] Matched ‘/status’ to command name ‘getStatus’
[XCUITestDriver@d422] Proxying [GET /status] to [GET http://127.0.0.1:8121/status] with no body
[XCUITestDriver@d422] connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] Matched ‘/status’ to command name ‘getStatus’
[XCUITestDriver@d422] Proxying [GET /status] to [GET http://127.0.0.1:8121/status] with no body
[XCUITestDriver@d422] connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] Error: Unable to connect to running WebDriverAgent: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8121
[XCUITestDriver@d422] at /Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:393:17
[XCUITestDriver@d422] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[XCUITestDriver@d422] at wrapped (/Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:93:13)
[XCUITestDriver@d422] at retry (/Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:66:13)
[XCUITestDriver@d422] at retryInterval (/Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/asyncbox/lib/asyncbox.js:103:10)
[XCUITestDriver@d422] at XcodeBuild.waitForStart (/Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:377:7)
[XCUITestDriver@d422] at /Users/admin/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/lib/xcodebuild.js:359:26
[XCUITestDriver@d422] Unable to start WebDriverAgent: Error: We were not able to retrieve the /status response from the WebDriverAgent server after 60000ms timeout.Try to increase the value of ‘appium:wdaLaunchTimeout’ capability as a possible workaround.
I had the same issue updated to Xcode 15.3 and iOS appium tests stopped working.
Infact cannot create a new session via Appium inspector too
And my Android test would run fine
I fixed it with below steps
updated appium server to 2.5.1 (still issue persisted)
updated xcuitest appium → driver update xcuitest (to latest, still the issue persisted)
updated appium java client dependency to 9.2.2 (still issue persisted)
Now apple been apple when you update Xcode does not really update the iOS version in my case to iOS 17.4 screenshot below, so go Xcode > Settings