Xcode 12: CompileAssetCatalog Unity-iPhone/Images.xcassets fails - ios

Ever since updating to Xcode 12 our CI machine has been getting weird error when executing command line build with xcodebuild. Same error won't occure in Xcode where the same build gets archived and build correctly. It seems that the cause of the build process error is this:
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/Unity-iPhone/Images.xcassets: error: Failed to find newest available Simulator runtime
Underlying Errors:
Description: No available runtime found from: [
watchOS 7.0 (7.0 - 18R382) - com.apple.CoreSimulator.SimRuntime.watchOS-7-0 (unavailable, failed to open liblaunch_sim.dylib) ==> not available: Error Domain=com.apple.CoreSimulator.SimError Code=401 "The watchOS 7.0 simulator runtime is not available." UserInfo={NSLocalizedDescription=The watchOS 7.0 simulator runtime is not available., NSUnderlyingError=0x7f9d4d038cb0 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedFailureReason=XPC error talking to SimLaunchHostService: <error: 0x7fff8f3a89a0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x7fff8f3a8b08> { length = 18, contents = "Connection invalid" }
Which is pretty weird because our project does not target Apple watchOS.
Any clues or ideas how to tackle the issue? This issue does not occure on my computer that runs same Xcode 12 version and has been updated to the latest OSX version.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project Builds/temp/Unity-iPhone.xcodeproj -scheme Unity-iPhone -sdk iphoneos -configuration Release archive -archivePath Builds/temp/archive/app.xcarchive -derivedDataPath Builds/temp/derivedData
Other relevant build log is here:
CompileAssetCatalog derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app Unity-iPhone/Images.xcassets
cd /Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/Library/Android/android-ndk-r16b:/usr/local/bin:/Library/Android/android-ndk-r16b:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/assetcatalog_dependencies --output-partial-info-plist /Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/assetcatalog_generated_info.plist --app-icon AppIcon --compress-pngs --enable-on-demand-resources YES --development-region English --target-device iphone --target-device ipad --minimum-deployment-target 10.0 --platform iphoneos --compile /Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app /Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/Unity-iPhone/Images.xcassets
/* com.apple.actool.errors */
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/Unity-iPhone/Images.xcassets: error: Failed to find newest available Simulator runtime
Underlying Errors:
Description: No available runtime found from: [
watchOS 7.0 (7.0 - 18R382) - com.apple.CoreSimulator.SimRuntime.watchOS-7-0 (unavailable, failed to open liblaunch_sim.dylib) ==> not available: Error Domain=com.apple.CoreSimulator.SimError Code=401 "The watchOS 7.0 simulator runtime is not available." UserInfo={NSLocalizedDescription=The watchOS 7.0 simulator runtime is not available., NSUnderlyingError=0x7f9d4d038cb0 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedFailureReason=XPC error talking to SimLaunchHostService: <error: 0x7fff8f3a89a0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x7fff8f3a8b08> { length = 18, contents = "Connection invalid" }
}}}, NSLocalizedRecoverySuggestion=Unable to open liblaunch_sim.dylib. Try reinstalling Xcode or the simulator runtime., NSLocalizedFailureReason=failed to open liblaunch_sim.dylib},
tvOS 14.0 (14.0 - 18J383) - com.apple.CoreSimulator.SimRuntime.tvOS-14-0 (unavailable, failed to open liblaunch_sim.dylib) ==> not available: Error Domain=com.apple.CoreSimulator.SimError Code=401 "The tvOS 14.0 simulator runtime is not available." UserInfo={NSLocalizedDescription=The tvOS 14.0 simulator runtime is not available., NSUnderlyingError=0x7f9d4d004c40 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedFailureReason=XPC error talking to SimLaunchHostService: <error: 0x7fff8f3a89a0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x7fff8f3a8b08> { length = 18, contents = "Connection invalid" }
}}}, NSLocalizedRecoverySuggestion=Unable to open liblaunch_sim.dylib. Try reinstalling Xcode or the simulator runtime., NSLocalizedFailureReason=failed to open liblaunch_sim.dylib},
iOS 14.1 (14.1 - 18A8394) - com.apple.CoreSimulator.SimRuntime.iOS-14-1 (unavailable, failed to open liblaunch_sim.dylib) ==> not available: Error Domain=com.apple.CoreSimulator.SimError Code=401 "The iOS 14.1 simulator runtime is not available." UserInfo={NSLocalizedDescription=The iOS 14.1 simulator runtime is not available., NSUnderlyingError=0x7f9d4d038cb0 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedFailureReason=XPC error talking to SimLaunchHostService: <error: 0x7fff8f3a89a0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x7fff8f3a8b08> { length = 18, contents = "Connection invalid" }
}}}, NSLocalizedRecoverySuggestion=Unable to open liblaunch_sim.dylib. Try reinstalling Xcode or the simulator runtime., NSLocalizedFailureReason=failed to open liblaunch_sim.dylib},
] when matching for <IBCocoaTouchPlatformToolDescription: 0x7f9d4e14a0f0> System content for IBCocoaTouchFramework-fourteenAndLater <IBScaleFactorDeviceTypeDescription: 0x7f9d4b4e3e30> scaleFactor=2x, renderMode.identifier=(null), idiom=<IBIPhoneIdiom: 0x7f9d4e52bb40> runtime=<IBCocoaTouchTargetRuntime: 0x7f9d4b488d30>
/* com.apple.actool.document.notices */
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/Unity-iPhone/Images.xcassets:./AppIcon.appiconset/[][ipad][76x76][][][1x][][]: notice: 76x76#1x app icons only apply to iPad apps targeting releases of iOS prior to 10.0.
/* com.apple.actool.compilation-results */
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon20x20#2x.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon20x20#2x~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon20x20#3x.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon20x20~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon29x29.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon29x29#2x.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon29x29#2x~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon29x29#3x.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon29x29~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon40x40#2x.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon40x40#2x~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon40x40#3x.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon40x40~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon60x60#2x.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon60x60#3x.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon76x76#2x~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon76x76~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app/AppIcon83.5x83.5#2x~ipad.png
/Users/Shared/Jenkins/Home/workspace/eskari_daily_ios/Builds/temp/derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/assetcatalog_generated_info.plist
** ARCHIVE FAILED **
The following build commands failed:
CompileAssetCatalog derivedData/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/daily.app Unity-iPhone/Images.xcassets
(1 failure)

