bitrise-steplib/steps-xcode-archive

Fail to detect Apple Pay feature in provisioning profile

acatalina opened this issue · 6 comments

Troubleshooting

  • I've searched discuss.bitrise.io for possible solutions.
  • Which version of the step is effected? 4.x
  • Is the issue reproducible with the latest version? YES
  • Does the issue happen sporadically, or every time? EVERY TIME
  • Is the issue reproducible locally by following our local debug guide? YES

Useful information

Issue description

The step fails when trying to archive as it doesn't detect Apple Pay feature in the provisioning profile even though it's included. Same configuration builds just by changing the step version to 3.x

Bitrise info

  • Build URL: Please share the build URL with us.
  • Bitrise Support enabled: YES / NO
  • Log:
❌  error: "kitchenchronicles" requires a provisioning profile with the Apple Pay feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'kitchenchronicles' from project 'kitchenchronicles')
  

Hey @acatalina - It would be really helpful to see the full build log to debug this issue (I also recommend setting the verbose_log input set to yes)

If you don't want to post the build log publicly, please submit a new help request in our Help Center and we'll get back to you shortly.

Hi @ofalvai, very sorry for the delay, completely missed the notification 😞

Would this log be sufficient? Thanks!

+------------------------------------------------------------------------------+
| (0) certificate-and-profile-installer                                        |
+------------------------------------------------------------------------------+
| id: certificate-and-profile-installer                                        |
| version: 1.10.3                                                              |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2021-12-04T17:26:51Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[17:26:51]  * [OK] Step dependency (go) installed, available. 
Configs:
 - CertificateURL: https://con***8fd
 - CertificatePassphrase: ***
 - ProvisioningProfileURL: https://con***b16
 - InstallDefaults: yes
 - DefaultCertificateURL: https://sto***p12
 - DefaultCertificatePassphrase: ***
 - DefaultProvisioningProfileURL: https://sto***ion
 - KeychainPath: /Users/[REDACTED]/Library/Keychains/login.keychain
 - KeychainPassword: ***
Default Certificate given
Provided Certificate count: 2
Default Provisioning Profile given
Provided Provisioning Profile count: 2
Keychain (/Users/[REDACTED]/Library/Keychains/login.keychain) does not exist
 Checking (/Users/[REDACTED]/Library/Keychains/login.keychain-db)
Downloading & installing Certificate(s)
Downloading certificate: 1/2
Downloading certificate: 2/2
Installing downloaded certificates
Apple Distribution: Alex Purse (2NYZB6KRBG)
serial: 50999881608169033762936465731633542396
team: Alex Purse (2NYZB6KRBG)
expire: 2022-10-20 15:41:10 +0000 UTC
iPhone Developer: Dev Portal Bot Bitrise (E89JV3W9K4)
serial: 149308669917794252413558859495036042076
team: BITFALL FEJLESZTO KORLATOLT FELELOSSEGU TARSASAG (72SA8V3WYL)
expire: 2022-04-16 12:26:25 +0000 UTC
Downloading & installing Provisioning Profile(s)
Downloading provisioning profile: 1/2
Moving it to: /Users/[REDACTED]/Library/MobileDevice/Provisioning Profiles/d53aef51-8fe8-42ad-92aa-764333f5952b.mobileprovision
prov2021 (d53aef51-8fe8-42ad-92aa-764333f5952b)
exportType: app-store
team: Alex Purse (2NYZB6KRBG)
bundleID: com.deptofdigital.altyburgers
capabilities:
- com.apple.developer.in-app-payments: [merchant.com.deptofdigital.altyburgers]
- keychain-access-groups: [2NYZB6KRBG.* com.apple.token]
certificates:
- Apple Distribution: Alex Purse (2NYZB6KRBG)
  serial: 50999881608169033762936465731633542396
  teamID: 2NYZB6KRBG
expire: 2022-10-20 15:41:10 +0000 UTC
Downloading provisioning profile: 2/2
Moving it to: /Users/[REDACTED]/Library/MobileDevice/Provisioning Profiles/e682b378-3286-41b8-aeeb-4b4398c0e025.mobileprovision
BitriseBot-Wildcard (e682b378-3286-41b8-aeeb-4b4398c0e025)
exportType: development
team: BITFALL FEJLESZTO KORLATOLT FELELOSSEGU TARSASAG (72SA8V3WYL)
bundleID: *
capabilities:
- keychain-access-groups: [72SA8V3WYL.* com.apple.token]
certificates:
- iPhone Developer: Dev Portal Bot Bitrise (E89JV3W9K4)
  serial: 149308669917794252413558859495036042076
  teamID: 72SA8V3WYL
