7

Possible Duplicate:
How do I fix NSURLErrorDomain error -999 in iPhone 3.0 OS

I have an iphone app, built with Jqtouch and phonega,p framework successfully made and submitted to the appstore several times. Then I updated to the new phonegap1.0.0, and then started getting errors related to something called webview. Eventually was advised to create new xcode project and import the old www folder into it. There are now no more errors but the app gets stuck in a loop with the error NSURLErrorDomain error -999. The app loads then starts flashing wildly between screens and the debugger repeats endlessly:

2011-08-31 16:55:13.520 MyIphoneApp[16657:207] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)

Community
  • 1
  • 1
danssker
  • 575
  • 3
  • 7
  • 18
  • Yes, this means it was canceled, but the interesting question is why. Sure if you explicitly cancel the task, you’ll get this, but there are edge cases which are harder to diagnose (e.g. check to see if you have authentication challenge routine in your delegate that could pass `URLSession.AuthChallengeDisposition.cancelAuthenticationChallenge` in Swift or `NSURLSessionAuthChallengeCancelAuthenticationChallenge` in Objective-C; check to make sure you don't have a call to `invalidateAndCancel` buried in your code like Alamofire does when the `SessionManager` falls out of scope; etc.). – Rob Sep 30 '17 at 00:32

1 Answers1

13

That error number corresponds to NSURLErrorCancelled and means that the asynchronous load of the resource was cancelled.

Source Foundation Constants Reference at developer.apple.com

Mike Hay
  • 2,828
  • 21
  • 26
  • 3
    Cheers, but I'm not sure how this helps me. The App worked fine before, why would it begin cancelling loading resources. It began with a couple of semantic errors after upgrading phonegap, which I fixed following the advice on groups.google.com/group/phonegap/browse_thread/thread/6de5d97de52d4e84 and am left in worse place then before. – danssker Aug 31 '11 at 16:32
  • Sorry. I don't know anything about phonegap. Thought knowing what was going on would help you figure out the root problem. – Mike Hay Aug 31 '11 at 16:37
  • No worries - if I was any sort of programmer I probably could. And if I had 15 rep I'd show my appreciation too as it has given me a new angle to search for... – danssker Aug 31 '11 at 16:39