Final solution for this issue was to reinstall Jenkins. Old Jenkins installer had installed Jenkins in way that is no longer supported by apple.
Basically:
Install Jenkins via homebrew
copy jobs, workspace, plugins.. to new jenkins
setup authentications to new jenkins
Use new Jenkins that is setup on your account and the issue is gone.
Reference:
https://developer.apple.com/forums/thread/664731

Related

2E> unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=601

Having build issue when running nativescript application in ios platform.
My xcode Version 12.2 (12B45b) and showing error as "The current device configuration is unsupported. This iPhone 4 is running iOS 14.7.1 (18G82), which is not supported by Xcode 12.2."
Project successfully prepared (ios)
Configure firebase
Add iOS crash logging
Building project...
Xcode build...
2022-03-16 12:52:12.267 xcodebuild[3959:55798] DTDeviceKit: deviceType from 00008020-000A393E2123002E was NULL
2022-03-16 12:52:12.467 xcodebuild[3959:55798] DTDeviceKit: deviceType from 00008020-000A393E2123002E was NULL
2022-03-16 12:52:12.467 xcodebuild[3959:55798] DTDeviceKit: deviceType from 00008020-000A393E2123002E was NULL
2022-03-16 12:52:13.621 xcodebuild[3959:55796] iPhoneConnect: đŸ“±<DVTiOSDevice (0x7ff74baabfe0), Mobile’s iPhone XR, iPhone, 14.7.1 (18G82), 00008020-000A393E2123002E> unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=601 "The current device configuration is unsupported. This iPhone 4 is running iOS 14.7.1 (18G82), which is not supported by Xcode 12.2." UserInfo={NSLocalizedDescription=The current device configuration is unsupported. This iPhone 4 is running iOS 14.7.1 (18G82), which is not supported by Xcode 12.2., NSLocalizedRecoverySuggestion=To run on this device, please update to a version of Xcode that supports iOS 14.7.1. You can download Xcode from the Mac App Store or the Apple Developer website., DVTRadarComponentKey=487927, DeviceType=iPhone11,8, NSUnderlyingError=0x7ff74ba2a820 {Error Domain=com.apple.dt.DVTDeviceSupportFilesError Code=2 "Unable to locate ideal DDI for platform: <DVTPlatform:0x7ff74875e810:'com.apple.platform.iphoneos':<DVTFilePath:0x7ff74875e660:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>, version: 14.7.1, build: 18G82" UserInfo={NSLocalizedDescription=Unable to locate ideal DDI for platform: <DVTPlatform:0x7ff74875e810:'com.apple.platform.iphoneos':<DVTFilePath:0x7ff74875e660:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>, version: 14.7.1, build: 18G82, DVTRadarComponentKey=487927}}}) {
DVTRadarComponentKey = 487927;
DeviceType = "iPhone11,8";
NSLocalizedDescription = "The current device configuration is unsupported. This iPhone 4 is running iOS 14.7.1 (18G82), which is not supported by Xcode 12.2.";
NSLocalizedRecoverySuggestion = "To run on this device, please update to a version of Xcode that supports iOS 14.7.1. You can download Xcode from the Mac App Store or the Apple Developer website.";
NSUnderlyingError = "Error Domain=com.apple.dt.DVTDeviceSupportFilesError Code=2 \"Unable to locate ideal DDI for platform: <DVTPlatform:0x7ff74875e810:'com.apple.platform.iphoneos':<DVTFilePath:0x7ff74875e660:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>, version: 14.7.1, build: 18G82\" UserInfo={NSLocalizedDescription=Unable to locate ideal DDI for platform: <DVTPlatform:0x7ff74875e810:'com.apple.platform.iphoneos':<DVTFilePath:0x7ff74875e660:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>, version: 14.7.1, build: 18G82, DVTRadarComponentKey=487927}";
}
how to solve this issue?

