Unable to start WebDriverAgent session because of xcodebuild failure

I am using Appium to run my tests against real iPad Safari.
The setup works fine and the tests are running fine.
But after a few hours, Appium breaks at a step where it takes a screenshot.

I restart Appium after every test suite (which is around 30 mins)
So, usually there is no problem upto 10 suites. But after that it breaks at a step where it take the screenshot.
And it doesnt get started properly after that for some time.

Below are the logs when Appium is restarted after the screenshot broke.
(BTW, I do not see any error in the logs when Appium breaks when the screenshot is taken.)

Any help would be highly appreciated!

Detailed logs attached.

[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [XCUITest] Unable to start WebDriverAgent session because of xcodebuild failure: “An unknown server-side error occurred while processing the command. Original error: CoulAppium_log.txt (15.7 KB)
d not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100”. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device

Hello,
Have you tried the below desired capability (IOSMobileCapabilityType):
caps.setCapability(USE_PREBUILT_WDA, true);

It won’t try to build WebDriverAgent on each run, instead it will use the one’s that already installed on the first step.

Hope it helps.
Cheers!

1 Like

That did not help.

[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [XCUITest] Unable to start WebDriverAgent session because of xcodebuild failure: “An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100”.

Attaching the logs.

Appium.txt (15.9 KB)

@gadagojusantu try move to appium 1.10.0 version

I have the same problem with the version 1.10.0.
The tests start and run for some time and then breaks at some point of time.

After that, all the tests fail with the following error:

[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [XCUITest] Unable to start WebDriverAgent session because of xcodebuild failure: “An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100”.

can not suggest anything… try to change 8100 port with using “wdaLocalPort” capability.

I’m still facing the same issue. Can you please suggest the solution ?

Even I’m facing this issue and stuck at this part! please someone tell the solution

57

I set some options as screenshot and seemly the issue is disappear.

You can set as same as mine and check. You can also set Local Timezone

I am using appium 1.20.1

I had a similar issue 4 years later, and this allowed me to connect.