[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xcode 16.0 Beta] Carthage fails to xcodebuild archive -showBuildSettings, mentions no destinations. #3375

Closed
henrik-dmg opened this issue Jun 11, 2024 · 17 comments

Comments

@henrik-dmg
Copy link
  • carthage install method: [ ] .pkg, [x] homebrew, [ ] source
  • which carthage: /opt/homebrew/bin/carthage
  • carthage version: 0.39.1
  • xcodebuild -version: Xcode 16.0 Build version 16A5171c
  • Are you using --no-build? No
  • Are you using --no-use-binaries? No
  • Are you using --use-submodules? No
  • Are you using --cache-builds? No
  • Are you using --new-resolver? No
  • Are you using --use-xcframeworks? Yes

Cartfile

github "CocoaLumberjack/CocoaLumberjack"

Carthage Output

*** Fetching CocoaLumberjack
*** Checking out CocoaLumberjack at "3.8.5"
*** xcodebuild output can be found in /var/folders/4n/hzc7z9y54g3dmn6204bg0lfm0000gq/T/carthage-xcodebuild.6LK8Jt.log
*** Skipped downloading CocoaLumberjack binary due to the error:
	"Bad credentials"
A shell task (/usr/bin/xcrun xcodebuild -project /Users/hpanhans/Developer/CocoaLumberjackDebug/Carthage/Checkouts/CocoaLumberjack/Tests/Tests.xcodeproj -scheme iOS\ Tests -configuration Release CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -showBuildSettings -skipUnavailableActions) failed with exit code 6:
2024-06-11 14:40:27.934 xcodebuild[99335:9919534] Writing error result bundle to /var/folders/4n/hzc7z9y54g3dmn6204bg0lfm0000gq/T/ResultBundle_2024-11-06_14-40-0027.xcresult
xcodebuild: error: Found no destinations for the scheme 'iOS Tests' and action archive.
2024-06-11 14:40:29.049 xcodebuild[99335:9919534] Writing error result bundle to /var/folders/4n/hzc7z9y54g3dmn6204bg0lfm0000gq/T/ResultBundle_2024-11-06_14-40-0029.xcresult
2024-06-11 14:40:29.049 xcodebuild[99335:9919534] *** -[__NSCFConstantString stringByAppendingPathExtension:]: cannot append extension 'xcactivitylog' to path ''
2024-06-11 14:40:29.072 xcodebuild[99335:9919534] [MT] DVTAssertions: ASSERTION FAILURE in DVTFrameworks/DVTFoundation/FilePaths/DVTFilePath.m:602
Details:  string should be a string, but it is nil
Object:   <DVTFilePath>
Method:   +_filePathForParent:pathString:
Thread:   <_NSMainThread: 0x600000114280>{number = 1, name = main}
Hints:

Backtrace:
  0   -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   +[DVTFilePath _filePathForParent:pathString:] (in DVTFoundation)
  4   -[DVTFilePath filePathForRelativePathString:] (in DVTFoundation)
  5   -[IDESchemeActionResult setLocalResultDirectoryFilePath:] (in IDEFoundation)
  6   -[IDESchemeActionRecord setLocalRecordDirectoryFilePath:] (in IDEFoundation)
  7   __48-[IDESchemeActionsInvocationRecord setFilePath:]_block_invoke (in IDEFoundation)
  8   __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
  9   -[__NSSingleObjectArrayI enumerateObjectsWithOptions:usingBlock:] (in CoreFoundation)
 10   -[IDESchemeActionsInvocationRecord setFilePath:] (in IDEFoundation)
 11   -[Xcode3CommandLineBuildTool saveResultBundleForError:triageWithSchemeTask:error:] (in Xcode3Core)
 12   -[Xcode3CommandLineBuildTool _printError:schemeTask:andFailWithCode:] (in Xcode3Core)
 13   -[Xcode3CommandLineBuildTool _printErrorString:andFailWithCode:] (in Xcode3Core)
 14   -[Xcode3CommandLineBuildTool _showBuildSettings] (in Xcode3Core)
 15   -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
 16   XcodeBuildMain (in libxcodebuildLoader.dylib)
 17   -[XcodebuildPreIDEHandler loadXcode3ProjectSupportAndRunXcode3CommandLineBuildToolWithArguments:] (in xcodebuild)
 18   -[XcodebuildPreIDEHandler runWithArguments:] (in xcodebuild)
 19   main (in xcodebuild)
 20   start (in dyld)

