Failed to apply code sign settings for target
Description of the issue
When changing the Bundle ID of a project from the Bitrise workflow, the provisioning fails.
The step used to change the bundle ID (CFBundleIdentifier) is called “Set iOS Info.plist - Bundle Identifier”. Then during the step “iOS Auto Provision with App Store Connect API” i’m calling a scheme that uses the new bundle ID that i also did set using the previous step.
There is both a development and a app-store provisioning profile with this bundle id uploaded to Bitrise.
Environment:
Where did the issue happen?
Bitrise stack: Xcode 11.3.x, on macOS 10.14.6 (Mojave)
Which build Step causes the issue and which version of the step?
ios-auto-provision-appstoreconnect: Apply Bitrise managed codesigning on the project
Reproducibility
- Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
-
Does a rebuild without caches help? (You can remove the
Cache:Pull
andCache:Push
steps temporarily to not to use the cache, or you can delete all the caches on theSettings
tab of the app. : NO - Does the issue happen sporadically, or every time? : Every time
- Does upgrading the build Step to the latest version help? : NO
Build log
+------------------------------------------------------------------------------+
| (9) ios-auto-provision-appstoreconnect@0 |
+------------------------------------------------------------------------------+
| id: ios-auto-provision-appstoreconnect |
| version: 0.1.0 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2020-06-22T07:44:28Z |
+------------------------------------------------------------------------------+
| |
Config:
- BuildAPIToken: [REDACTED]
- BuildURL: https://app.bitrise.io/build/94ce2f189b7b3e9f
- ProjectPath: Marginalen.xcodeproj
- Scheme: Marginalen Test
- Configuration:
- Distribution: app-store
- MinProfileDaysValid: 0
- CertificateURLList: [REDACTED]
- CertificatePassphraseList:
- KeychainPath: /Users/vagrant/Library/Keychains/login.keychain
- KeychainPassword: *****
- VerboseLog: false
Creating AppstoreConnectAPI client
the client created for https://api.appstoreconnect.apple.com/
Analyzing project
configuration: Release
project team ID: Z3E54ZE449
bundle IDs:
- se.marginalen.test2020
platform: iOS
Downloading certificates
2 certificates downloaded:
- Apple Distribution: Marginalen Bank Bankaktiebolag (Z3E54ZE449)
- Apple Development: Giovanni Palusa (Z65SZU7A62)
ensuring codesigning files for distribution types: [app-store development]
Checking if 1 Bitrise test device(s) are registered on Developer Portal
13 devices are registered on Developer Portal
checking if the device (00008030-001120141104802E) is registered
device already registered
Checking app-store provisioning profiles for 1 bundle id(s)
Checking bundle id: se.marginalen.test2020
capabilities: map[keychain-access-groups:[]]
Bitrise managed profile found: Bitrise iOS app-store - (se.marginalen.test2020)
the profile is not in sync with the project requirements, regenerating ...
Searching for app ID for bundle ID: se.marginalen.test2020
app ID found: Marginalen 2020 Test
app ID capabilities are in sync with the project capabilities
Creating profile for bundle id: Marginalen 2020 Test
profile created: Bitrise iOS app-store - (se.marginalen.test2020)
Checking development provisioning profiles for 1 bundle id(s)
Checking bundle id: se.marginalen.test2020
capabilities: map[keychain-access-groups:[]]
Bitrise managed profile found: Bitrise iOS development - (se.marginalen.test2020)
the profile is not in sync with the project requirements, regenerating ...
Searching for app ID for bundle ID: se.marginalen.test2020
app ID found: Marginalen 2020 Test
app ID capabilities are in sync with the project capabilities
Creating profile for bundle id: Marginalen 2020 Test
profile created: Bitrise iOS development - (se.marginalen.test2020)
Apply Bitrise managed codesigning on the project
Target: Marginalen Test
development Team: Marginalen Bank Bankaktiebolag(Z3E54ZE449)
provisioning Profile: Bitrise iOS development - (se.marginalen.test2020)
certificate: Apple Development: Giovanni Palusa (Z65SZU7A62)
Failed to apply code sign settings for target (Marginalen Test): failed to change code signing in target attributes, error: failed to get traget's (AC9F4B18249A5C1000D4FCAC) attributes, error: key: string("AC9F4B18249A5C1000D4FCAC") not found in: serialized.Object(serialized.Object{"AC452652221FE5820015522A":map[string]interface {}{"CreatedOnToolsVersion":"10.1", "LastSwiftMigration":"1020"}, "AC452666221FE5860015522A":map[string]interface {}{"CreatedOnToolsVersion":"10.1", "LastSwiftMigration":"1020", "TestTargetID":"AC452652221FE5820015522A"}, "AC452671221FE5860015522A":map[string]interface {}{"CreatedOnToolsVersion":"10.1", "LastSwiftMigration":"1020", "TestTargetID":"AC452652221FE5820015522A"}})
| |
+---+---------------------------------------------------------------+----------+
| x | ios-auto-provision-appstoreconnect@0 (exit code: 1) | 48.86 sec|
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...se-steplib/steps-ios-auto-provision-appstoreconnect/issues |
| Source: ...thub.com/bitrise-steplib/steps-ios-auto-provision-appstoreconnect |
+---+---------------------------------------------------------------+----------+