using security to importing CSSMERR_TP_CERT_EXPIRED secutity codesigning - macos

Does anybody know why when I use 'security' on os x to import a valid identity that it seems to think it has expired:
There are 2 machines, my development machine and a jenkins slave.
I am using the xcodebuild to create an archive and then use:
xcodebuild -exportArchive -archivePath myApp.xcarchive -exportOptionsPlist exportOptions.plist -exportPath . PROVISIONING_PROFILE=fdd0caeb-58fb-41df-a5e8-e5e9bd1f95c9 "OTHER_CODE_SIGN_FLAGS=--keychain /Users/me/Library/Keychains/Buildsystem"
to build an ipa for the store. This works on my development machine using the same archive and the same exportOptions.plist but not on the jenkins slave. I get this error:
016-10-06 23:29:23.438 xcodebuild[87720:8494157] [MT] IDEDistribution:
-[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path
'/var/folders/yd/l_8k4cn91kjc9r853crzz98m0000gn/T/MyApp_2016-10-06_23-29-23.437.xcdistributionlogs'.
2016-10-06 23:29:23.888 xcodebuild[87720:8494157] [MT]
IDEDistribution: Step failed: : Error Domain=IDEDistributionErrorDomain Code=1 "The
operation couldn’t be completed. (IDEDistributionErrorDomain error
1.)"
error: exportArchive: The operation couldn’t be completed.
(IDEDistributionErrorDomain error 1.)
Error Domain=IDEDistributionErrorDomain Code=1 "The operation couldn’t
be completed. (IDEDistributionErrorDomain error 1.)"
** EXPORT FAILED **
I suspect it is because it thinks the code signing identity is bad. When I imported the identity as:
security import AP_Store.p12 -k /Users/me/Library/Keychains/Buildsystem -P ******* -T /usr/bin/codesign
then run:
security find-identity
I get:
1) 71497439A2987BC6830DF2E4879DBD3A5F1B2857 "iPhone Distribution:
xxxxx (xxxxxxxxx)" (CSSMERR_TP_CERT_EXPIRED)
If I import the same identity on my development machine it says it is OK.
Does anybody know why the same identity would be OK on one machine but not another?

This was caused by an expired intermediate certificate.
Apple Worldwide Developer Relations Certification Authority
had expired.
After replacing it everything worked.
A good reference is: MaintainingCertificates
Another thing that can lead to errors such as:
2016-10-11 11:41:11.780 xcodebuild[87463:15799133] [MT]
IDEDistribution: Step failed: : Error Domain=IDEDistributionErrorDomain Code=1
"(null)"
error: exportArchive: The operation couldn’t be completed.
(IDEDistributionErrorDomain error 1.)
is if you have an incorrect team ID in your exportOptions.plist file.

Related

Problem running an app on the iPhone with Xcode

