Sudden crash on launch from all TestFlight builds

We've been getting a crash on launch starting today from all processed builds from TestFlight.

An identical build we submitted the day before yesterday is crashing on launch too.

Specifically the issue is:

Exception Type: EXC_CRASH (SIGABRT)
Exception Note:
EXC_CORPSE_NOTIFY
Termination Reason: DYLD 1 Library missing
Library not loaded: @rpath/libswift_concurrency.dylib
"/usr/lib/libswift_Concurrency.dylib' (no such file)
(terminated at launch; ignore backtrace)
(no such file)

We're pretty concerned and after aggressive testing we don't think we're the root cause.

Answered by Apple Developer Support in 698119022

Thank you for reporting this issue. We are currently working to resolve this. In the meantime, a workaround can be found in the Xcode 13.2 Release Notes. (Bug number 86349088)

same issue downloading Xcode 13.2 RC to see if it fixes it :(

In our case, our app (deployment target of iOS 11) was hit with this issue when uploading a Bitcode enabled (or disabled) build that was compiled with Xcode 13.2 RC Since we support iOS 11, we don't even use Swift Concurrency features so the issue came as a surprise to me. I tracked the problem back to the fact that one of our dependencies (RealmSwift) has some async code which while it wasn't used, it was enough for Apple to break our build when they processed it :D We recompiled Realm of verion 10.14 and everything is ok

Same issue. @zack1001 solution above worked for me at with Xcode 13.1.

Also seeing this with tvOS

Here's a thread on the Swift forums about this issue FYI: https://forums.swift.org/t/app-distributed-via-testflight-crashes-on-launch/53936/5

Thank you for reporting this issue. We are currently working to resolve this. In the meantime, a workaround can be found in the Xcode 13.2 Release Notes. (Bug number 86349088)

From the release notes:

Apple Clang Compiler

Known Issues

Apps built with Xcode 13 or Xcode 13.1 that make use of Swift Concurrency features (such as async/await), deploy to iOS prior to 15, tvOS prior to 15, or watchOS prior to 8, and have bitcode enabled may crash at launch with an error reporting that the libswift_Concurrency.dylib library was not loaded. (86349088)

Workaround: Add -Wl,-weak-lswift_Concurrency -Wl,-rpath,/usr/lib/swift to Other Linker Flags in the app’s build settings.

In iOS 12 have same issue.

We add  -Wl,-weak-lswift_Concurrency -Wl,-rpath,/usr/lib/swift to Other Linker Flags in the app’s build settings and build using Xcode 13.2 (from developer site) but app crash on iOS 12.

If you have a same problem, please TURN OFF Include bitcode for iOS content option when you upload build. then works normally.

Don't think turn off bitcode is a great solution, we will lose benefits (e.g. app thinning)

Adding libswift_Concurrency.tbd did not work for me on Xcode 13.2 (not even RC). I was forced to go back to 13.1, which worked, and hope Apple can get it resolved soon.

I can't upload macOS app in AppStoreConnect. Every time error what "libswift_Concurrency.dylid"contain unsupported content

Xcode 13.2.1

I still have a crash on iOS12.5.5 related to libswift_Concurrency.tbd even using Xcode 13.2.1. So, I switched back to Xcode 13.1

I can't upload the app to appstoreconnect, and I keep getting this error. The application has been unable to update, very annoying. At present, I don't know how to solve this problem. Hope someone tells me.

Xcode 13.2.1 (13C100)

We also had this problem and updating to Xcode 13.2.1 solved this issue.

From https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2_1-release-notes

Resolved Issues

Fixed an issue where apps built with Xcode 13 or Xcode 13.1 sometimes crashed at launch with an error reporting that the libswift_Concurrency.dylib library was not loaded. This only affected apps that used Swift Concurrency features (such as async/await), deployed to iOS prior to 15, tvOS prior to 15, or watchOS prior to 8, and had bitcode enabled. (86349088)

Hope this helps

Xcode: 13.2.1, iPhone: 14.2 and 14.8 without "Debug executable" causes 100% crash. It's OK when I checked the "Debug executable".

I created new iOS project and added a button on ContentView and press the button.

Task("Hello, world!")
    .padding()
Button("Run task") {
    Task.init {
        print("run task")
    }
}
Sudden crash on launch from all TestFlight builds
 
 
Q