App freezes due to CoreTelephony.xpc

Hi everyone,


I have an error on my app. When I launch it, the log shows:



[NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}


The app is freeze during this warning, which appear at least 20 times in just one second.


Any idea?


Thanks in advance.


Best regards,

Rubén

Does this happen if you run the app in the debugger? If so, please do that and then, when you get stuck, break into the debugger, generate a backtrace of the main thread (see the commands below), and post it here.

(lldb) thread select 1
(lldb) bt
… the backtrace will show up here …

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi I am seeitng the same issue. It is only with iOS 12 and started happening with Beta 5.


(lldb) thread select 1

(lldb) bt

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP

* frame #0: 0x0000000108b6ba66 libsystem_kernel.dylib`kevent_id + 10

frame #1: 0x00000001087d63b9 libdispatch.dylib`_dispatch_kq_poll + 222

frame #2: 0x00000001087d6f3b libdispatch.dylib`_dispatch_event_loop_wait_for_ownership + 516

frame #3: 0x00000001087c59cf libdispatch.dylib`__DISPATCH_WAIT_FOR_QUEUE__ + 315

frame #4: 0x00000001087c5427 libdispatch.dylib`_dispatch_sync_f_slow + 231

frame #5: 0x0000000106cfc284 CoreData`_perform + 244

frame #6: 0x0000000106cfcc33 CoreData`-[NSManagedObjectContext(_NestedContextSupport) newValuesForObjectWithID:withContext:error:] + 147

frame #7: 0x0000000106cd346c CoreData`_PFFaultHandlerLookupRow + 588

frame #8: 0x0000000106cd2ddf CoreData`_PF_FulfillDeferredFault + 239

frame #9: 0x0000000106cd2be7 CoreData`_sharedIMPL_pvfk_core + 103

frame #10: 0x0000000103d53cff DisneyWaitTimes`AppDelegate.finishedLoadingForPark(aPark=0x00006000037cf2a0, dataType=4, error=nil, self=0x0000600000102780) at AppDelegate.swift:321

frame #11: 0x0000000103d54387 DisneyWaitTimes`@objc AppDelegate.finishedLoadingForPark(_:dataType:error:) at <compiler-generated>:0

frame #12: 0x0000000104dea869 DisneyWaitTimesKit`partial apply at <compiler-generated>:0

frame #13: 0x0000000104de9a7c DisneyWaitTimesKit`thunk for @escaping @callee_guaranteed (@unowned Park, @unowned UInt32, @unowned NSError?) -> () at <compiler-generated>:0

frame #14: 0x0000000104dea8d1 DisneyWaitTimesKit`partial apply for thunk for @escaping @callee_guaranteed (@unowned Park, @unowned UInt32, @unowned NSError?) -> () at <compiler-generated>:0

frame #15: 0x0000000104de99f4 DisneyWaitTimesKit`DisneyWaitTimesData.finishedLoadingForPark(park=0x00006000037cf2a0, dataType=4, error=nil, self=0x0000600001439b60) at DisneyWaitTimesData.swift:482

frame #16: 0x0000000104de89fa DisneyWaitTimesKit`closure #2 in closure #1 in closure #1 in DisneyWaitTimesData.loadRefurbishments(completionHandler=0x0000000104dd1980 DisneyWaitTimesKit`partial apply forwarder for closure #1 (Swift.Optional<Swift.Error>) -> () in DisneyWaitTimesKit.DataAccess.loadAllRefurbishments(Swift.Optional<(Swift.Optional<Swift.Error>) -> ()>) -> () at <compiler-generated>, self=0x0000600001439b60, request=refurbishments, context=0x0000600002b7def0, park=0x00006000037d5400) at DisneyWaitTimesData.swift:430

frame #17: 0x0000000104deb26f DisneyWaitTimesKit`partial apply for closure #2 in closure #1 in closure #1 in DisneyWaitTimesData.loadRefurbishments(_:completionHandler:) at <compiler-generated>:0

frame #18: 0x0000000104dcc0ad DisneyWaitTimesKit`thunk for @escaping @callee_guaranteed () -> () at <compiler-generated>:0

frame #19: 0x00000001087b668d libdispatch.dylib`_dispatch_call_block_and_release + 12

frame #20: 0x00000001087b76fa libdispatch.dylib`_dispatch_client_callout + 8

frame #21: 0x00000001087c49d1 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1541

frame #22: 0x00000001072d3079 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9

frame #23: 0x00000001072cd706 CoreFoundation`__CFRunLoopRun + 2342

frame #24: 0x00000001072ccaa1 CoreFoundation`CFRunLoopRunSpecific + 625

frame #25: 0x000000010d3d31dd GraphicsServices`GSEventRunModal + 62

frame #26: 0x000000010f7b6a4f UIKitCore`UIApplicationMain + 140

frame #27: 0x0000000103d55594 DisneyWaitTimes`main at AppDelegate.swift:28

frame #28: 0x000000010882cced libdyld.dylib`start + 1

frame #29: 0x000000010882cced libdyld.dylib`start + 1

In future, it’d help if you put code stuff into a code block (you can create one using the

<>
). That makes it much easier to read.

So your main thread is stuck trying to access a CoreData context. It’s likely that it’s stuck because one of your other threads is blocked inside that same CoreData context. You’ll need to look at the backtraces of all your other threads (you can get a backtrace of all threads using

bt all
) to see if you can spot the one that’s stuck.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Im getting similar error while using CoreTelephony on unwantedCommunication Extension.
I have linked CoreTelephony as linked library and this is my troublesome code..

   let networkInfo = CTTelephonyNetworkInfo()
        let carrier = networkInfo.subscriberCellularProvider
        print(carrier);

and my error log is:

2018-08-08 14:24:55.100318-0400 ReportSpam1Extension[4192:295308]
 [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099
 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated."
 UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc
 was invalidated.}

Please help.

Anyone find another solution to this? I am getting the same errors while debugging on simulator and device. Launch Screen appears, then crash.


...[9889:471589] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=9889 ...[9889:471589] SecTaskCopyDebugDescription: iOSSlidingPuzzle[9889]/0#-1 LF=0 ...[9889:471589] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
...[9889:471589] [logging] misuse at line 153876 of [95fbac39ba]
...[9889:477148] Failed to create remote object proxy: Error Domain=NSCocoaErrorDomain 
Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." 
UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
...[9889:477147] Failed to ping server after delegate was set
...[9889:471589] Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain 
Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." 
UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
...[9889:471589] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain 
Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." 
UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
...[9889:471589] Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain 
Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." 
UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
...[9889:471589] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain 
Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." 
UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
...[9889:471589] Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain 
Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." 
UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
...[9889:471589] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain 
Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." 
UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
...[9889:477149] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=9889
...[9889:477149] SecTaskCopyDebugDescription: iOSSlidingPuzzle[9889]/0#-1 LF=0
App freezes due to CoreTelephony.xpc
 
 
Q