I have project with multiple targets (QA, Staging .. etc). All targets include dynamic framework (let's say with bundle identifier: com.sdk.demosdk). For some targets I'm using this sdk compiled with some preprocessor flags (clean) and for others, compiled with different flags.
For example: for QA - I'm using sdkFull for QA - I'm using sdkClean
but both have same bundle identifier.
But anyway, for test target I always run the target which contains sdkClean.
I'm using fastlane scan to run the tests from Jenkins pipeline. see the code below:
lane :testify do |options|
app = options[:app]
podinstall
scan(
scheme: "DemoTests_" << app,
code_coverage: true,
xcargs: "OTHER_SWIFT_FLAGS='$(inherited) \"-D\" \"COCOAPODS\" -DAUTHENTICATION_PRODUCTION -Dappstore'",
output_directory: "./fastlane/test_output_" << app,
device:"iPhone 8"
)
end
And sometimes I get the following error:
2018-07-17 02:48:23.975 xcodebuild[82663:24489158] Error Domain=IXUserPresentableErrorDomain Code=1 "This app could not be installed at this time." UserInfo={NSLocalizedDescription=This app could not be installed at this time., NSUnderlyingError=0x7fa8106dab80 {Error Domain=MIInstallerErrorDomain Code=57 "Found bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdkCleanAPI.framework with the same identifier (com.sdk.demosdk) as bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdk.framework" UserInfo={LegacyErrorString=DuplicateIdentifier, FunctionName=-[MIInstallableBundle performPreflightWithError:], SourceFileLine=391, NSLocalizedDescription=Found bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdkCleanAPI.framework with the same identifier (com.sdk.demosdk) as bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdk.framework}}} 2018-07-17 02:48:23.975 xcodebuild[82663:24489158] 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, NSUnderlyingError=0x7fa8156bf370 {Error Domain=IXUserPresentableErrorDomain Code=1 "This app could not be installed at this time." UserInfo={NSLocalizedDescription=This app could not be installed at this time., NSUnderlyingError=0x7fa8106dab80 {Error Domain=MIInstallerErrorDomain Code=57 "Found bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdkCleanAPI.framework with the same identifier (com.sdk.demosdk) as bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdk.framework" UserInfo={LegacyErrorString=DuplicateIdentifier, FunctionName=-[MIInstallableBundle performPreflightWithError:], SourceFileLine=391, NSLocalizedDescription=Found bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdkCleanAPI.framework with the same identifier (com.sdk.demosdk) as bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdk.framework}}}}}
Testing failed: Test target ShindanTests_DemoApp encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. Underlying error: Error Domain=IXUserPresentableErrorDomain Code=1 "This app could not be installed at this time." UserInfo={NSLocalizedDescription=This app could not be installed at this time., NSUnderlyingError=0x7fa8106dab80 {Error Domain=MIInstallerErrorDomain Code=57 "Found bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdkCleanAPI.framework with the same identifier (com.sdk.demosdk) as bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdk.framework" UserInfo={LegacyErrorString=DuplicateIdentifier, FunctionName=-[MIInstallableBundle performPreflightWithError:], SourceFileLine=391, NSLocalizedDescription=Found bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdkCleanAPI.framework with the same identifier (com.sdk.demosdk) as bundle at /Users/jenkins/Library/Developer/CoreSimulator/Devices/B4971F74-AE22-4A18-B5F0-01E71AF71314/data/Library/Caches/com.apple.mobile.installd.staging/temp.a0hOWi/extracted/Payload/DemoApp.app/Frameworks/demosdk.framework}}}) ** TEST FAILED **
I tried several cleanup scripts like:
rm -rf -r ~/Library/Developer/Xcode/DerivedData
rm -rf $(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache
rm -rf -r ~/Library/Caches/com.apple.dt.Xcode
xcrun simctl uninstall booted com.cellebrite.shindan
Event killing simulator process and relaunching it, but still sometimes it succeeds, sometimes not ...
Can anyone help me understanding what can be done ?

Aucun commentaire:
Enregistrer un commentaire