Chuck Krutsinger
Chuck Krutsinger

Reputation: 2930

fastlane build problems - doubled pathname

Just started using fastlane (v2.118.1) and immediately ran into build problems.

Here is the lane from my Fastfile:

lane :beta do
  build_app(workspace: "projectname.xcworkspace", scheme: "schemename")
end

Here is the redacted Appfile:

app_identifier("redacted")
apple_id("redacted")    
itc_team_id("redacted")
team_id("redacted")

Redacted values are valid. Build runs and build is produced, but the following errors show:

INFO [2019-03-25 10:56:28.23]: ------------------------------
INFO [2019-03-25 10:56:28.23]: --- Step: default_platform ---
INFO [2019-03-25 10:56:28.23]: ------------------------------
INFO [2019-03-25 10:56:28.23]: Driving the lane 'ios beta' 🚀
INFO [2019-03-25 10:56:28.23]: -----------------------
INFO [2019-03-25 10:56:28.23]: --- Step: build_app ---
INFO [2019-03-25 10:56:28.23]: -----------------------
INFO [2019-03-25 10:56:28.28]: $ xcodebuild -showBuildSettings -workspace projectname.xcworkspace -scheme schemename
DEBUG [2019-03-25 10:56:29.63]: Parsing project file '/Users/username/Documents/somefolder/Users/username/Documents/somefolder/projectname.xcodeproj' to find selected provisioning profiles
DEBUG [2019-03-25 10:56:29.63]: Finding provision profiles for 'Release'
ERROR [2019-03-25 10:56:29.63]: Couldn't automatically detect the provisioning profile mapping
ERROR [2019-03-25 10:56:29.63]: Since Xcode 9 you need to provide an explicit mapping of what
ERROR [2019-03-25 10:56:29.63]: provisioning profile to use for each target of your app
ERROR [2019-03-25 10:56:29.63]: [Xcodeproj] Unable to open '/Users/username/Documents/somefolder/Users/username/Documents/somefolder/projectname.xcodeproj' because it doesn't exist.

NOTE: the pathname contains the path to the xcodeproj file twice: '/Users/username/Documents/somefolder/Users/username/Documents/somefolder/projectname.xcodeproj'

There is no error when building and archiving with Xcode IDE, and I can submit my build to TestFlight with no error. This problem only occurs in fastlane.

How can I diagnose where that path is getting doubled?

Upvotes: 0

Views: 1619

Answers (1)

Chuck Krutsinger
Chuck Krutsinger

Reputation: 2930

As posted here, the issue was that somehow the xcworkspace contents had become corrupted and had the raw path to the xcodeproj file included and marked as relative to group. I was able to resolve it by editing xcworkspace/contents.xcworkspacedata using TextEdit to correct the path.

Upvotes: 1

Related Questions