devices:
- e56d5afda6c15403a8bcdcc9928158ba00000000
- e1017eeda622ceca11bc9e969b6e0824aa75f882
- f826e0b1578e953c8014e7b8cf012faff72a718f
- 216848e81881e08d816cfe195adb9dfddffd5e2d
- de5398c3e4557950966438a6d167195b8f521e22
- 07db2724ed9b24368fb51db1ad3405a75229d9a6
- 21bbc342c380001152f6f44055d3e8b3f4229740
- 4a30198fe63b2872c8da5d81f346d890d786a442
- da80875ac8b757fe3be41ff0c7d69c769c568203
- 6dd4effea10c016decccc2fd9cb42e72b7587dfd
- cf6c11f678ddf50a39e73b07d7719a6874e3dcbe
- 672e61a60c55efcb03f74cc149eb60e1be4f1dd2
- af875aa648d99e0be45a4fae1e338ef59ae4d525
- 1a70123535cdd205f5bee81e352769a55306ea3f
- 9883a4cc51551a2016c7e1ec5078e99ac180d0a5
- 954ca26571f23f2c4d2c02321573aaa0f49e372a
- 00008020-000B398E01BA002E
- 71153a920968f2842d360db00b4d3bc46c92f511
- 8c04c166b6e77fdee33dab932ef23e5e0e347da3
- 20d26942ff4e128132ed51e9663a86a5d6d2213a
- d45beca0f3ff9c4b71766f4688845c249aa307cb
- f7fbd10ea86c16ec583500c004c985b36262dd0a
- 1a70123535cdd205f5bee81e352769a55306ea3f
- fd78102d2af0953be5356423812c5f049157273d
- 71ae90911e73b76df6e99d0d713133c3e078418f
- 00008030-000630C42610802E
- b13813075ad9b298cb9a9f28555c49573d8bc322
- d912377a132dd1c2cabc7166da1da98832c03fe3
- 98bae88cd1280f11daf4b655389340ec3d22cf81
- 54c3393c184b8f80e4c0f60a66e15f32864e742b
- da74b2e910d15cb89de8d3cfa1c1604cce4e08a3
- 00008030-000559E92123802E
- d45b1dcecedb81abefddfb6fde522db8cbf59c96
- 86a9d9132f8140777fb07d90ae020b27020d2a22
- cf5d2c2570b190cdf0ce661b4883a5a8c5d5180c
- 00008030-001469D61E00802E
- 25dca6aa746a5433aab4802752ae0c64d3b0fed2
- 1b78ac4bad2e8911139287ac5dd152fbe86eb2b9
- db91983e1bb8b86609e6887a63a44f78a00b95c1
- d45b1dcecedb81abefddfb6fde522db8cbf59c96
- 00008020-000971A83A30003A
- c8355ca6216a933f0069329b11509d3c195f1e3b
- 5c90f844c0e1af21a179d203ac5417cec6f3f7e7
- 00008020-0015543C3409002E
- f7247f7e76096bdb52d23b73221c807f220c7d60
- 5d5c3da9d66df9efdb9d97a0a335cd559a7d4755
- 00008030-001C488214A0802E
- 00008020-000A58AC14D1002E
- e24e293730f3f37163aa965f1506396e6f4837eb
- 00008020-00111C3C2201002E
expire: 2022-04-16 14:09:19 +0000 UTC
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ✓ | certificate-and-profile-installer                             | 8.98 sec |
+---+---------------------------------------------------------------+----------+
                                          ▼
