Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "nw_connection_receive_internal_block_invoke" (console)

I'm configuring a new Firebase app in Xcode, but get "nw_connection_receive_internal_block_invoke [C1] Receive reply failed with error 'Operation canceled'" printed repeatedly in the console. What should I do to fix this?

This is in Xcode 11 Beta 3, and I've tried creating a new project altogether since the original was created from an older version of Xcode, yet I still get this error printed repeatedly in the console even though all I've done is run it once after configuring.

I expect to see no errors in the console, yet this error is printed many times.

like image 947
Varun S Avatar asked Aug 08 '19 21:08

Varun S


1 Answers

I was getting the same error. My code looked like this:

UserServices().getUserWithUID(uid: user.uid) { (user) in
    self.window?.rootViewController = MapViewController(user: user)
    self.window?.makeKeyAndVisible()
}

All I did to resolve the problem was change my code to this:

let userServices = UserServices()
userServices.getUserWithUID(uid: user.uid) { (user) in
    self.window?.rootViewController = MapViewController(user: user)
    self.window?.makeKeyAndVisible()
}

and the console errors disappeared.

like image 179
user3508428 Avatar answered Nov 07 '22 21:11

user3508428