Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
128 views
in Technique[技术] by (71.8m points)

ios - 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.

question from:https://stackoverflow.com/questions/57420612/how-to-fix-nw-connection-receive-internal-block-invoke-console

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...