fastlane: signing error when not using the legacy build option
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
I updated to Fastlane 2.3.1 recently and now when I tried to build my app with gym using legacy build I get this message: Using deprecated option: ‘–use_legacy_build_api’ (Don’t use this option any more, as it’s deprecated by Apple)
The app was built fine, but since you are recommending me to stop using –use_legacy_build_api I decided to build my app again without this flag, but I got the following error:
$ /usr/bin/xcrun /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.3.1/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/_7/qwcb8wy10kvbx049h3wlqjlh0000gn/T/gym_config20170103-6489-tz11sz.plist' -archivePath /Users/vegidio/Library/Developer/Xcode/Archives/2017-01-03/UAN-Safe\(Dev\)\ 2017-01-03\ 08.21.34.xcarchive -exportPath '/var/folders/_7/qwcb8wy10kvbx049h3wlqjlh0000gn/T/gym_output20170103-6489-1y65fy7' -toolchain 'com.apple.dt.toolchain.Swift_2_3'
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/_7/qwcb8wy10kvbx049h3wlqjlh0000gn/T/gym_config20170103-6489-tz11sz.plist -archivePath '/Users/vegidio/Library/Developer/Xcode/Archives/2017-01-03/UAN-Safe(Dev) 2017-01-03 08.21.34.xcarchive' -exportPath /var/folders/_7/qwcb8wy10kvbx049h3wlqjlh0000gn/T/gym_output20170103-6489-1y65fy7 -toolchain com.apple.dt.toolchain.Swift_2_3
2017-01-03 08:26:40.473 xcodebuild[10096:19273392] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/_7/qwcb8wy10kvbx049h3wlqjlh0000gn/T/uan-develop_2017-01-03_08-26-40.472.xcdistributionlogs'.
1.2.840.113635.100.1.61
2017-01-03 08:26:41.367 xcodebuild[10096:19273392] [MT] IDEDistribution: -[IDEDistributionProvisioning _itemToSigningInfoMap:]: Can't find any applicable signing identities for items: (
"<IDEDistributionItem: 0x7f845df09580 'se.intrasenze.uan.develop' '<DVTFilePath:0x7f845af40d90:'/Users/vegidio/Library/Developer/Xcode/Archives/2017-01-03/UAN-Safe(Dev) 2017-01-03 08.21.34.xcarchive/Products/Applications/UAN-Safe(Dev).app'>'>",
"<IDEDistributionItem: 0x7f845dd26c00 'org.cocoapods.Alamofire' '<DVTFilePath:0x7f845db45e50:'/Users/vegidio/Library/Developer/Xcode/Archives/2017-01-03/UAN-Safe(Dev) 2017-01-03 08.21.34.xcarchive/Products/Applications/UAN-Safe(Dev).app/Frameworks/Alamofire.framework'>'>",
...
)
Errors={
"<DVTSigningCertificate: 0x7f845dd12440; name='iPhone Distribution: Intrasenze AB (4VPJ6KFHHM)', hash='FB3EF1DD934597C72BB68253B48F760A68166F03', serialNumber='2201B0A48CA505EB', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-10-26 17:54:25 +0000''>" = {
"<IDEDistributionItem: 0x7f845df09580 'se.intrasenze.uan.develop' '<DVTFilePath:0x7f845af40d90:'/Users/vegidio/Library/Developer/Xcode/Archives/2017-01-03/UAN-Safe(Dev) 2017-01-03 08.21.34.xcarchive/Products/Applications/UAN-Safe(Dev).app'>'>" = "Error Domain=IDECodesignResolverErrorDomain Code=5 \"No matching provisioning profiles found\" UserInfo={NSLocalizedRecoverySuggestion=No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier \U201cse.intrasenze.uan.develop\U201d were found., NSLocalizedDescription=No matching provisioning profiles found, IDECodesignResolverError_ResolutionInputsKey=<IDECodesignResolutionInputs: 0x7f845e01dcd0; portalTeamID='4VPJ6KFHHM', usingTeamBasedSigning='NO', bundleIdentifier='se.intrasenze.uan.develop', targetName='(null)', provisioningProfilePurpose='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n \"aps-environment\" = development;\n \"beta-reports-active\" = 1;\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
};
}
2017-01-03 08:26:41.368 xcodebuild[10096:19273392] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7f845aa12e00>: Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={
"<DVTSigningCertificate: 0x7f845dd12440; name='iPhone Distribution: Intrasenze AB (4VPJ6KFHHM)', hash='FB3EF1DD934597C72BB68253B48F760A68166F03', serialNumber='2201B0A48CA505EB', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-10-26 17:54:25 +0000''>" = {
"<IDEDistributionItem: 0x7f845df09580 'se.intrasenze.uan.develop' '<DVTFilePath:0x7f845af40d90:'/Users/vegidio/Library/Developer/Xcode/Archives/2017-01-03/UAN-Safe(Dev) 2017-01-03 08.21.34.xcarchive/Products/Applications/UAN-Safe(Dev).app'>'>" = "Error Domain=IDECodesignResolverErrorDomain Code=5 \"No matching provisioning profiles found\" UserInfo={NSLocalizedRecoverySuggestion=No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier \U201cse.intrasenze.uan.develop\U201d were found., NSLocalizedDescription=No matching provisioning profiles found, IDECodesignResolverError_ResolutionInputsKey=<IDECodesignResolutionInputs: 0x7f845e01dcd0; portalTeamID='4VPJ6KFHHM', usingTeamBasedSigning='NO', bundleIdentifier='se.intrasenze.uan.develop', targetName='(null)', provisioningProfilePurpose='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n \"aps-environment\" = development;\n \"beta-reports-active\" = 1;\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
};
}}
error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.)
Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={
"<DVTSigningCertificate: 0x7f845dd12440; name='iPhone Distribution: Intrasenze AB (4VPJ6KFHHM)', hash='FB3EF1DD934597C72BB68253B48F760A68166F03', serialNumber='2201B0A48CA505EB', certificateKind='1.2.840.113635.100.6.1.4, issueDate='2016-10-26 17:54:25 +0000''>" = {
"<IDEDistributionItem: 0x7f845df09580 'se.intrasenze.uan.develop' '<DVTFilePath:0x7f845af40d90:'/Users/vegidio/Library/Developer/Xcode/Archives/2017-01-03/UAN-Safe(Dev) 2017-01-03 08.21.34.xcarchive/Products/Applications/UAN-Safe(Dev).app'>'>" = "Error Domain=IDECodesignResolverErrorDomain Code=5 \"No matching provisioning profiles found\" UserInfo={NSLocalizedRecoverySuggestion=No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier \U201cse.intrasenze.uan.develop\U201d were found., NSLocalizedDescription=No matching provisioning profiles found, IDECodesignResolverError_ResolutionInputsKey=<IDECodesignResolutionInputs: 0x7f845e01dcd0; portalTeamID='4VPJ6KFHHM', usingTeamBasedSigning='NO', bundleIdentifier='se.intrasenze.uan.develop', targetName='(null)', provisioningProfilePurpose='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n \"aps-environment\" = development;\n \"beta-reports-active\" = 1;\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
};
}}
** EXPORT FAILED **
[08:26:41]: Exit status: 70
Based what I see in the error message, it looks like it is complaining about some distribution signing identify during the archive phase. Just to clarify, my project doesn’t have a distribution profile. This is an internal project that we don’t have any plan to release in the near future, so we only have a development profile.
When I archive the project manually (using Xcode IDE) or when I build the project using gym with –use_legacy_build_api, this problem doesn’t happen. This only happens when I use gym without the legacy build.
Complete output when running fastlane, including the stack trace and command used
You can use:
--capture_outputas the last commandline argument to get that collected for you
[INSERT OUTPUT HERE]
Environment
Please run fastlane env and copy the output below. This will help us help you 👍
If you used --capture_output option please remove this block - as it is already included there.
🚫 fastlane environment 🚫
Stack
| Key | Value |
|---|---|
| OS | 10.12.2 |
| Ruby | 2.4.0 |
| Bundler? | false |
| Git | git version 2.11.0 |
| Installation Source | /usr/local/bin/fastlane |
| Host | Mac OS X 10.12.2 (16C67) |
| Ruby Lib Dir | /usr/local/Cellar/ruby/2.4.0/lib |
| OpenSSL Version | OpenSSL 1.0.2j 26 Sep 2016 |
| Is contained | false |
| Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version | 8.2.1 |
System Locale
| Error |
|---|
| No Locale with UTF8 found 🚫 |
fastlane gems
| Gem | Version | Update-Status |
|---|---|---|
| fastlane | 2.3.1 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
| Gem | Version |
|---|---|
| did_you_mean | 1.1.0 |
| slack-notifier | 1.5.1 |
| CFPropertyList | 2.3.4 |
| claide | 1.0.1 |
| colored | 1.2 |
| nanaimo | 0.2.3 |
| xcodeproj | 1.4.2 |
| rouge | 1.11.1 |
| xcpretty | 0.2.4 |
| terminal-notifier | 1.7.1 |
| unicode-display_width | 1.1.2 |
| terminal-table | 1.7.3 |
| plist | 3.2.0 |
| public_suffix | 2.0.4 |
| addressable | 2.5.0 |
| multipart-post | 2.0.0 |
| word_wrap | 1.0.0 |
| babosa | 1.0.2 |
| highline | 1.7.8 |
| commander | 4.4.3 |
| excon | 0.54.0 |
| faraday | 0.10.1 |
| unf_ext | 0.0.7.2 |
| unf | 0.1.4 |
| domain_name | 0.5.20161129 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.6 |
| fastimage | 2.0.1 |
| gh_inspector | 1.0.2 |
| uber | 0.0.15 |
| representable | 2.3.0 |
| retriable | 2.1.0 |
| mime-types-data | 3.2016.0521 |
| mime-types | 3.1 |
| hurley | 0.2 |
| little-plugger | 1.1.4 |
| multi_json | 1.12.1 |
| logging | 2.1.0 |
| jwt | 1.5.6 |
| memoist | 0.15.0 |
| os | 0.9.6 |
| signet | 0.7.3 |
| googleauth | 0.5.1 |
| httpclient | 2.8.3 |
| google-api-client | 0.9.20 |
| json | 2.0.2 |
| mini_magick | 4.5.1 |
| multi_xml | 0.6.0 |
| rubyzip | 1.2.0 |
| security | 0.1.3 |
| xcpretty-travis-formatter | 0.0.4 |
| dotenv | 2.1.1 |
| bundler | 1.13.7 |
| faraday_middleware | 0.10.1 |
| i18n | 0.7.0 |
| tzinfo | 0.3.52 |
| minitest | 4.7.5 |
| thread_safe | 0.3.5 |
| activesupport | 4.0.13 |
| io-console | 0.4.6 |
| openssl | 2.0.2 |
generated on: 2017-01-03
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (4 by maintainers)
I changed export method from ad-hoc to development, and that solved this issue for me.
I’m also experiencing this too, our scenario is for a project that is distributed and resigned by the client, we package up release builds with Hockey for ipas but not for the ‘production’ target which is for the app store. For the production target we generate an xcarchive, where we don’t have distribution rights, they then resign this. Gym has always been able to generate this xcarchive.
With
use_legacy_build_apithegymcommand succeeds (just with the warning of deprecation) and we successfully generate anarchive_pathfor them. However removing it, fails with the signing error.error shown:
error: exportArchive: No valid iOS Distribution signing identities belonging to team xxxxxx were found.more detail:
gym command:
with
use_legacy_api:identical gym command without
use_legacy_api:So it looks like archive_path behaviour may have changed? or will it be no longer possible to use gym to export archives for this scenario when it is fully deprecated?
I’ve noticed that when removing legacy build API option I have to explicitly provide export_mode option. In my case I set it as “enterprise”. Then export works.
He next challenge that we are e facing is whether it is possible to reexport the same archive, while replacing bundle ids and entitlements in the process. The archive is just an info plist and .app file, so seems possible to resign the .app first, the run export - I’m in the middle of figuring it out.
On Thu, 9 Feb 2017 at 8:05 am, tomachi notifications@github.com wrote:
Tried @romk1n https://github.com/romk1n 's suggestion. Didn’t solve the issue. I have the same issue when I set use_legacy_build_api to false with Xcode8. A whole day spent with no solution but make it set to true.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fastlane/fastlane/issues/7717#issuecomment-278461170, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVZvkXDc8A6kbiWK67ITi-NxoFaTNrxks5rai36gaJpZM4LZavO .