QRCode icon indicating copy to clipboard operation
QRCode copied to clipboard

Error in new Xcode 14 (SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060000d2b3b70):'QRCodeExternal'>))

Open danrom11 opened this issue 3 years ago • 4 comments
trafficstars

In the new Xcode 14, the form preview does not work with the following error: SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060000d2b3b70):'QRCodeExternal'>)

danrom11 avatar Sep 13 '22 16:09 danrom11

Thanks for reporting this, and apologies that this issue is occurring.

I found the same issues in the first couple of Xcode 14 betas and I've reported a bug (FB11397938) with Apple. I've yet to hear back from them, and unfortunately its still persists in the later betas.

There seems to be a number of folks having the same issue with different SPM packages.

https://developer.apple.com/forums/thread/707569

Even if it is a bug in this package (which I don't think is the case given Xcode 13 works fine) it should not break every swiftui preview in a project. Hopefully Apple will resolve this before Xcode 14 becomes official.

dagronf avatar Sep 13 '22 23:09 dagronf

Interestingly, if you link against the dynamic version of the library, the SwiftUI previews start working again.

Not a solution (which will require Apple to fix Xcode) but it's a workaround if you're stuck.

dagronf avatar Sep 18 '22 01:09 dagronf

It's strange, but even the dynamic version 8.3.0 does not work for me Error code: `Error Domain=FBProcessExit Code=128 "The process exited." UserInfo={NSLocalizedFailureReason=The process exited., BSErrorCodeDescription=other, NSUnderlyingError=0x6000018e76f0 {Error Domain=dyld Code=1 "1" UserInfo={NSLocalizedFailureReason=1}}}


RemoteHumanReadableError: The operation couldn’t be completed. Transaction failed. Process failed to launch. (process launch failed)

BSTransactionError (1): ==NSLocalizedFailureReason: Transaction failed. Process failed to launch. (process launch failed) ==transaction: <FBApplicationProcessLaunchTransaction: 0x600002fdda40> ==error-description: Process failed to launch. ==error-reason: process launch failed ==precipitating-error: Error Domain=FBProcessExit Code=128 "The process exited." UserInfo={NSLocalizedFailureReason=The process exited., BSErrorCodeDescription=other, NSUnderlyingError=0x6000018e76f0 {Error Domain=dyld Code=1 "1" UserInfo={NSLocalizedFailureReason=1}}}

==================================

| MessageSendFailure: Message send failure for <ServiceMessage 22: relaunch>`

danrom11 avatar Sep 18 '22 21:09 danrom11

How odd! I suppose the only reliable solution is for Apple to fix Xcode (boooooo). I'll update when I hear more

dagronf avatar Sep 19 '22 03:09 dagronf

Xcode 14.1 has been released, and the issue still hasn't been resolved 😤.

It appears that the SwiftUI previews rely on dynamic library types. Or maybe there's something it's doing special that requires that the (default) library type is not static. Who knows.

It seems like defining the 'default' library type (in this case QRCode) resolved SwiftUI previews in Xcode 14, which means that static and dynamic libraries need to be explicitly defined.

So :-

  • QRCode (undefined type) - this works for SwiftUI previews
  • QRCodeStatic (statically linked)
  • QRCodeDynamic (dynamic linkage)

There's a new tag release 10.2.0 which includes this change. So, if you link against QRCode, SwiftUI previews should start working again.

Note that if you link a project explicitly against either the static or dynamic library types, SwiftUI previews may/may not work. Sometimes the dynamic one works, but not always. sigh

I'll keep on Apple's back about this.

dagronf avatar Nov 01 '22 22:11 dagronf

It seems like this issue has been fixed with Xcode 14.2 - I can no longer reproduce the issue!

Can anyone try updating to Xcode 14.2 and see if it's fixed for them as well?

dagronf avatar Dec 14 '22 23:12 dagronf

Okay it seems like this has been resolved by upgrading to Xcode 14.2

dagronf avatar Dec 27 '22 01:12 dagronf