Actual outcome
Carthage fails to build CocoaLumberjack because it seemingly tries to build an iOS unit test scheme that has no run destinations (project Tests/Tests.xcodeproj in CocoaLumberjack repo)

Expected outcome
Carthage should build CocoaLumberjack correctly

@henrik-dmg henrik-dmg changed the title [Xcode 16.0 Beta] Carthage fails to build [Xcode 16.0 Beta] Carthage fails to build CocoaLumberjack Jun 11, 2024
@jdhealy
Copy link
Member
jdhealy commented Jun 11, 2024

Note

Put up a commit. Commit description details more. Try it out (at one’s own discretion) with brew uninstall carthage; brew install --head carthage. ℹ️ℹ️ℹ️

How we researched this (historical info from mid-2024.) Going to look into this¹, drawing context (first off) from:

xcodebuild · Release Notes Xcode 16A5171c · Resolved Issues
Fixed an issue where xcodebuild silently selects the first compatible run destination when it fails to match the destination specifier provided by the user. (112043381)

Probably involves me filing in Feedback Assistant. But if I find success with 'modify the carthage code'-based options, I may post a prototype carthage homebrew formula.

@jdhealy
Copy link
Member
jdhealy commented Jun 11, 2024

@henrik-dmg just to be thorough in asking questions — any chance the iOS platform had not yet been installed when this run happened?

Sometimes there's a window like:

Screenshot 2024-06-11 at 7 38 55 AM

Note

Help us grab debugging info: as soon as you first see the above issue, if you were already planning to download the iOS platform (sometime colloquially called iOS SDK), then run and grab the following:

$ /Applications/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -version | grep version
Build version 16A5171c
$ /Applications/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -downloadPlatform iOS
Downloading iOS 18.0 Simulator (22A5282m): 29.6% (2.51 GB of 8.46 GB)^C
$ : echo ___ nicely the download does not stop with control-C pressed

@jdhealy jdhealy changed the title [Xcode 16.0 Beta] Carthage fails to build CocoaLumberjack [Xcode 16.0 Beta] Carthage fails to xcodebuild archive -showBuildSettings CocoaLumberjack, mentions no destinations. Jun 11, 2024
@henrik-dmg
Copy link
Author

Thanks for your quick reply. No, the iOS SDK was definitely installed the Xcode 16 Command line Tools were selected

@wrutkowski-tyro

This comment was marked as resolved.

@aykutguvendh
Copy link

We have a similar issue in our project as well.
The specifics:

  • carthage install method: [ ] .pkg, [x] homebrew, [ ] source
  • carthage version: 0.38.0
    xcodebuild -version: Xcode 16.0 Build version 16A5171c

