Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSURLErrorDomain error code -999 in iOS

I've been trying to use Corona SDK's Facebook API to post the score on the game I'm developing on facebook. However, I'm having a problem with it. During the first time I try to post to facebook, I get this error after login and user authentication:

NSURLErrorDomain error code -999

Then, it won't post on facebook. What are possible causes of this error and how can I address it? I tried searching the web but couldn't find information about it. Thanks in advance.

By the way, I am not using webview on my app. Just the widget api and a show_dialog listener in my Facebook class.

like image 387
user1597438 Avatar asked Apr 18 '13 02:04

user1597438


People also ask

How do I fix Nsurlerrordomain error?

You might see this error message if you are running an outdated version of the NetUpdate application on your Mac. To resolve the issue, simply download and install the latest version of NetUpdate. Now, restart your computer and NetUpdate should work again as expected.

What causes Nsurlerrorcancelled?

The URL Loading System received bad data from the server. A malformed URL prevented a URL request from being initiated. A connection was attempted while a phone call was active on a network that doesn't support simultaneous phone and data communication, such as EDGE or GPRS.


1 Answers

The error has been documented on the Mac Developer Library(iOS docs)

The concerned segment from the documentation will be:

URL Loading System Error Codes

These values are returned as the error code property of an NSError object with the domain “NSURLErrorDomain”.

enum {    NSURLErrorUnknown = -1,    NSURLErrorCancelled = -999,    NSURLErrorBadURL = -1000,    NSURLErrorTimedOut = -1001, 

As you can see; -999 is caused by ErrorCancelled. This means: another request is made before the previous request is completed.

like image 153
hjpotter92 Avatar answered Sep 28 '22 00:09

hjpotter92