# iOS Swift Package Manager Bitrise error

**URL:** https://discuss.bitrise.io/t/ios-swift-package-manager-bitrise-error/15652
**Category:** Builds
**Tags:** ios
**Created:** [February 4, 2021, 7:10pm UTC](https://discuss.bitrise.io/t/ios-swift-package-manager-bitrise-error/15652 "2021-02-04T19:10:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![terry.wang](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@terry.wang](https://discuss.bitrise.io/u/terry.wang)
#### Post date: [February 4, 2021, 7:10pm UTC](https://discuss.bitrise.io/t/ios-swift-package-manager-bitrise-error/15652/1 "2021-02-04T19:10:42Z")

</div>

# 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](https://github.com/bitrise-steplib/steps-ios-auto-provision) |

[show-ios - build #1768 (0f11735f785aabca) - Bitrise](https://app.bitrise.io/build/0f11735f785aabca#?tab=log)

## 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](http://Bitrise.io): which stack? If not on [Bitrise.io](http://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](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : 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](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)? 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](http://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](https://www.bitrise.io/cli) )? If no, can it be reproduced with Docker (using the same docker images / environment we use on [bitrise.io](http://bitrise.io))? Related guide: [http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/](http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/) ._

## Build log

_Please copy paste the build’s [bitrise.io](http://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](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](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](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](https://github.com/marmelroy/PhoneNumberKit)  
Fetching [https://github.com/mavfarm/Wires.git](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:in`target\_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:in`each’  
/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](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](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](https://github.com/bitrise-io/bitrise-plugins-analytics/blob/master/README.md)  
exit status 1

---

<div class="post-metadata">

### Author: ![matthew.jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/matthew.jones/32/3130_2.png) [@matthew.jones](https://discuss.bitrise.io/u/matthew.jones)
#### Post date: [February 24, 2021, 3:34pm UTC](https://discuss.bitrise.io/t/ios-swift-package-manager-bitrise-error/15652/2 "2021-02-24T15:34:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)
#### Post date: [March 26, 2021, 3:34pm UTC](https://discuss.bitrise.io/t/ios-swift-package-manager-bitrise-error/15652/3 "2021-03-26T15:34:23Z")

</div>

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