We run carthage bootstrap --platform iOS --cache-builds --no-use-binaries --use-ssh --use-xcframeworks

 *** Skipped building Quick due to the error:
 Dependency "Quick" has no shared framework schemes for any of the platforms: iOS
 If you believe this to be an error, please file an issue with the maintainers at https://github.com/Quick/Quick/issues/new
 *** Skipped building InputBarAccessoryView due to the error:
 Dependency "InputBarAccessoryView" has no shared framework schemes for any of the platforms: iOS
 If you believe this to be an error, please file an issue with the maintainers at https: //github.com/nathantannar4/InputBarAccessoryView/issues/new
 A shell task (/us/bin/xcrun xcodebuild -project /Users/n.gueven/Projects/pd-mob-bc-ios/Carthage/Checkouts/RxSwift/Rx.codeproj -scheme AlTests-iOS -configuration Debug CODE_SIGNING_REQU
GN_IDENTITY= CARTHAGE=YES archive -showBuildSettings -skipUnavailableActions) failed with exit code 6:
 2024-06-11 14:50:19.285 xcodebuild[23672:195613] Writing error result bundle to /var/folders/dp/v41xtm191zv8kd00tnzlp_t1dh24hm/T/ResultBundle_2024-11-06_14-50-0019. xcresult
 xcodebuild: error: Found no destinations for the scheme 'AllTests-iOS' and action archive.

jdhealy added a commit to jdhealy/Carthage that referenced this issue Jun 14, 2024
…ix `-showBuildSettings` with solely the `archive` action. No longer (under Xcode 16 and above) leave `OBJROOT` as stands. Deal with error ‘Found no destinations for the scheme [^\n]+ and action[…]’.

No longer (under Xcode 16 and above) prefix `-showBuildSettings` with solely the `archive` action. Carthage has long-standingly built `simulator` code under the `build` action, but (due to certain now-believed-to-be-fixed bugs, had historically passed the `archive` action when querying under simulator destinations for Xcode Build Settings.) Such a ‘discrepancy which Carthage relies upon improper values out of alignment with Xcode action verb,’ we now believe no longer works around any bugs and Xcode 16 (beta 1 (16A5171c) at the very least) now returns ‘proper’ Build Settings for simulator destinations and the `archive` action.

Xcode Build Setting `OBJROOT` now appears to have more path components. We lop some off (only under Xcode 16 and above.) Out of the three here, Carthage authors are most unsure about leaving this code change ‘as it stands.’ Especially under the purview of Carthage setting `--derived-data`. I’ll comment in the below link as actually running Carthages tests (unit and integration) should ‘prove out’ its sufficiency or deficit. PRs welcome.

Under all Xcode versions, all xcodebuild invocations of `-showBuildSettings` that return non-0 exit code and standardError matching `error[:] Found no destinations for the scheme [^\n]+ and action [^\n]+[.]\n` will see non-surfacing of those errors. Carthage proceeds as if that xcodebuild invocation never happened (which is essentially how Carthage behaved before it had one more non-0 exit code return to deal with.)

`brew install carthage --head` is a pathway that exists (attempt at one’s own discretion, and use the internet for associated prerun commands such as `brew uninstall` and others.)

〜 As several CI providers no longer provide both ‘VNC access’ and Intel Mac builders, Carthage currently has no CI. Carthage maintainers shall be fixing this and commenting in the below link (and elsewhere.)

Potentially fïxes Carthage#3375.

Potentially fïxes Carthage#3374.

See Carthage#3374 for future updates on sufficiency of this commit, and whether lack of ‘may be reverted’ stands.
@jdhealy
Copy link
Member
jdhealy commented Jun 14, 2024

Put up a commit. Commit description details more. Try it out (at one’s own discretion) with brew uninstall carthage; brew install --head carthage.

〜 Carthage maintainers will have to restore CI (to test, unit and integration style) before we ship it. Details in the commit description. We have a plan in mind.

@jdhealy jdhealy pinned this issue Jun 14, 2024
@jdhealy jdhealy changed the title [Xcode 16.0 Beta] Carthage fails to xcodebuild archive -showBuildSettings CocoaLumberjack, mentions no destinations. [Xcode 16.0 Beta] Carthage fails to xcodebuild archive -showBuildSettings, mentions no destinations. Jun 14, 2024
@wrutkowski-tyro

This comment was marked as resolved.

@henrik-dmg
Copy link
Author

@jdhealy following your steps I was able to build CocoaLumberjack using carthage update --use-xcframeworks, thanks! 👍🏼 haven't tested with other frameworks though