Error when trying to upload image using react-native-webview v11.0.2 in a simulator iPhone 11 on xCode 12.4

When trying to upload an image to a web system, using webview in react-native v0.63.2 and react-native-webview v11.0.2 on an iPhone 11 emulator using iOS 14, I get the error on the xCode console:
2021-02-11 19:07:33.784921-0300 Ebank[2851:26809] [ProcessSuspension] 0x111cac210 - ProcessAssertion: Failed to acquire RBS UnboundedNetworking assertion 'WebKit uploads' for process with PID 2860, error: Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"UnboundedNetworking" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Required client entitlement is missing}
Emulating on Android, the upload happens normally. Any idea what it might be?
Thank you all.

Appium Not Running Xcode 12.3

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.
When I try to run Appium from python this is the trace printed to my python console (device serial number/udid intentionally hidden):
File "/Users/opt/anaconda3/lib/python3.7/site-packages/appium/webdriver/webdriver.py", line 155, in __init__
proxy
File "/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/Users/opt/anaconda3/lib/python3.7/site-packages/appium/webdriver/webdriver.py", line 225, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File "/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", 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 "The folder “WebDriverAgentRunner_iphoneos14.3-arm64.xctestrun” doesn’t exist." 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 "No such file or directory"}}
** 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 đŸ“±<DVTiOSDevice (0x7fb11a157e10), ****, iPad, 14.3 (18C66), ****> {
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: <DVTDeviceType:0x7fb113d0a3d0 Xcode.DeviceType.iPhone>
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.
Through researching I came across this answer which linked to an apple developer forum post 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.
I have also come across another suggestion that I tried but it did not fix my issue.
Also, this is what I'm seeing in Test-WebDriverAgentRunner-2021.01.06_17-04-19--0600.xcresult:
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))
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!
Turns out I had to follow the suggestion in this answer but on the WebDriverAgent Xcode project. Seems to have fixed it for me.
After the installation WDA on real device, worked for me on appium 1.20 such workaround:
$ cd ~/Library/Developer/Xcode/DerivedData
$ rm -rf WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp
$ mv WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp

iOS Simulator is not installing the app at this time

When I run the newly created iOS app in iPhone 11 simulator(iOS 13) I'm getting the following error.
This app could not be installed at this time.
Error Log:
com.apple.dt.Xcode[32819] : installApplication:withOptions:error:: Error Domain=IXUserPresentableErrorDomain Code=1 "This app could not be installed at this time." UserInfo={NSUnderlyingError=0x7fc48881db10 {Error Domain=LSApplicationWorkspaceErrorDomain Code=-102 "(null)" UserInfo={Error=RegistrationFailed, _LSLine=627, _LSFunction=-[_LSInstaller _doinstallApplication:atURL:withOptions:installType:notificationJournaller:reply:], CFBundleIdentifier=com.boopathy.TestingApp}}, NSLocalizedFailureReason=Could not install at this time., NSLocalizedDescription=This app could not be installed at this time.}
Configuration Details:
macOS - Catalina 10.15 Beta(19A487m)
Xcode - 11.3(11C29)
Simulator - 11.3 (SimulatorApp-912.5 SimulatorKit-570.3
CoreSimulator-681.17)

