Xcode build failed to find scheme in project (steps-xcode-build-for-simulator 0.9.4)

ios
xcode

#1

Bitrise Build Issue Report template

Description of the issue

The step Xcode build for simulator is failing for my build.

I think it could be related to this closed issue: https://github.com/bitrise-steplib/steps-xcode-build-for-simulator/issues/7

But it is not clear for me if there is a known problem with this step or not.

The error I get is: Failed to export the artifacts, error: failed to fetch project's targets, error: Failed to found scheme (Komuti-QA) in projecte

My schemes are shared. And I can see the scheme reported to not be found listed if I use xcodebuild. Everything looks properly configured in Xcode. So I am assuming it could be a bug in steps-xcode-build-for-simulator project.

Environment:

Where did the issue happen?

It fails in both Bitrise.io and Bitrise CLI (1.26.0).

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

Bitrise.io it’s using Xcode 10.1.x, on macOS 10.13 (High Sierra).

Bitrise CLI on my machine runs macOS Mojave 10.14.2 and Xcode Version 10.1 (10B61).

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

Xcode build for simulator (0.9.4)

Reproducibility

  • Does a “Rebuild” help? : NO
  • Does a rebuild without caches help? : NO
  • Does the issue happen sporadically, or every time? : EVERY TIME
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : It started after we went from using a single scheme to having several schemes that use different configurations.

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide?

Yes. it fails with the same error message:

Failed to export the artifacts, error: failed to fetch project’s targets, error: Failed to found scheme (Komuti-QA) in project

I tried the sections ** Testing with a full clean git clone**, Test with the Bitrise CLI + Additional notes for iOS projects.

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.

What follows is almost the whole log of the build with just some portions of it replaced with ...:


#2

Hello @hectr!

Could you try adding a recreate user schemes step before it?


#3

Hi @fehersanyi-bitrise!

Thank you for your reply.

I have added the recreate user schemes step before the Xcode build for simulator, but it’s still failing.

These are the last lines of the log:

...
▸ Linking Komuti.qa
▸ Copying InfoPlist.strings
▸ Copying InfoPlist.strings
▸ Copying App/res/Settings.bundle
▸ Copying InfoPlist.strings
▸ Copying GoogleService-Info.plist
▸ Compiling LaunchScreen.storyboard
▸ Processing Info.plist
▸ Generating 'Komuti.qa.app.dSYM'
▸ Running script 'Fabric'
▸ Running script 'Swiftlint'
▸ Running script '[CP] Embed Pods Frameworks'
▸ Touching Komuti.qa.app
▸ Signing /Users/hector/Library/Developer/Xcode/DerivedData/Komuti-avznaspwtsqijpawdpchqphmzcmu/Build/Products/QA-iphonesimulator/Komuti.qa.app
▸ Build Succeeded

Copy artifacts from Derived Data to /var/folders/zd/bwklzpsd5_x10lmd1fmy9qm00000gn/T/deploy884868843
Failed to export the artifacts, error: failed to fetch project's targets, error: Failed to found scheme (Komuti-QA) in project
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | xcode-build-for-simulator (exit code: 1)                      | 35 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...com/bitrise-steplib/steps-xcode-build-for-simulator/issues |
| Source: https://github.com/bitrise-steplib/steps-xcode-build-for-simulator   |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (8) file-downloader@1.0.1                                                    |
+------------------------------------------------------------------------------+
| id: file-downloader                                                          |
| version: 1.0.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2019-01-22T16:42:33+01:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
WARN[16:42:33] The step's (file-downloader@1.0.1) Run-If expression evaluated to false - skipping 
INFO[16:42:33] The Run-If expression was: .IsCI  
|                                                                              |
+---+---------------------------------------------------------------+----------+
| - | file-downloader@1.0.1                                         | 0.39 sec |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (9) Send to QA server                                                        |
+------------------------------------------------------------------------------+
| id: script                                                                   |
| version: 1.1.5                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2019-01-22T16:42:34+01:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
WARN[16:42:34] A previous step failed, and this step (Send to QA server) was not marked as IsAlwaysRun, skipped 
|                                                                              |
+---+---------------------------------------------------------------+----------+
| - | Send to QA server                                             | 0.39 sec |
+---+---------------------------------------------------------------+----------+


+------------------------------------------------------------------------------+
|                               bitrise summary                                |
+---+---------------------------------------------------------------+----------+
|   | title                                                         | time (s) |
+---+---------------------------------------------------------------+----------+
| - | activate-ssh-key                                              | 2.24 sec |
+---+---------------------------------------------------------------+----------+
| - | git-clone                                                     | 0.37 sec |
+---+---------------------------------------------------------------+----------+
| ✓ | Brew install swiftlint                                        | 5.84 sec |
+---+---------------------------------------------------------------+----------+
| ✓ | script@1.1.5                                                  | 1.77 sec |
+---+---------------------------------------------------------------+----------+
| ✓ | cocoapods-install@1.7.2                                       | 11 sec   |
+---+---------------------------------------------------------------+----------+
| ✓ | xcode-test                                                    | 112 sec  |
+---+---------------------------------------------------------------+----------+
| ✓ | recreate-user-schemes@1.0.2                                   | 0.64 sec |
+---+---------------------------------------------------------------+----------+
| x | xcode-build-for-simulator (exit code: 1)                      | 35 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...com/bitrise-steplib/steps-xcode-build-for-simulator/issues |
| Source: https://github.com/bitrise-steplib/steps-xcode-build-for-simulator   |
+---+---------------------------------------------------------------+----------+
| - | file-downloader@1.0.1                                         | 0.39 sec |
+---+---------------------------------------------------------------+----------+
| - | Send to QA server                                             | 0.39 sec |
+---+---------------------------------------------------------------+----------+
| Total runtime: 171 sec                                                       |
+------------------------------------------------------------------------------+


Submitting anonymized usage informations...
For more information visit:
https://github.com/bitrise-core/bitrise-plugins-analytics/blob/master/README.md

I have checked it and, when I run Bitrise CLI, Komuti.qa.app and Komuti.qa.app.dSYM exist on ~/Library/Developer/Xcode/DerivedData/Komuti-avznaspwtsqijpawdpchqphmzcmu/Build/Products/QA-iphonesimulator.

Do you know what could have gone wrong?

Thanks in advance!


#4

Hey! Could you please send me the url of this build?
with the full logs I could tell you more but this way the context is just not enough :cry:


#5

I have just sent the link through an email to letsconnect@bitrise.io with the summary “Xcode build failed to find scheme in project (steps-xcode-build-for-simulator 0.9.4)”.

Will it be forwarded to you?

Thank in advance.


#6

Hi @hectr,

It looks like the message didn’t make it through :thinking: Could you contact us using the on-site chat instead?