"Build input file cannot be found" for iOS build

#1

Bitrise Build Issue Report template

Description of the issue

I’ve set up a new build based on a relatively small iOS repository. When I run the build, it fails on the xcode-test step - just after **Running script** '[CP] Check Pods Manifest.lock' - with the error:

Build input file cannot be found: '/Users/andrzejdoyle/Documents/EDA/EDA/LocalDataManager.swift' (in target 'EDA' from project 'EDA')

I’ve downloaded the Bitrise CLI and run this locally on a clean checkout, and the build succeeds. I suspect this is a problem with the path in the Git checkout step not aligning with the path in the xcode-build step, but I haven’t modified either. To make sure, I deleted the Bitrise app and recreated it from scratch, and am still seeing the same error.

Environment:

Where did the issue happen?

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

XCode Test for iOS v2.4.1

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 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
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : NO, same problem with 2.4.5
  • When did the issue start? : From the first creation of the project/app on Bitrise

Local reproduction

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.

No - the build succeeds when I run locally with the CLI (on a clean git checkout). A bit of output before and after the error occurs online:

▸ Compiling Pods-EDA-dummy.m
▸ Compiling Pods_EDA_vers.c
▸ Touching Pods_EDA.framework (in target ‘Pods-EDA’ from project ‘Pods’)
▸ Running script ‘[CP] Check Pods Manifest.lock’
▸ Compiling CreateAccountViewController.swift

:warning: /tmp/eda/EDA/onboarding/OnboardingStartViewController.swift:49:19: value ‘userId’ was defined but never used; consider replacing with boolean test

   guard let userId = try? dataMgr.getUserId() else { return }

Build log

Thanks, hope this is a straightforward one!
Andrzej

0 Likes

#2

Hi @eda-dev!

Sorry for the delay. Initially, could you try to insert a -UseModernBuildSystem=NO flag to the “Additional options for xcodetest to call” input in the “Debug” section of the Xcode step and run the build that way?

0 Likes

#3

I’ve done so, and there’s no functional change. (The output looks slightly different, but the step still fails with an error message complaining about the same missing file/path.)

Does the path in the error message look sane to you? Without having a successful build - or detailed output from the git clone step - to compare against, I can’t tell whether /Users/andrzejdoyle/Documents/EDA is the right local project root.

(Or rather, I can quite confidently say it is not, but I don’t know what this should be, or why xcodetest is using the wrong value.)

0 Likes

#4

I see, thanks anyhow! Can you please enable Support User access for us in the Settings of the app?

0 Likes

#5

As far as I can tell I’ve already done this? Please let me know if you’re unable to access the build (https://app.bitrise.io/app/edb7e9033499ebb8) and I’ll dig deeper.

0 Likes

#6

That’s correct, thanks! Additionally, can you check out this answer on SO: https://stackoverflow.com/a/53366116 follow the steps, push the changes and let us know if that changes anything?

0 Likes

#7

I’ve followed the changes in that SO answer, but they resulted in a no-op as my plist was already set correctly.

Additionally it wouldn’t make sense for this to be the problem, as the build succeeds when I run locally with the Bitrise CLI runner (as per https://devcenter.bitrise.io/troubleshooting/debugging-your-build-on-your-own-machine/). This suggests that the xcode-test step itself is fine, when manually invoked on a fresh Git clone.

The major difference when running locally is that .isCI is false, and thus the git-clone step isn’t invoked. It seems very likely to me that this step is not checking out the project to the directory that xcode-test expects (whereas checking out the project manually as per the above instructions does meet xcode-test's expectations).

(FWIW I tried a local invocation with --ci to test this, but git-clone fails as it’s missing several envvars that would be provided by the CI trigger. I could guess at these, but if I provide different values to what’s happening live, this won’t help.)

0 Likes