iOS Swift Package Manager Bitrise error

Bitrise Build Issue Report template

Description of the issue

We are trying to switch from Carthage to Swift Package Manager. This is the first attempt as using Swift Package Manager with Bitrise for us. When trying to build the branch, we are getting

Please describe the issue here
x | ios-auto-provision (exit code: 1) | 1.9 min |
±–±--------------------------------------------------------------±---------+
| Issue tracker: 
github.com/bitrise-steplib/steps-ios-auto-provision/issues |
| Source: https://github.com/bitrise-steplib/steps-ios-auto-provision |

show-ios - build #1768 (0f11735f785aabca) - Bitrise

Environment:

Agent version: 1.17.1
Hostname: prd-veg-std-s-xcode-12-3-210204181108-rWyosgDse6fnLjbnvA5rrg.local
Start time: 2021-02-04T18:18:32Z

Where did the issue happen?

If on Bitrise.io: which stack? If not on Bitrise.io: on what operating system? (Plus any other information you can share)

Which build Step causes the issue and which version of the step?

E.g.: Git Clone v3.6.0

Reproducibility

  • NO 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) : YES/NO
  • NO Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : YES/NO
  • Does the issue happen sporadically, or every time? :
  • Does upgrading the build Step to the latest version help? : YES/NO
  • When did the issue start? :

Local reproduction

NO_Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried._
It builds fine on my local Mac using Xcode 12.4

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Build log

Please copy paste the build’s bitrise.io URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - https://www.bitrise.io/contact ), with a link to the related Discuss issue.
Config:

  • Paths:
  • IgnoredPaths:
  • CacheAPIURL: [REDACTED]
  • FingerprintMethodID: file-content-hash
  • CompressArchive: false
  • DebugMode: false
  • StackID: osx-xcode-12.3.x
  • BuildSlug: 0f11735f785aabca
    Cleaning paths
    No path to cache, skip caching

    | |
    ±–±--------------------------------------------------------------±---------+
    | ✓ | cache-push | 7.11 sec |
    ±–±--------------------------------------------------------------±---------+
    ▌
    ±-----------------------------------------------------------------------------+

| (6) ios-auto-provision |
±-----------------------------------------------------------------------------+
| id: ios-auto-provision |
| version: 1.5.4 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: bash |
| time: 2021-02-04T18:55:12Z |
±-----------------------------------------------------------------------------+
| |
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Installing ri documentation for bundler-1.17.3
Done installing documentation for bundler after 5 seconds
1 gem installed
$ bundle install
$ bundle exec ruby /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise842663009/step_src/step.rb
Params:
team_id: S3FUXBGMUL
certificate_urls: ***
min_profile_days_valid: 0
passphrases: ***
distribution_type: development
project_path: MavFarm.xcodeproj
scheme: MavFarm
configuration: Stage
build_url: https://app.bitrise.io/build/0f11735f785aabca
build_api_token: ***
keychain_path: /Users/vagrant/Library/Keychains/login.keychain
keychain_password: ***
verbose_log: no
generate_profiles: yes
Developer Portal authentication
authenticated
Downloading Certificates
multiple codesign identity uploaded with common name: Apple Development: Emel Topaloglu (SNAWUBHVAF)
3 certificate files downloaded, 2 distinct codesign identities included
Identify Certificates on Developer Portal
Development certificate found: Apple Development: Emel Topaloglu (SNAWUBHVAF) [2307271282859615193]
Distribution certificate found: Apple Distribution: Mav Farm, Inc. (S3FUXBGMUL) [620610841073952923]
Analyzing project
Using defined build configuration: Stage instead of the scheme’s default one (Release)
Ignoring configuration file ‘(null)’ because it could not be loaded.
Reason: File could not be parsed due to preprocessing errors:
The file “XCode12.xcconfig” couldn’t be opened because there is no such file. (/Users/vagrant/git/Users/vagrant/git/XCConfig/XCode12.xcconfig)xcodebuild: error: Could not resolve package dependencies:
Authentication failed because no credentials were provided.
Error:
xcodebuild -showBuildSettings -project “/Users/vagrant/git/MavFarm.xcodeproj” -target “MavFarm” -configuration “Stage” failed, out: Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -showBuildSettings -project /Users/vagrant/git/MavFarm.xcodeproj -target MavFarm -configuration Stage
Resolve Package Graph
Fetching https://github.com/marmelroy/PhoneNumberKit
Fetching https://github.com/mavfarm/Wires.git
Stacktrace (for debugging):
/private/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise842663009/step_src/lib/autoprovision/project_helper.rb:405:in xcodebuild_target_build_settings' /private/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise842663009/step_src/lib/autoprovision/project_helper.rb:325:intarget_codesign_identity’
/private/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise842663009/step_src/lib/autoprovision/project_helper.rb:83:in block in project_codesign_identity' /private/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise842663009/step_src/lib/autoprovision/project_helper.rb:80:ineach’
/private/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise842663009/step_src/lib/autoprovision/project_helper.rb:80:in project_codesign_identity' /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise842663009/step_src/step.rb:44:in’
| |
±–±--------------------------------------------------------------±---------+
| x | ios-auto-provision (exit code: 1) | 1.9 min |
±–±--------------------------------------------------------------±---------+
| Issue tracker: 
github.com/bitrise-steplib/steps-ios-auto-provision/issues |
| Source: https://github.com/bitrise-steplib/steps-ios-auto-provision |
±–±--------------------------------------------------------------±---------+
▌
±-----------------------------------------------------------------------------+