+------------------------------------------------------------------------------+
| (1) xcode-archive@4.2                                                        |
+------------------------------------------------------------------------------+
| id: xcode-archive                                                            |
| version: 4.2.0                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2021-12-04T17:27:01Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[17:27:01]  * [OK] Step dependency (xcode) installed, available. 
Inputs:
- ExportMethod: development
- UploadBitcode: true
- CompileBitcode: true
- ICloudContainerEnvironment: 
- ExportDevelopmentTeam: 
- ExportOptionsPlistContent: 
- LogFormatter: xcpretty
- ProjectPath: ios/altyburgers.xcworkspace
- Scheme: altyburgers
- Configuration: 
- OutputDir: /Users/[REDACTED]/deploy
- PerformCleanAction: false
- XcodebuildOptions: 
- XcconfigContent: COMPILER_INDEX_STORE_ENABLE = NO
- ExportAllDsyms: true
- ArtifactName: 
- VerboseLog: true
- CacheLevel: swift_packages
- CodeSigningAuthSource: off
- CertificateURLList: [REDACTED]
- CertificatePassphraseList: *****
- KeychainPath: /Users/[REDACTED]/Library/Keychains/login.keychain
- KeychainPassword: *****
- RegisterTestDevices: false
- MinDaysProfileValid: 0
- BuildURL: https://app.bitrise.io/build/c368b741-ab40-482c-977a-8d88689566dd
- BuildAPIToken: *****
Xcode version:
Xcode 12.5.1 (Build version 12E507)
Checking if log formatter (xcpretty) is installed
- xcprettyVersion: 0.3.0
Automatic code signing is disabled, skipped downloading code sign assets
Creating the Archive ...
[17:27:24] $ set -o pipefail && xcodebuild "-workspace" "/Users/[REDACTED]/git/ios/altyburgers.xcworkspace" "-scheme" "altyburgers" "-xcconfig" "/var/folders/g2/xnd8hpjs50v433gfrybz2nxh0000gn/T/194876242/temp.xcconfig" "archive" "-archivePath" "/var/folders/g2/xnd8hpjs50v433gfrybz2nxh0000gn/T/xcodeArchive028624009/altyburgers.xcarchive" "-destination" "generic/platform=iOS" | xcpretty
❌  error: "altyburgers" requires a provisioning profile with the Apple Pay feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'altyburgers' from project 'altyburgers')
Last lines of the Xcode's build log:
Build settings from configuration file '/var/folders/g2/xnd8hpjs50v433gfrybz2nxh0000gn/T/194876242/temp.xcconfig':
    COMPILER_INDEX_STORE_ENABLE = NO
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/[REDACTED]/git/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Flipper-PeerTalk' from project 'Pods')
/Users/[REDACTED]/git/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Flipper-DoubleConversion' from project 'Pods')
/Users/[REDACTED]/git/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Flipper-Glog' from project 'Pods')
/Users/[REDACTED]/git/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'rn-fetch-blob' from project 'Pods')
/Users/[REDACTED]/git/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'YogaKit' from project 'Pods')
/Users/[REDACTED]/git/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'RNSentry' from project 'Pods')
error: "altyburgers" requires a provisioning profile with the Apple Pay feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'altyburgers' from project 'altyburgers')
/Users/[REDACTED]/git/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'boost-for-react-native' from project 'Pods')
** ARCHIVE FAILED **
You can find the last couple of lines of Xcode's build log above, but the full log will be also available in the raw-xcodebuild-output.log
The log file will be stored in $BITRISE_DEPLOY_DIR, and its full path will be available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable.
Exporting outputs...
The xcodebuild archive log path is now available in the Environment Variable: BITRISE_XCODEBUILD_ARCHIVE_LOG_PATH (value: /Users/[REDACTED]/deploy/xcodebuild-archive.log)
archive failed, error: exit status 65
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | xcode-archive@4.2 (exit code: 1)                              | 46.19 sec|
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-steplib/steps-xcode-archive/issues |
| Source: https://github.com/bitrise-steplib/steps-xcode-archive               |
+---+---------------------------------------------------------------+----------+

Hey @acatalina, are you sure you have the exact same setup except for the Xcode Archive step version? I'm asking because I see this line in your logs

Automatic code signing is disabled, skipped downloading code sign assets

...which means it won't do any changes to the project config or modify profiles/certificates.

Also, if you still experience the problem, please try upgrading to the latest version, we have rolled out a few fixes recently.

Hi @ofalvai

Yes, the only thing I've done to make it work is to downgrade the step.

Just tried with 4.2.5 and same output.

The automatic signing... that line doesn't appear on successful builds using version 3 but we always set manual code signing

I noted that the downloaded provisioning profile (in the Certificate Installer step logs) is for App Store export method, while the Xcode Archive step is set to do a Development export. Are you sure that this is correct? We had a breaking change in version 4.0.0 around the export method input, maybe the Development export method is used because it's the default value of the new step input: https://github.com/bitrise-steplib/steps-xcode-archive/releases/tag/4.0.0

All sorted now, thanks @ofalvai. It looks like it wasn't picking the expected provisioning profile, no idea which one it was trying to archive with to be honest hehe