The operation couldn’t be completed. (NSURLErrorDomain error -1011.)

I'm using Firebase Auth and Firestore on my app. When I already signed in, my code in init() function workes fine and my screens automatically updated when data load. But when I first sign in, I get The operation couldn’t be completed. (NSURLErrorDomain error -1011.) error and the rest of the code dont work as it should be. What is the issue and how can I solve it?

Replies

Error -1011 is NSURLErrorBadServerResponse. This usually means that CFNetwork connected to the server and got a response that it couldn’t parse. If you were more directly connected to this, I’d recommend that you trace through your code to find the specific request that failed and then use various network debugging tools to look at how the server responded.

However, in this case you’re talking a server you don’t control via a library you don’t control, so my advice is that you escalate this via the support channel for that library.

Share and Enjoy

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