title: Appium (and desktop) unable to launch wda session since xCode13 and iOS15
body: <p>Since my xCode got (automatically...) updated to 13 and all my simulators moved from iOS 14.5 to 15. with the same setup / commands I'm unable to launch the WDA from both the desktop app, and the node ( selenium server grid/node setup)</p>
  <p>The issue exists for all simulators.
  I can still use real device..</p>
  <p>(the actual ports in errors might differ, the first one is from the actual automation where it fails, the 2nd and 3rd is from the desktop app -where it still fails with the same error. the root issue is still the same on both)</p>
  <p>The error logs I get:
  In short:</p>
  <pre><code>org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: 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 the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8205
  Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
  System info: host: 'Janoss-MacBook-Pro.local', ip: 'fe80:0:0:0:18e4:52:307c:8c7b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '11.5', java.version: '11.0.11'
  Driver info: driver.version: IOSDriver
  remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: 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 the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8205
      at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
      at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)
  Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
  System info: host: 'Janoss-MacBook-Pro.local', ip: 'fe80:0:0:0:18e4:52:307c:8c7b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '11.5', java.version: '11.0.11'
  Driver info: driver.version: IOSDriver
  </code></pre>
  <p>The longer error from the server:</p>
  <pre><code>[iOSSim] Got Simulator UI client PID: 11815
  [iOSSim] Both Simulator with UDID 'F5A500AB-FAA5-41A0-A009-E5A8EDB8643A' and the UI client are currently running
  [BaseDriver] Event 'simStarted' logged at 1632487969688 (14:52:49 GMT+0200 (Central European Summer Time))
  [WebDriverAgent] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
  [DevCon Factory] Requesting connection for device F5A500AB-FAA5-41A0-A009-E5A8EDB8643A on local port 8100
  [DevCon Factory] Cached connections count: 0
  [DevCon Factory] Successfully requested the connection for F5A500AB-FAA5-41A0-A009-E5A8EDB8643A:8100
  [XCUITest] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
  [WD Proxy] Matched '/status' to command name 'getStatus'
  [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
  [WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
  [WebDriverAgent] WDA is not listening at 'http://127.0.0.1:8100/'
  [WebDriverAgent] WDA is currently not running. There is nothing to cache
  [XCUITest] Trying to start WebDriverAgent 2 times with 10000ms interval
  [XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
  [BaseDriver] Event 'wdaStartAttempted' logged at 1632487969773 (14:52:49 GMT+0200 (Central European Summer Time))
  [WebDriverAgent] Launching WebDriverAgent on the device
  [WebDriverAgent] WebDriverAgent does not need a cleanup. The sources are up to date (1620631774000 &gt;= 1620631774000)
  [WebDriverAgent] Killing running processes 'xcodebuild.*F5A500AB-FAA5-41A0-A009-E5A8EDB8643A, F5A500AB-FAA5-41A0-A009-E5A8EDB8643A.*XCTRunner, xctest.*F5A500AB-FAA5-41A0-A009-E5A8EDB8643A' for the device F5A500AB-FAA5-41A0-A009-E5A8EDB8643A...
  [WebDriverAgent] 'pgrep -if xcodebuild.*F5A500AB-FAA5-41A0-A009-E5A8EDB8643A' didn't detect any matching processes. Return code: 1
  [WebDriverAgent] 'pgrep -if F5A500AB-FAA5-41A0-A009-E5A8EDB8643A.*XCTRunner' didn't detect any matching processes. Return code: 1
  [WebDriverAgent] 'pgrep -if xctest.*F5A500AB-FAA5-41A0-A009-E5A8EDB8643A' didn't detect any matching processes. Return code: 1
  [WebDriverAgent] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=F5A500AB-FAA5-41A0-A009-E5A8EDB8643A IPHONEOS_DEPLOYMENT_TARGET=15.0 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent'
  [WebDriverAgent] Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability
  [WebDriverAgent] Waiting up to 60000ms for WebDriverAgent to start
  [WD Proxy] Matched '/status' to command name 'getStatus'
  [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
  [WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
  [WD Proxy] Matched '/status' to command name 'getStatus'
  [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
  [WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
  </code></pre>
  <p>Then a long waiting with only the ECONNREFUSED error and finally failing:</p>
  <pre><code>[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
  [WD Proxy] connect ECONNREFUSED 127.0.0.1:8100
  [XCUITest] Failed to create WDA session (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:8100). Retrying...
  [XCUITest] UnknownError: 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:8100
  [XCUITest]     at JWProxy.command (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:274:13)
  [XCUITest]     at runMicrotasks ()
  [XCUITest]     at processTicksAndRejections (internal/process/task_queues.js:85:5)
  [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 the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8100
  [XCUITest] Quitting and uninstalling WebDriverAgent
  [WebDriverAgent] Shutting down sub-processes
  [iOSSim] Building bundle path map
  [iOSSim] The simulator has '1' bundles which have 'WebDriverAgentRunner-Runner' as their 'CFBundleName':
  [iOSSim]     'com.jano.facebook.WebDriverAgentRunner.xctrunner'
  [WebDriverAgent] Uninstalling WDAs: 'com.jano.facebook.WebDriverAgentRunner.xctrunner'
  [XCUITest] {}
  [DevCon Factory] Releasing connections for F5A500AB-FAA5-41A0-A009-E5A8EDB8643A device on any port number
  [DevCon Factory] Found cached connections to release: [&quot;F5A500AB-FAA5-41A0-A009-E5A8EDB8643A:8100&quot;]
  [DevCon Factory] Cached connections count: 0
  [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
  [IOSSimulatorLog] Stopping iOS log capture
  [BaseDriver] Event 'newSessionStarted' logged at 1632488146662 (14:55:46 GMT+0200 (Central European Summer Time))
  [MJSONWP] Encountered internal error running command: Error: 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 the remote server. Original error: connect ECONNREFUSED 127.0.0.1:8100
  [MJSONWP]     at quitAndUninstall (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:544:15)
  [MJSONWP]     at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:610:11
  [MJSONWP]     at wrapped (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:60:13)
  [MJSONWP]     at retry (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:43:13)
  [MJSONWP]     at retryInterval (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:70:10)
  [MJSONWP]     at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:559:7
  [HTTP] &lt;-- POST /wd/hub/session 500 177858 ms - 388
  [HTTP] 
  [HTTP] --&gt; DELETE /wd/hub/session
  </code></pre>