title: Appium Not Running Xcode 12.3
body: <p>I'm trying to use Appium version 1.19.1 to test an ipad app on a physical ipad device that I have built with Xcode 12.3. Previously this has worked as expected, but recently I have not been able to get Appium to run at all, and I suspect that Xcode 12.3 may be the issue based on what I have discovered.</p>
  <p>When I try to run Appium from python this is the trace printed to my python console (device serial number/udid intentionally hidden):</p>
  <pre><code>    File &quot;/Users/opt/anaconda3/lib/python3.7/site-packages/appium/webdriver/webdriver.py&quot;, line 155, in __init__
      proxy
    File &quot;/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py&quot;, line 157, in __init__
      self.start_session(capabilities, browser_profile)
    File &quot;/Users/opt/anaconda3/lib/python3.7/site-packages/appium/webdriver/webdriver.py&quot;, line 225, in start_session
      response = self.execute(RemoteCommand.NEW_SESSION, parameters)
    File &quot;/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py&quot;, line 321, in execute
      self.error_handler.check_response(response)
    File &quot;/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py&quot;, line 242, in check_response
      raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
  xcodebuild error message:
  
  2021-01-06 17:04:24.366 xcodebuild[16217:213101] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 &quot;The folder “WebDriverAgentRunner_iphoneos14.3-arm64.xctestrun” doesn’t exist.&quot; UserInfo={NSFilePath=/Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products/WebDriverAgentRunner_iphoneos14.3-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7fb116ac6ad0 {Error Domain=NSPOSIXErrorDomain Code=2 &quot;No such file or directory&quot;}}
  ** TEST BUILD FAILED **
  2021-01-06 17:04:24.380 xcodebuild[16217:213102]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
  /Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-22--0600.xcresult/Staging/2_Test/Diagnostics/WebDriverAgentRunner-E1E91CAE-6813-4009-872F-D9B73C898BBD/WebDriverAgentRunner-0D722399-E7A6-4474-8791-593FA62358F6/Session-WebDriverAgentRunner-2021-01-06_170424-nMI8G0.log
  2021-01-06 17:04:24.382 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: (DF79B2A2-04AF-4A59-87B7-DBB8279EC46E) Beginning test session WebDriverAgentRunner-DF79B2A2-04AF-4A59-87B7-DBB8279EC46E at 2021-01-06 17:04:24.381 with Xcode 12C33 on target &lt;DVTiOSDevice (0x7fb11a157e10), ****, iPad, 14.3 (18C66), ****&gt; {
          deviceSerialNumber:         ****
          identifier:                 ****
          deviceClass:                iPad
          deviceName:                 ****
          deviceIdentifier:           ****
          productVersion:             14.3
          buildVersion:               18C66
          deviceSoftwareVersion:      14.3 (18C66)
          deviceArchitecture:         arm64e
          deviceTotalCapacity:        249024532480
          deviceAvailableCapacity:    240144109568
          deviceIsTransient:          NO
          ignored:                    NO
          deviceIsBusy:               NO
          deviceIsPaired:             YES
          deviceIsActivated:          YES
          deviceActivationState:      Activated
          isPasscodeLocked:           NO
          deviceType:                 &lt;DVTDeviceType:0x7fb113d0a3d0 Xcode.DeviceType.iPhone&gt;
          supportedDeviceFamilies:    (
      1,
      2
  )
          applications:              (null)
          provisioningProfiles:      (null)
          hasInternalSupport:        NO
          hasWritableSystem:         NO
          isSupportedOS:             YES
          bootArgs:                  (null)
          nextBootArgs:              (null)
          connected:                 YES
          isWirelessEnabled:         NO
          connectionType:            direct
          hostname:                  (null)
          bonjourServiceName:        ****
          activeProxiedDevice:       (null)
          } (14.3 (18C66))
  2021-01-06 17:04:24.498 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: (****) Finished requesting crash reports. Continuing with testing.
  *** If you believe this error represents a bug, please attach the result bundle at /Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-22--0600.xcresult
  2021-01-06 17:04:24.514 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: 0.141 elapsed -- Testing started completed.
  2021-01-06 17:04:24.514 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
  2021-01-06 17:04:24.514 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: 0.141 sec, +0.141 sec -- end
  Test session results, code coverage, and logs:
      /Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-22--0600.xcresult
  Testing failed:
      Building for iOS, but the embedded framework 'CocoaAsyncSocket.framework' was built for iOS + iOS Simulator.
      Building for iOS, but the embedded framework 'YYCache.framework' was built for iOS + iOS Simulator.
      Building for iOS, but the linked and embedded framework 'CocoaAsyncSocket.framework' was built for iOS + iOS Simulator.
      Building for iOS, but the linked and embedded framework 'YYCache.framework' was built for iOS + iOS Simulator.
      WebDriverAgentRunner:
          WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-22--0600.xcresult. (Underlying Error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying Error: The operation couldn’t be completed. No such file or directory)))
  ** TEST EXECUTE FAILED **
  Testing started. 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.
  </code></pre>
  <p>Through researching I came across <a href="https://stackoverflow.com/a/65315026/1489990">this answer</a> which linked to <a href="https://developer.apple.com/forums/thread/669411?answerId=652663022#652663022" rel="nofollow noreferrer">an apple developer forum post</a> that leads me to believe the issue is with one of the frameworks that appium must be using that is not cooperating with Xcode 12.3.</p>
  <p>I have also come across <a href="https://stackoverflow.com/a/65306886/1489990">another suggestion</a> that I tried but it did not fix my issue.</p>
  <p>Also, this is what I'm seeing in <code>Test-WebDriverAgentRunner-2021.01.06_17-04-19--0600.xcresult</code>:</p>
  <pre><code>  Assertions: System: Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-19--0600.xcresult. (Underlying Error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying Error: The operation couldn’t be completed. No such file or directory))
  </code></pre>
  <p>So is there anything else I can try at this point, or is this going to come down to a framework being used by appium needing to be updated? Any ideas or suggestions are definitely appreciated!</p>