macOS: Provisioning profile doesn't include the currently selected device

Bitrise Build Issue Report template

Description of the issue

Can archive the build because
Provisioning profile “…” doesn’t include the currently selected device “controlosxprodc1bhostondemandosx131.local”.


Where did the issue happen?

Xcode 8.3.x, on macOS 10.12 (Sierra)

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


  • 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 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. : NO
  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : YES
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : from the begining

Build log

Please attach the build log (you can download the build log from the build’s page, once the build is finished, using the “Download log” button - floating at the bottom right corner of the log viewer), or if you can’t attach the whole log then send the full log through a private channel (e.g. email - ), with a link to the related GitHub issue.

[03:24:30] $ set -o pipefail && xcodebuild "-workspace" "MockJsonServer2/MockJsonServer.xcworkspace" "-scheme" "DevSandbox" "clean" "archive" "-archivePath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise-xcarchive110773852/DevSandbox.xcarchive" | xcpretty

▸ Cleaning MockJsonServer/DevSandbox [Debug]
▸ Check Dependencies
▸ Clean Succeeded
▸ Building MockJsonServer/DevSandbox [Release]
▸ Check Dependencies

❌  Provisioning profile "MockJsonServer DevSandbox Develop" doesn't include the currently selected device "controlosxprodc1bhostondemandosx131.local".

If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable
Archive failed, error: exit status 65
|                                                                              |
| x | xcode-archive-mac@1.4.0 (exit code: 1)                        | 9.00 sec |
| Issue tracker: .../ |
| Source:           |


Thanks for reporting this here @ciukes!

Can you please send us the raw-xcodebuild-output.log file in email/the onsite chat?

If you need info about how you can access that: Xcode exit code 65 / exit code 66 / raw-xcodebuild-output.log

If you’d have any questions just let us know!

Hi, I have a similar issue.

Provisioning profile "" doesn't include the currently selected device ""

I try to build the macOS for testing, in development mode, but the provisioning profile needs to include the UDID of the used computer… How can we make it work with VMs ?

Thanks !

Hi @clement.nonn,

You need to use the automatic code signing step so it can generate the provisioning profile themselves.

Thanks for your answer ! Can you assure me that it will not add every VM it uses to my profiles and my devices list ? I am afraid to flood my device list, and pollute my profile with all of this…

Unfortunately, I don’t know for sure. I recommend trying two builds and seeing if it happens. With that said, in my personal projects on Bitrise, I don’t see additional Macs being added to my developer account.


I’m running into this issue using Xcode Archive for Mac v1.9.1 - the workflow was set up using the CLI tool. I don’t see any steps for automatic code signing, should I try to use the iOS one?

Hi @mathieutozer! In case the issue is persistent, can you create a separate report about it? Thanks!