Crash in URLSessionConfiguration init in Xcode 26.0 beta (17A5241e)

It's not yet fully clear why and when does this crash occur, but I'm creating this post so there's a centralized thread for this.

Some hints collected so far:

  • The crash is occurring for existing Xcode projects opened with new Xcode 26.0 beta (17A5241e); no one's been able to reproduce on a project created in Xcode 26. I even tried creating a project with Xcode 16.2 and open it in Xcode 26, but it's all working fine there (don't have older Xcode at the moment, to try with many versions)
  • It crashes right at the line of code that initializes URLSessionConfiguration. If you call URLSession() without parameters (which is deprecated as of iOS 13), the session initializes without the crash.
  • It's NOT occurring only for libraries installed through package manages. In a project where it crashes, one should be able to reproduce by adding URLSessionConfiguration.default as the first line in didFinishLaunchingWithOptions
  • It crashes when running an app on an iOS 26 simulator. (I don't have a device running beta iOS 26 to test on it!) It's working fine when running the app on a simulator or a device running iOS 18 or older.

Related issue on Firebase GitHub repo: https://github.com/firebase/firebase-ios-sdk/issues/14948

Sorry to not be able to provide more info at the moment. I wanted to report this so in case someone from Apple knows about it, we could at least get some feedback or workarounds, until fix is released -- and, to prevent us all from duplicating this report in repositories of each library, as this isn't related to libraries.

Answered by DTS Engineer in 846043022
this is still an issue with Xcode 26 Beta 2 as well.

Indeed.

For the record, the ‘lead bug’ here is FB18043319, and that’s not fixed in 26.0b2.

However, we do now fully understand the problem, so there’s no need for any more bug reports about this. Thanks to everyone who chipped in here.

I don’t have any info to share as to when this’ll be fixed. If this is causing you significant grief then I suggest that you temporarily apply the workaround suggested by salla.an in this post. I just happened to bump into this issue myself last week and that workaround got me past it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

For me, it crashes in a Swift Package as soon as I call URLSession(configuration: .ephemeral) (located in a static method, called from Task{} within another static method) with EXC_BREAKPOINT (code=1, subcode=0x257b8318c). It crashes only in the simulator (iOS 26 beta 1), on the device (iOS 26 beta 1) works. Tried on macOS 15.5 (24F74) and Xcode 26 beta 1.

Running it from Xcode 16.4 (16F6) and on iOS 26 simulator also crashes. Running it from Xcode 16.4 (16F6) and on iOS 18.4 simulator does not crash.

(FB17969913)

I have a SwiftUI project that is a couple of years old. I also have this issue, but adding nw_tls_create_options() to the top of my init worked wonders.

@main
struct MyApp: App {
    init() {
        nw_tls_create_options()
    }
}
To workaround this you just need to call ANY Network method

Yep. That gels with my current understanding of this issue. While I’ve not dug into it in depth, it does seem to caused by a library load order problem and calling Network framework directly seems to bypass it.

If you are able to reproduce this issue:

  1. Please try isolating it into a small test project.

  2. If you’re able to do that, add that test project to your bug report.

  3. And then reply to this thread with your bug number.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I’ve changed minimum TLS from 1.0 to 1.2 in Info.plist

The feedback app keeps timing out on me while trying to post a sample for you to reproduce.

Our Airship sample is having this issue. I created a branch that reproduces it without needing to actually have any kind of config.

Steps:

  1. clone https://github.com/urbanairship/ios-library/tree/xcode26-crash
  2. Open Airship.xcworkspace
  3. Run Airship Sample target on a simulator

It should crash in the App deletate: _ = URLSessionConfiguration.default

@DTS Engineer sure, I just sent the bug report and attached a sample project that triggers the crash. Bug report FB18043319.

I've sent a bug report and sample project that triggers the crash as well (FB18104088)

We are also seeing this in our app when running in iOS 26 simulators and nowhere else.

We fixed one crash site (internal to AFNetworking) by removing the dependency but now another dependency we actually need is also tripping it:

#0	0x000000019735f944 in static Swift._DictionaryStorage.allocate(scale: Swift.Int8, age: Swift.Optional<Swift.Int32>, seed: Swift.Optional<Swift.Int>) -> Swift._DictionaryStorage<τ_0_0, τ_0_1> ()
#1	0x000000019735fa80 in static Swift._DictionaryStorage.resize(original: Swift.__RawDictionaryStorage, capacity: Swift.Int, move: Swift.Bool) -> Swift._DictionaryStorage<τ_0_0, τ_0_1> ()
#2	0x00000001887eaef8 in 0x1887eaef8 ()
#3	0x00000001887f31e0 in 0x1887f31e0 ()
#4	0x00000001886c62c0 in 0x1886c62c0 ()
#5	0x00000001886cc02c in 0x1886cc02c ()
#6	0x000000018894cea4 in 0x18894cea4 ()
#7	0x00000001807ffd84 in __SCNetworkReachabilityCopyDescription ()
#8	0x000000018044a288 in CFCopyDescription ()
#9	0x00000001805018f4 in -[__NSCFType description] ()
#10	0x00000001810c63a4 in _NS_os_log_callback ()
#11	0x00000001800dbca8 in _os_log_fmt_flatten_NSCF ()
#12	0x00000001800db5e4 in _os_log_fmt_flatten_object_impl ()
#13	0x00000001800eda38 in _os_log_impl_flatten_and_send ()
#14	0x00000001807d4458 in __SC_log_send2 ()
#15	0x00000001807fd6cc in SCNetworkReachabilityCreateWithName ()
#16	0x00000001019f9660 in bugsnag::Reachability::Reachability at /Users/marc/Projects/checkout/concepts/Pods/BugsnagPerformance/Sources/BugsnagPerformance/Private/Reachability.mm:15
#17	0x00000001019f9834 in bugsnag::Reachability::Reachability at /Users/marc/Projects/checkout/concepts/Pods/BugsnagPerformance/Sources/BugsnagPerformance/Private/Reachability.mm:13
#18	0x00000001019e079c in std::__1::construct_at[abi:de200100]<bugsnag::Reachability, bugsnag::Reachability*> at /Applications/Xcode-26.0-beta-1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.0.sdk/usr/include/c++/v1/__memory/construct_at.h:40
#19	0x00000001019e0760 in std::__1::__construct_at[abi:de200100]<bugsnag::Reachability, bugsnag::Reachability*> at /Applications/Xcode-26.0-beta-1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.0.sdk/usr/include/c++/v1/__memory/construct_at.h:48
#20	0x00000001019e05f0 in std::__1::allocator_traits<std::__1::allocator<bugsnag::Reachability>>::construct[abi:de200100]<bugsnag::Reachability, void, 0> at /Applications/Xcode-26.0-beta-1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.0.sdk/usr/include/c++/v1/__memory/allocator_traits.h:318
#21	0x00000001019e0524 in std::__1::__shared_ptr_emplace<bugsnag::Reachability, std::__1::allocator<bugsnag::Reachability>>::__shared_ptr_emplace[abi:de200100]<std::__1::allocator<bugsnag::Reachability>, 0> at /Applications/Xcode-26.0-beta-1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.0.sdk/usr/include/c++/v1/__memory/shared_ptr.h:161
#22	0x00000001019e016c in std::__1::__shared_ptr_emplace<bugsnag::Reachability, std::__1::allocator<bugsnag::Reachability>>::__shared_ptr_emplace[abi:de200100]<std::__1::allocator<bugsnag::Reachability>, 0> at /Applications/Xcode-26.0-beta-1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.0.sdk/usr/include/c++/v1/__memory/shared_ptr.h:158
#23	0x00000001019e0048 in std::__1::allocate_shared[abi:de200100]<bugsnag::Reachability, std::__1::allocator<bugsnag::Reachability>, 0> at /Applications/Xcode-26.0-beta-1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.0.sdk/usr/include/c++/v1/__memory/shared_ptr.h:733
#24	0x00000001019dec30 in std::__1::make_shared[abi:de200100]<bugsnag::Reachability, 0> at /Applications/Xcode-26.0-beta-1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.0.sdk/usr/include/c++/v1/__memory/shared_ptr.h:741
#25	0x00000001019deb74 in bugsnag::BugsnagPerformanceLibrary::BugsnagPerformanceLibrary at /Users/marc/Projects/checkout/concepts/Pods/BugsnagPerformance/Sources/BugsnagPerformance/Private/BugsnagPerformanceLibrary.mm:83
#26	0x00000001019de6b8 in bugsnag::BugsnagPerformanceLibrary::BugsnagPerformanceLibrary at /Users/marc/Projects/checkout/concepts/Pods/BugsnagPerformance/Sources/BugsnagPerformance/Private/BugsnagPerformanceLibrary.mm:85
#27	0x00000001019de620 in bugsnag::BugsnagPerformanceLibrary::sharedInstance at /Users/marc/Projects/checkout/concepts/Pods/BugsnagPerformance/Sources/BugsnagPerformance/Private/BugsnagPerformanceLibrary.mm:20
#28	0x00000001019de7a8 in bugsnag::BugsnagPerformanceLibrary::calledAsEarlyAsPossible at /Users/marc/Projects/checkout/concepts/Pods/BugsnagPerformance/Sources/BugsnagPerformance/Private/BugsnagPerformanceLibrary.mm:29
#29	0x0000000100bfd2b4 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const ()
#30	0x0000000100c1cc6c in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const ()
#31	0x0000000100c273e8 in invocation function for block in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const ()
#32	0x0000000100c24698 in mach_o::Header::forEachLoadCommand ()
#33	0x0000000100c25cc8 in mach_o::Header::forEachSection ()
#34	0x0000000100c1c76c in dyld3::MachOAnalyzer::forEachInitializer ()
#35	0x0000000100bfd174 in dyld4::Loader::findAndRunAllInitializers ()
#36	0x0000000100c031e0 in dyld4::JustInTimeLoader::runInitializers ()
#37	0x0000000100bfd4b8 in dyld4::Loader::runInitializersBottomUp ()
#38	0x0000000100bfd458 in dyld4::Loader::runInitializersBottomUp ()
#39	0x0000000100bfd458 in dyld4::Loader::runInitializersBottomUp ()
#40	0x0000000100c00c20 in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const ()
#41	0x0000000100bfd564 in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks ()
#42	0x0000000100c0ea6c in dyld4::APIs::runAllInitializersForMain ()
#43	0x0000000100bedd2c in dyld4::prepare ()
#44	0x0000000100bed348 in _dyld_sim_prepare ()
#45	0x0000000100de4844 in dyld4::prepareSim ()
#46	0x0000000100de32f0 in dyld4::prepare ()
#47	0x0000000100de3184 in dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const ()
#48	0x0000000100de2b00 in start ()
Accepted Answer

Appears fixed in Xcode 26 beta 2 (17A5241o)

Still crashes for us.

The crash still occurs in Xcode 26 beta 2 under macOS Tahoe beta 2 here, too. A clean & build didn't resolve the issue, either.

I also couldn't find any mention of this issue in the release notes for Xcode 26 beta 2, so I assume it's still pending to be fixed.

Like the others have noted, this is still an issue with Xcode 26 Beta 2 as well.

this is still an issue with Xcode 26 Beta 2 as well.

Indeed.

For the record, the ‘lead bug’ here is FB18043319, and that’s not fixed in 26.0b2.

However, we do now fully understand the problem, so there’s no need for any more bug reports about this. Thanks to everyone who chipped in here.

I don’t have any info to share as to when this’ll be fixed. If this is causing you significant grief then I suggest that you temporarily apply the workaround suggested by salla.an in this post. I just happened to bump into this issue myself last week and that workaround got me past it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Any chance you can un-accept the answer I accepted as correct … ?

A weird quirk of the DevForums platform is that it’s not possible to change an accepted answer, either as the original poster or an admin. Needless to say, I consider that to be a bug (r. 113568518).

I can change the Apple Recommended answer, and I’ll do that as this issue evolves.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

My app ran into this error also. It was caused by the Datadog Static framework. Reporting that the nw_tls_create_options fix works for that too.

Crash in URLSessionConfiguration init in Xcode 26.0 beta (17A5241e)
 
 
Q