SwiftUI Previews in Xcode 14 failed to run with SettingsError: noExecutablePath(IDESwiftPackageStaticLibraryProductBuildable)

Hello :)

My iOS project does not work with SwiftUI Preview in Xcode 14 beta. The project builds and runs fine, but Preview never works. The error message is as follows.

HumanReadableSwiftError

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060002ac3e880):'AppCenterCrashes'>)

I do use the AppCenterCrashes dependency in my project. But I'm not sure if this error message is accurate, because sometimes it reports other packages.

After I executed Generate Report, I found the following error in SerializationErrors.txt.

Error Domain=NSCocoaErrorDomain Code=516 "“LogCaffeineIntent.swift” couldn’t be linked to “Intermediates” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/Users/gong/Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/HiCoffee.build/Debug-iphonesimulator/IntentsExtension.build/DerivedSources/IntentDefinitionGenerated/Intents/LogCaffeineIntent.swift, NSUserStringVariant=(
    Link
), NSDestinationFilePath=/var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/previews-diagnostics-20220608-144336/Intermediates/LogCaffeineIntent.swift, NSFilePath=/Users/gong/Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/HiCoffee.build/Debug-iphonesimulator/IntentsExtension.build/DerivedSources/IntentDefinitionGenerated/Intents/LogCaffeineIntent.swift, NSUnderlyingError=0x600033223810 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}

The problem seems to be related to the Intent generation code. I don't know how to fix it yet.

Post not yet marked as solved Up vote post of Gong Down vote post of Gong
24k views
  • Hola. eres desarrollador ios en Mexico ?

Add a Comment

Replies

Same with Klarna package in Xcode 14.

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060001d9b0c90):'KlarnaMobileSDK'>)

And also AWSCore in another project.

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x0000600044578960):'AWSCore'>)

Same error with AppMetrica package:

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060001c3052c0):'YandexMobileMetrica'>)

Same with SmartlookAnalytics, see FB11506040

I found a workaround that at least works for Intercom:

  • Create a local package and add the the intercom dependency to that package
  • Remove intercom from the main project
  • Add the local package as a dependency to the main project

Can't say if this works for other packages

  • @ptxmac, the preview works with this workaround, but I can not import the Library anymore. I always get the error "No such module ...".

Add a Comment

I've been finding this with my own SPM packages, and reported by a number of users of that package. Filed bug FB11397938 back in August.

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060000d2b3b70):'QRCode'>)

Easily reproducible by adding a package to a blank SwiftUI project in Xcode 14. Cannot be reproduced in Xcode 13.

Also seeing broken previews on X14 release with SPM + AppSpector. Removing the package entirely of course fixes it. No issue on X13.

Post not yet marked as solved Up vote reply of Slif Down vote reply of Slif

Still occurs on the Xcode 14 release [Version 14.0 (14A309)]. Booo!

I have the same issue with MSAL package. I've done research and it's happening on beta 5, beta 6 and also the released version of Xcode, it's working well on beta 4 so I'm forced to keep using beta 4 unfortunately for now.

Same problem here:

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060002acb5aa0):'CLibreSSL'>)

This time it's even a library that does not get used at all on Apple platforms, since it's conditional in Package.swift:

            dependencies: [

                .product(name: "CLibreSSL", package: "CLibreSSL", condition: .when(platforms: [.linux])),

            ],

Experiencing the same issue with MSAL package, I tried removing it and everything works fine (but of course, it is not a solution). Does anyone have any updates on when it will be fixed?

Please file a bug report at https://feedbackassistant.apple.com/

Until now, there are less than 10 bug reports reported for this issue. Otherwise it will not get fixed soon.

  • FB11642183. It just gives me that there is no similar reports)

Add a Comment

FYI this is fixed for me in Xcode 14.1 beta

Unfortunately, Xcode 14.1 beta (14B5024h) did not fix the issue for me. Still having the same issue.

  • We did put in a fix that we expected would fix the remaining cases of this issue. Since you are still hitting it would you be able to file a new feedback and make sure to include the preview diagnostics?

  • @FrameworksEngineer new feedback has been submitted - FB11513131

  • I'm also still seeing this issue on 14.1 beta importing AppCenter from an empty project. Filed feedback FB11478600.

I can confirm: It's fixed with Xcode 14.1 beta!

Not sure @Dasoga mistyped, but I can confirm that the issue is NOT fixed entirely in 14.1 beta 1.

Reported new issue: FB11515571