Testing Failed when build using Xcode build command or appium

I am using :
Xcode 10.1
Os Version : 12.1
iPhone 6
I did follow all required steps to setup build and everything but still getting error when try to build project using xcode build.
I am confuse between 2 thing that is it signing issue or I am missing some config. in webdriver agent xproj.
Actual Error on xcode build command
Testing failed:
WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: Unable to launch com.apple.test.WebDriverAgentRunner-Runner. (Underlying error: The operation couldn’t be completed. (DTXMessage error 1.))))
Actual Error on appium
Error: Unable to launch WebDriverAgent because of xcodebuild failure: “xcodebuild failed with code 65”. 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.
Some other logs if that helps :
2018-11-19 11:02:17.350 xcodebuild[2413:325556] Error Domain=com.apple.platform.iphoneos Code=-12 “Unable to launch com.apple.test.WebDriverAgentRunner-Runner” UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.WebDriverAgentRunner-Runner, NSUnderlyingError=0x7f8ec758be20 {Error Domain=DTXMessage Code=1 “(null)” UserInfo={DTXExceptionKey=The operation couldn’t be completed. Unable to launch com.apple.test.WebDriverAgentRunner-Runner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.apple.test.WebDriverAgentRunner-Runner’}}}
2018-11-19 11:02:17.350 xcodebuild[2413:325556] Error Domain=IDETestOperationsObserverErrorDomain Code=4 “Failed to install or launch the test runner” UserInfo={NSLocalizedRecoverySuggestion=If you believe this error represents a bug, please attach the result bundle at /Users/asianweb/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/Test-WebDriverAgentRunner-2018.11.19_11-02-01-+0530.xcresult, NSLocalizedDescription=Failed to install or launch the test runner, NSUnderlyingError=0x7f8ec7ac6c70 {Error Domain=com.apple.platform.iphoneos Code=-12 “Unable to launch com.apple.test.WebDriverAgentRunner-Runner” UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.WebDriverAgentRunner-Runner, NSUnderlyingError=0x7f8ec758be20 {Error Domain=DTXMessage Code=1 “(null)” UserInfo={DTXExceptionKey=The operation couldn’t be completed. Unable to launch com.apple.test.WebDriverAgentRunner-Runner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.apple.test.WebDriverAgentRunner-Runner’}}}}}
Other logs info
{
deviceSerialNumber: XXXXXXXXXXXX
identifier: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6
deviceClass: iPhone
deviceName: qa’s iPhone
deviceIdentifier: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6
productVersion: 12.1
buildVersion: 16B92
deviceSoftwareVersion: 12.1 (16B92)
deviceArchitecture: arm64
deviceTotalCapacity: 11945508864
deviceAvailableCapacity: 5477302272
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsPaired: YES
deviceIsActivated: YES
deviceActivationState: Activated
isPasscodeLocked: NO
deviceType: <DVTDeviceType:0x8f7ec4d00ca0 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
bootArgs: (null)
connected: yes
isWirelessEnabled: no
connectionType: direct
hostname: (null)
bonjourServiceName: 90:60:f1:6b:7f:91#fe80::9760:f1ff:fe6b:2f92._apple-mobdev2._tcp.local.
} (12.1 (16B92))
Note : While I run it, it puts my app and webdriveragent into iphone device and then stopped.
I was able to resolve issue by following steps :
Uninstalled following :
Xcode,Appium,Xcode command line,ideviceinstaller,carthage,xpretty,deviceconsole
Reinstalled everything as per this video guide : https://youtu.be/ySglJIrDVMQ
Restart my mac machine and iphone
Again setup project in xcode as per this video guide : https://youtu.be/ySglJIrDVMQ
And Yes it works.
For iOS development I use Fastlane with the XCTest framework and I had the same problem as you described. However, I'm using a simulator, not a real device. To solve it I replaced iPhone 6 with iPhone XS Max in the list of simulators that should be used for testing. If you can also use any other device different from iPhone 6 you should try this solution.
However if you need to test your application on iPhone 6 you can recreate the corresponding simulator. In Xcode 10.1 press Window -> Devices and Simulators, then select the line called iPhone 6 and press Backspace. After that press + in the left bottom corner of window to create a new simulator. You will see this window:
Set all parameters as they are in this screenshot and then press Create. After that, try to run your test suite again.

Resources