| (7) set-xcode-build-number |
±–±--------------------------------------------------------------±---------+
±–±--------------------------------------------------------------±---------+
| - | set-xcode-build-number | 1.58 sec |
±–±--------------------------------------------------------------±---------+
▌
±-----------------------------------------------------------------------------+

| (8) xcode-archive |
±–±--------------------------------------------------------------±---------+
±–±--------------------------------------------------------------±---------+
| - | xcode-archive | 4.46 sec |
±–±--------------------------------------------------------------±---------+
▌
±-----------------------------------------------------------------------------+

| (9) deploy-to-bitrise-io |
±–±--------------------------------------------------------------±---------+
±–±--------------------------------------------------------------±---------+
| ✓ | deploy-to-bitrise-io | 9.18 sec |
±–±--------------------------------------------------------------±---------+
▌
±-----------------------------------------------------------------------------+

| (10) script@1 |
±–±--------------------------------------------------------------±---------+
±–±--------------------------------------------------------------±---------+
| - | script@1 | 1.33 sec |
±–±--------------------------------------------------------------±---------+
▌
±-----------------------------------------------------------------------------+

| (11) script@1 |
±–±--------------------------------------------------------------±---------+
±–±--------------------------------------------------------------±---------+
| - | script@1 | 1.17 sec |
±–±--------------------------------------------------------------±---------+
±-----------------------------------------------------------------------------+
| bitrise summary |
±–±--------------------------------------------------------------±---------+
| | title | time (s) |
±–±--------------------------------------------------------------±---------+
| ✓ | activate-ssh-key | 15.74 sec|
±–±--------------------------------------------------------------±---------+
| ✓ | git-clone | 1.2 min |
±–±--------------------------------------------------------------±---------+
| ✓ | cache-pull | 7.06 sec |
±–±--------------------------------------------------------------±---------+
| ✓ | script@1.1 | 3.98 sec |
±–±--------------------------------------------------------------±---------+
| ✓ | script@1 | 34.9 min |
±–±--------------------------------------------------------------±---------+
| ✓ | cache-push | 7.11 sec |
±–±--------------------------------------------------------------±---------+
| x | ios-auto-provision (exit code: 1) | 1.9 min |
±–±--------------------------------------------------------------±---------+
| Issue tracker: 
github.com/bitrise-steplib/steps-ios-auto-provision/issues |
| Source: https://github.com/bitrise-steplib/steps-ios-auto-provision |
±–±--------------------------------------------------------------±---------+
| - | set-xcode-build-number | 1.58 sec |
±–±--------------------------------------------------------------±---------+
| - | xcode-archive | 4.46 sec |
±–±--------------------------------------------------------------±---------+
| ✓ | deploy-to-bitrise-io | 9.18 sec |
±–±--------------------------------------------------------------±---------+
| - | script@1 | 1.33 sec |
±–±--------------------------------------------------------------±---------+
| - | script@1 | 1.17 sec |
±–±--------------------------------------------------------------±---------+
| Total runtime: 38.8 min |
±-----------------------------------------------------------------------------+
Submitting anonymized usage information

For more information visit:
https://github.com/bitrise-io/bitrise-plugins-analytics/blob/master/README.md
exit status 1

Hi! Looking at your logs I see the following:

Ignoring configuration file '(null)' because it could not be loaded.
	Reason: File could not be parsed due to preprocessing errors:
    The file “XCode12.xcconfig” couldn’t be opened because there is no such file. (/Users/vagrant/git/Users/vagrant/git/XCConfig/XCode12.xcconfig)xcodebuild: error: Could not resolve package dependencies:
  Authentication failed because no credentials were provided.

Why is your .xcconfig file missing? Is it present locally when you do a clean clone?

My guess is that the authentication failed because the login credentials were in the .xcconfig file.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.