@einar-notland
Copy link
einar-notland commented Jun 17, 2024

Seems to fail when specifying --platform iOS Doesn't fail when removing this platform parameter, but then it requires all simulators relevant for the specific projects to be installed (tvOS for example).

Something wrong with the platform scheme lookup or something?

@jdhealy
Copy link
Member
jdhealy commented Jun 17, 2024

@wrutkowski-tyro yes, great to have you post that feedback (on has no shared framework schemes for any of the platforms: iOS). Thank you!

Helped us find an additional bug 🎉 , which — it being a separate issue — gonna link there and hide the comment to allow folks consuming all no destinations info or additional feedback to scroll quickly.

@jdhealy
Copy link
Member
jdhealy commented Jun 17, 2024

@einar-notland, we put up another commit. Good chance we fixed what you’re hitting. Try using the below:

Note

Put up a second commit for June. Commit description details more. Try it out (at one’s own discretion) with brew uninstall carthage; brew install --head carthage. ℹ️ℹ️ℹ️

@einar-notland
Copy link

@jdhealy Thank you so much. The latest commit seems to fix the problems we have seen related to using --platform iOS on Xcode 16 Beta 🙂

@dustinburke-gh
Copy link

I believe this is broken again in Xcode 16 beta 6 (16A5230g). I am using the carthage master branch as described above (brew install --head carthage) and while this was working as recently as beta 5 I am now getting an error:

% carthage bootstrap --platform ios --use-xcframeworks

*** Checking out CocoaLumberjack at "3.8.4"
*** xcodebuild output can be found in /var/folders/hs/g9qz5ttx2x5g9t98qn4fhkq00000gn/T/carthage-xcodebuild.xT9WgY.log
A shell task (/usr/bin/xcrun xcodebuild -project /Users/dustinburke/Documents/Projects/gohealth-ios/libs/Carthage/Checkouts/CocoaLumberjack/Tests/Tests.xcodeproj -scheme iOS\ Tests -configuration Release CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= SUPPORTS_MACCATALYST=NO CARTHAGE=YES build -showBuildSettings -skipUnavailableActions) failed with exit code 64:
2024-08-21 10:52:37.994 xcodebuild[59283:23351929]  DVTDeviceOperation: Encountered a build number "" that is incompatible with DVTBuildVersion.
2024-08-21 10:52:37.995 xcodebuild[59283:23351915] [MT] DVTDeviceOperation: Encountered a build number "" that is incompatible with DVTBuildVersion.
2024-08-21 10:52:38.091 xcodebuild[59283:23351915] Writing error result bundle to /var/folders/hs/g9qz5ttx2x5g9t98qn4fhkq00000gn/T/ResultBundle_2024-21-08_10-52-0038.xcresult
xcodebuild: error: Could not configure request to show build settings: Found no destinations for the scheme 'iOS Tests' and action build.

@shuguenot
Copy link

@dustinburke-gh Yes, same issue here, head version does not help

@apoltix
Copy link
apoltix commented Aug 29, 2024

The output message from xcodebuild has changed, so the pattern introduced in the previous fix no longer matches.

Before it was e.g.

error: Found no destinations for the scheme 'SomeScheme' and action build., now it is

error: Could not configure request to show build settings: Found no destinations for the scheme 'SomeScheme' and action build.

Changing it to skip the new string makes it work again with Xcode 16 beta 6 (or the new string can be added to the pattern).

-let pattern = "error[:] Found no destinations for the scheme [^\n]+ and action [^\n]+[.]\n"
+let pattern = "error[:] [^\n]+Found no destinations for the scheme [^\n]+ and action [^\n]+[.]\n"

@kpriemchenko
Copy link

@jdhealy are there any estimates when a new release will be created?

@prassyy
Copy link
Contributor
prassyy commented Aug 29, 2024

Tested @apoltix's changes. It works locally. Raised a PR with his suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants