Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated

Tags:

Im getting the error in the title when I run my app. I am running Xcode Beta 10 Version 6. The full error is:

[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.}

It gets thrown in my createTaskFromSnapshot() function, on the first line of the function.

My code:

func observeDatabase(_ tableToUpdate: UITableView) {     taskDatabase.observe(.childAdded) { (snapshot) in         self.handleChildAdded(snapshot: snapshot)         tableToUpdate.reloadData()     } }  private func handleChildAdded(snapshot:      let addedTask = createTaskFromSnapshot(snapshot)     taskList.append(addedTask) }  private func createTaskFromSnapshot(_ snapshot: DataSnapshot) -> Task {     let snapshotValue = snapshot.value as! Dictionary<String, String> // error is thrown here      let taskTitle = snapshotValue["taskTitle"]!     let newTask = Task(title: taskTitle)   return newTask } 

What does this error mean? and why am I getting it?

like image 917
Will Taylor Avatar asked Sep 01 '18 10:09

Will Taylor


Video Answer


2 Answers

The message is probably unrelated to the crash/issue.

I've had this message bother me for a while now with no way of removing it. Well I've found a way to hide this in your xcode console just run one of the following command in a terminal:

xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.CoreTelephony

sudo log config --mode "level:off" --subsystem com.apple.CoreTelephony

you can always re-enable this at anytime by running the same command with a different level attribute`

like image 130
Lifely Avatar answered Sep 28 '22 10:09

Lifely


Try this:

1- From Xcode menu open: Product > Scheme > Edit Scheme

2- On your Environment Variables set OS_ACTIVITY_MODE = disable

enter image description here

like image 33
Tim Walsh Avatar answered Sep 28 '22 10:09

Tim Walsh