Unable to run with IOS devices 10.3.3 APpium 1.7.1

I am getting the following error while trying to run on ios device.

Appium : 1.7.1
Xcode : 9.0.1
IOS real device : IOS version 10.3.3

I am able to open the webdriveragent from xcode and clean and build succesfully. I have manually setup the provisioning profiles and am using a paid developer id. Please see the below error :slight_smile:

iPhoneConnect: Failed to install /Users/poornimasuraj/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app - error Error Domain=com.apple.dtdevicekit Code=-402620391 “App installation failed” UserInfo={NSLocalizedFailureReason=The application does not have a valid signature., com.apple.dtdevicekit.stacktrace=(
[Xcode] 0 DTDeviceKitBase 0x000000010bc8fa0d DTDKCreateNSError + 113
[Xcode] 1 DTDeviceKitBase 0x000000010bc90251 DTDK_AMDErrorToNSError + 1135
[Xcode] 2 DTDeviceKitBase 0x000000010bcd2b87 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 158
[Xcode] 3 DVTFoundation 0x000000010059d8e4 DVTInvokeWithStrongOwnership + 73
[Xcode] 4 DTDeviceKitBase 0x000000010bcd28b3 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1399
[Xcode] 5 IDEiOSSupportCore 0x000000010bbc9b3c __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.338 + 4014
[Xcode] 6 DVTFoundation 0x00000001006d1fd7 __DVTDispatchAsync_block_invoke + 806
[Xcode] 7 libdispatch.dylib 0x00007fffd19cb524 _dispatch_call_block_and_release + 12
[Xcode] 8 libdispatch.dylib 0x00007fffd19c28fc _dispatch_client_callout + 8
[Xcode] 9 libdispatch.dylib 0x00007fffd19d89a0 _dispatch_queue_serial_drain + 896
[Xcode] 10 libdispatch.dylib 0x00007fffd19cb306 _dispatch_queue_invoke + 1046
[Xcode] 11 libdispatch.dylib 0x00007fffd19c46b5 _dispatch_root_queue_drain + 476
[Xcode] 12 libdispatch.dylib 0x00007fffd19c448c _dispatch_worker_thread3 + 99
[Xcode] 13 libsystem_pthread.dylib 0x00007fffd1c115a2 _pthread_wqthread + 1299
[Xcode] 14 libsystem_pthread.dylib 0x00007fffd1c1107d start_wqthread + 13
[Xcode] ), NSLocalizedRecoverySuggestion=The application does not have a valid signature., NSLocalizedDescription=App installation failed}
[Xcode]
[Xcode] 2017-10-20 13:37:10.254 xcodebuild[1181:23514] Error Domain=com.apple.dtdevicekit Code=-402620391 “App installation failed” UserInfo={NSLocalizedFailureReason=The application does not have a valid signature., com.apple.dtdevicekit.stacktrace=(
[Xcode] 0 DTDeviceKitBase 0x000000010bc8fa0d DTDKCreateNSError + 113
[Xcode] 1 DTDeviceKitBase 0x000000010bc90251 DTDK_AMDErrorToNSError + 1135
[Xcode] 2 DTDeviceKitBase 0x000000010bcd2b87 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 158
[Xcode] 3 DVTFoundation 0x000000010059d8e4 DVTInvokeWithStrongOwnership + 73
[Xcode] 4 DTDeviceKitBase 0x000000010bcd28b3 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1399
[Xcode] 5 IDEiOSSupportCore 0x000000010bbc9b3c __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.338 + 4014
[Xcode] 6 DVTFoundation 0x00000001006d1fd7 __DVTDispatchAsync_block_invoke + 806
[Xcode] 7 libdispatch.dylib 0x00007fffd19cb524 _dispatch_call_block_and_release + 12
[Xcode] 8 libdispatch.dylib 0x00007fffd19c28fc _dispatch_client_callout + 8
[Xcode] 9 libdispatch.dylib 0x00007fffd19d89a0 _dispatch_queue_serial_drain + 896
[Xcode] 10 libdispatch.dylib 0x00007fffd19cb306 _dispatch_queue_invoke + 1046
[Xcode] 11 libdispatch.dylib 0x00007fffd19c46b5 _dispatch_root_queue_drain + 476
[Xcode] 12 libdispatch.dylib 0x00007fffd19c448c _dispatch_worker_thread3 + 99
[Xcode] 13 libsystem_pthread.dylib 0x00007fffd1c115a2 _pthread_wqthread + 1299
[Xcode] 14 libsystem_pthread.dylib 0x00007fffd1c1107d start_wqthread + 13
[Xcode] ), NSLocalizedRecoverySuggestion=The application does not have a valid signature., NSLocalizedDescription=App installation failed}
[Xcode]
[Xcode] 2017-10-20 13:37:10.255 xcodebuild[1181:23514] Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}

Adding
dispatch_source_read_socket_block_invoke:312: Failed to install application at file:///var/mobile/Media/PublicStaging/WebDriverAgentRunner-Runner.app/ : Error Domain=MIInstallerErrorDomain Code=13 “Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LqtDrD/extracted/WebDriverAgentRunner-Runner.app : 0xe8008019 (The application does not have a valid signature.)” UserInfo={NSLocalizedDescription=Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LqtDrD/extracted/WebDriverAgentRunner-Runner.app : 0xe8008019 (The application does not have a valid signature.), LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=147, LibMISErrorNumber=-402620391, FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]}
[iOSLog] [IOS_SYSLOG_ROW] Oct 20 13:59:02 FD18 homed(MobileCoreServices)[142] : LaunchServices observer: Apps Failed be installed:
[iOSLog] [IOS_SYSLOG_ROW] Oct 20 13:59:02 FD18 iaptransportd(MobileCoreServices)[68] : LaunchServices observer: Apps Failed be installed:
[iOSLog] [IOS_SYSLOG_ROW] Oct 20 13:59:02 FD18 SpringBoard(MobileCoreServices)[53] : LaunchServices observer: Apps Failed be installed:
[iOSLog] [IOS_SYSLOG_ROW] Oct 20 13:59:02 FD18 UserEventAgent(MobileCoreServices)[22] : LaunchServices observer: Apps Failed be installed:
[iOSLog] [IOS_SYSLOG_ROW] Oct 20 13:59:02 FD18 profiled(MobileCoreServices)[124] : LaunchServices observer: Apps Failed be installed:
[iOSLog] [IOS_SYSLOG_ROW] Oct 20 13:59:02 FD18 nsurlsessiond(MobileCoreServices)[123] : LaunchServices observer: Apps Failed be installed:
[iOSLog] [IOS_SYSLOG_ROW] Oct 20 13:59:02 FD18 SpringBoard(FrontBoard)[53] : Applications did fail to install: (
[iOSLog] [IOS_SYSLOG_ROW] “<LSApplicationProxy: 0x111357e50> com.apple.test.WebDriverAgentRunner-Runner (null) <com.apple.test.WebDriverAgentRunner-Runner > {A8556A8A-C1D0-429E-9957-1B2B4CF48F88 2805}”

Check if these two videos helps in resolving the error:

https://www.youtube.com/watch?v=TprXEKBnfmA&t=416s

https://www.youtube.com/watch?v=_Hy-75CWpW4

Thanks @Venkatesh_Akula … That worked.I also did a reinstall of appium before these.

Also a generic question. I am using XCUITest for ios . We have observed that the scripts are significantly slow when compared to how it runs for android with uiautomator2. Is there any other replacement for xcuitest, if that is causing the script to run slow

I’m not sure, as far as I knew there are no replacement for it in Appium.