Hello I am having some problems running my app on my iPhone when I run the app from me this error:
Xcode's output:
↳
error: unable to read property list from file: /Users/indumonta/AndroidStudioProjects/contagem_de_pessoas/ios/Runner/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 1.) (in target 'Runner' from project 'Runner')
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error launching application on Tigomes.
Terminal:
MBP-de-Luis:~ indumonta$ plutil Info.plist
Info.plist: file does not exist or is not readable or is not a regular file (Error Domain=NSCocoaErrorDomain Code=260 "The file “Info.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=Info.plist, NSUnderlyingError=0x7fd621d04140 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}})
Can someone help me?
Open your project directory and run from within
flutter create contagem_de_pessoas
This should create the missing info.plist

Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65" Iphone6 Simulator

I am trying to run the Amazon app on an iPhone 6 simulator using Xcode.
The app is getting installed in the iPhone Simulator, but not able to interact with its elements.
Appium version - 1.7.2
Xcode Version 9.2
Platform Mac- 10.12.6
Downloaded the app - i.e. xxx.app.ipa
Logs:
[Xcode] 2018-02-13 21:23:08.009 xcodebuild[9868:75242] Error Domain=IDEFoundationErrorDomain Code=1 "Cannot launch simulated executable: no file found at /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app} [Xcode] 2018-02-13 21:23:08.009 xcodebuild[9868:75242]
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} [Xcode] [Xcode] 2018-02-13 21:23:08.010 xcodebuild[9868:75259] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled
[Xcode] ** TEST EXECUTE FAILED ** [Xcode] [Xcode] 2018-02-13 21:23:08.011 xcodebuild[9868:75318] Error saving test log:
Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSFilePath=/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994-9443-F73DDE5FBD4D.xcactivitylog, NSLocalizedDescription=No such file or directory} | User info: { [Xcode] NSFilePath = "/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994-9443-F73DDE5FBD4D.xcactivitylog"; [Xcode] NSLocalizedDescription = "No such file or directory"; [Xcode] } [Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null' [BaseDriver] Event 'wdaStartFailed' logged at 1518585788035 (21:23:08 GMT-0800 (PST)) [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying [XCUITest] Shutting down sub-processes [XCUITest] Removing WDA application from device [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke as _invoke at GeneratorFunctionPrototype.prototype.(anonymous function) as next at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke as _invoke at GeneratorFunctionPrototype.prototype.(anonymous function) as next at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on. [XCUITest] Killing running processes 'xcodebuild.B720A212-489B-4A48-BBDB-7119C9763406, B720A212-489B-4A48-BBDB-7119C9763406.*XCTRunner' for the device B720A212-489B-4A48-BBDB-7119C9763406... [XCUITest] 'pgrep -nif xcodebuild.*B720A212-489B-4A48-BBDB-7119C9763406' didn't detect any matching processes. Return code: 1 [XCUITest] 'pgrep -nif B720A212-489B-4A48-BBDB-7119C9763406.XCTRunner' didn't detect any matching processes. Return code: 1 [XCUITest] Deleting simulator created for this run (udid: 'B720A212-489B-4A48-BBDB-7119C9763406') [iOSLog] Stopping iOS log capture
It's saying it can't find the WebDriver app. Can you confirm its existence in /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/?
If it doesn't exist, there is something wrong with your Appium install so I'd recommend reinstalling npm uninstall -g appium and npm install -g appium. Probably safe to do that anyway.
Also make sure you restart your device and uninstalling any existing WebDriver app on the device.
Error clear shows -- /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
Webdriver agent need to be successfully running on device
Try to configure Webdriver agent and Developer ID ::
Open the existing the WebDriver Agent (double click on WebDriverAgent.xcodeproj)
On top of Xcode you File > New> File , then you will an pop up something like this
Select OSX->.Other-> Select Configuration settings file.
Paste the following things in newly created file.
DEVELOPMENT_TEAM = xxxxxxxxx
CODE_SIGN_IDENTITY = iPhone Developer
Development team is Team ID which your developer should be able to provide . Dont change the CODE_SIGN_IDENTITY.
In device.propoerties file add this
xcodeConfigFile=/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Config.xcconfig
In ConfigCapa.java file add this
capabilities.setCapability(“xcodeConfigFile”,emulatorProp.getProperty(“xcodeConfigFile”));
Open terminal go to
$ cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
$ mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh –d
Go to terminal type
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=DeviceID’ test Last line on build output above command should be Listening on USB. Then you are all set!
brew install libimobiledevice –HEAD
To run appium type appium &
To find version type appium — v

i try to Archive the a project but i'm getting this error Command /usr/bin/codesign failed with exit code 1

I try to run the prog :
CodeSign /Users/admin/Library/Developer/Xcode/DerivedData/POC2-byrqqhzjppbjxjemdbcmskhttxdm/Build/Products/Debug-iphoneos/POC2.app/Frameworks/MicroBlink.framework
cd /Users/admin/Documents/Development/POC2
export
CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Distribution: **************name ***** (********)"
/usr/bin/codesign --force --sign 4070CCDBD98188BA13DE80C8A094CCDFAC2A2E4C --preserve-metadata=identifier,entitlements,flags --timestamp=none /Users/admin/Library/Developer/Xcode/DerivedData/POC2-byrqqhzjppbjxjemdbcmskhttxdm/Build/Products/Debug-iphoneos/POC2.app/Frameworks/MicroBlink.framework
/Users/admin/Library/Developer/Xcode/DerivedData/POC2-byrqqhzjppbjxjemdbcmskhttxdm/Build/Products/Debug-iphoneos/POC2.app/Frameworks/MicroBlink.framework: replacing existing signature
/Users/admin/Library/Developer/Xcode/DerivedData/POC2-byrqqhzjppbjxjemdbcmskhttxdm/Build/Products/Debug-iphoneos/POC2.app/Frameworks/MicroBlink.framework: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1
Make sure you have a iTunes connect profile & try to create an app with the same name & build settings in there & then try to archive your project as sometime the developer account does not match the profile of the app so then you might get this error.
You have to go to iTunes & create a profile & give it the same name as the project builder & then try to validate the archive project from the Xcode.
If the validation is success then you can submit it to the app store & if not let me know what error you get while you validate the app so that we can look more in deep.

Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain

Running Instruments from the command line gave me this error:
Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 8.) : Failed to launch process with bundle identifier
Any idea what the problem is and how to fix?
In my case I believe it was a provisioning profile issue. Try going into Product/Scheme/Edit Scheme and changing the Profile build configuration from Release to Debug or vice versa - that got it working for me.

Unable to run the app on IOS device

I have created a sample titanium project, I am able to run my app on emulator. But when i try to deploy the same device I'm getting the following error,
[ERROR] : Error details: Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“Plan India Feedback App”) were found.
[ERROR] : Error details: CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'
Can any one suggest me what is the issue and how to resolve the same.
Phone version is: 6.1.6
Emulator version: 8.1
It indicates that your app id and Provisioning profiles dont match.Please make them same and you would be good to go
Thanks

Resources