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 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:
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?
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.)
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?
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.)