NSURLErrorDomain error -999

macOS 'The operation couldn't be completed. (NSURLErrorDomain error -999.)' Fix

This error pops up when a web request gets cancelled mid-flight. Usually a flaky network or a proxy. Here's how to pin it down.

You're in the middle of something — maybe downloading a large file in Safari, or an app like Slack or Dropbox is syncing — and suddenly you get NSURLErrorDomain error -999. The message is vague: "The operation couldn't be completed." It's not a crash, not a hang. The request just dies. The most common trigger is when a network request is cancelled before it finishes. That can happen if you hit stop, or if the connection drops for a split second. But there's another culprit that drives me nuts: a misbehaving proxy or VPN.

Here's the root cause. On macOS, NSURLErrorDomain error -999 is Apple's way of saying NSURLErrorCancelled. The system cancelled the URL request. That's it. The system didn't fail to connect — it actively killed the request. So the question isn't "why can't you connect," it's "what's telling your Mac to abort?".

Why error -999 happens

Two main reasons. First, the user or an app explicitly cancels a request. For example, you click a link and then quickly hit Escape in Safari — that generates -999. That's harmless. Second, and more annoying, is when a network-level component (like a proxy, VPN, or firewall) resets the connection after the request has started. Your Mac sees the reset as a cancellation and reports -999. If you see this error repeatedly on the same site or app, it's almost always a proxy or VPN issue.

The fix — step by step

  1. Check your proxy settings. Go to System Settings → Network → Wi-Fi → Details → Proxies. If anything is ticked (HTTP, HTTPS, SOCKS), untick it temporarily and test. If the error goes away, you've found the problem. Either your proxy is down or misconfigured.
  2. Disable VPN or kill network extensions. If you're running a VPN, turn it off. Not just the app — also check if you have system-level network extensions installed. Go to System Settings → General → Login Items and look for network filters. If you don't recognize something, disable it and restart.
  3. Test with curl. Open Terminal and run curl -v https://example.com. If you see Operation timed out or Connection reset before the response, that confirms a network layer issue. If curl works fine, the problem is app-specific — try quitting the app and reopening.
  4. Flush DNS and renew DHCP. This sounds like old advice, but it works if the Mac has cached a bad route. Run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder and then sudo ipconfig set en0 DHCP (or en1 for the Wi-Fi port). Then test again.
  5. Check the system proxy environment variables. If you've manually set HTTP_PROXY in ~/.zshrc or ~/.bash_profile, that overrides everything. Unset them temporarily with unset HTTP_PROXY HTTPS_PROXY ALL_PROXY and test from Terminal.

Still failing?

If you've done all that and still see -999, check the date and time on your Mac. Wrong time can cause TLS handshake failures that manifest as cancelled requests. Also check for any parental control or content filter software (like Little Snitch or Net Nanny) that might be blocking connections.

One more scenario — if this happens only on a specific website, it could be a server-side issue. The site might be intentionally resetting connections from your IP. Try the same URL on a phone or another machine. If it works there, your network is doing something. If not, it's the site.

Honestly, 9 times out of 10 it's a proxy. I've seen this error after a misconfigured corporate proxy on a MacBook. The user had set a proxy in System Preferences that pointed to an old office server. Once we removed it, error -999 vanished. So start there.

Note: error -999 is different from -1001 (timeout). -999 means the request was cancelled, not that it timed out. So if you're seeing -999, think "what's aborting this?" not "is the network slow?"

Real-world trigger: I've seen this on macOS Sonoma 14.5 when a user had both a VPN and a proxy enabled on the same Wi-Fi interface. Every request would start, then get cancelled 2 seconds later. Disabling the proxy fixed it without touching the VPN.

If you're a developer and you're hitting this in your own app, check your URLSession delegate. You might be calling cancel() inadvertently. But for most users, the above steps solve it.

Related Errors in macOS Errors
com.apple.launchd.peruser.xxx Fix com.apple.launchd peruser error crash loop on macOS Fix com.apple.launchd.peruser Error Crash Loop on macOS The operation can’t be completed macOS 'The operation can’t be completed' fix on external drives null macOS 'The operation can’t be completed' error fix

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.