Most of us know that updating macOS and the applications we use regularly is an important part of keeping our Mac secure because updates often include security patches to combat recently discovered flaws. Updates include other benefits, such as new features and performance improvements. But what happens if an update fails? What should you do then? If that happens, you’re likely to see a message saying, “The operation couldn’t be completed. (NSURLErrorDomain error -1012.)” In this article, we’ll show you how to fix it on your Mac.

What is NSURLErrorDomain error -1012?

NSURLErrorDomain error -1012 is an error that can occur when you are trying to install an update in System Settings’ Software Update section, the Updates section of the App Store, or Terminal. However, it’s not limited to software updates. Some users have reported it occurring when an app tries to connect to the internet, and in some cases, it has happened with Safari while browsing the web.

Why does NSURLErrorDomain error -1012 occur?

There is no single answer to that question. The most common instances of the error occurring seem to be when a software updater is looking for an update in a software catalog and can’t find it. In those cases, it’s likely that there is a problem with the catalogURL in the request or that the URL is temporarily unavailable. It could also be caused by DNS issues or corrupt cache files on your Mac.

Tip: Keep track of your Mac’s performance

Error messages are always frustrating, especially when you don’t know how to fix them. But lots of things can cause your Mac to slow down or not work as it should without producing an error message. The best way to deal with those is to monitor your Mac’s performance. That includes pressure on CPU, memory use, network speed, battery health, and even malware. The quickest and easiest way to monitor all that is to use CleanMyMac’s Menu App. It makes it very easy to check your Mac’s health and run tasks like freeing up memory or running a malware scan. Get your free CleanMyMac trial.




How to fix NSURLErrorDomain error -1012

As always, when trying to fix a problem with your Mac when you don’t know the cause, it’s best to start with the easiest fixes and move on from there. First, try these basic troubleshooting tips:

  • Quit the application that is reporting the problem and then restart it and try again.
  • Turn Wi-Fi on your Mac off and then on again.
  • Restart your Mac.

If none helped, follow the steps below in order.

1. Renew your Mac’s DHCP lease

  1. Go to System Settings and choose Network.
  2. Select the active network.
  3. Click Details.
  4. Choose TCP/IP and click Renew DHCP lease.

2. Clear browser cache

if the problem occurs with a web browser, clear its cache. The method for doing that differs between browsers, but it’s usually found in Privacy & Security settings. Here’s how to do it in Safari:

  1. Click the Safari menu and choose Settings.
  2. Choose Privacy in the toolbar.
  3. Click Manage Website Data.
  4. When the data has loaded, click Remove All.

3. Delete App Store preferences files

If the problem occurs when you try to update apps from the App Store, try deleting App Store app preferences files:

  1. Go to the Finder in the Dock and click Go from the menu bar.
  2. Choose Go to Folder.
  3. Paste in each of the file paths below, one at a time. Press Return. At each location, drag the selected file to the Trash. When you have dragged all three files to the trash, empty it.

~/Library/Preferences/com.apple.appstore.plist

~/Library/Preferences/com.apple.appstore.plist.lockfile

~/Library/Preferences/com.apple.softwareupdate.plist

4. Restart mDNSResponder

  1. Go to Applications > Utilities and open Terminal
  2. Type this command: sudo killall -HUP mDNSResponder
  3. Press Return and quit Terminal.

5. Change catalogURL

If the error occurs when you try to update macOS, try changing catalogURL using Terminal:

  1. Open Terminal.
  2. Type or paste this command: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "http://swscan.apple.com/content/catalogs/others/index-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
  3. Press Return.
  4. Type in your login password and press Return again.
  5. Quit Terminal.

Most of the time, when you need to update macOS or an app, it works exactly as it should. The same is true when an app connects to the internet or you visit a website in a browser. But, occasionally, even though everything seems fine, you may run into an error and see the message ‘The operation couldn't be completed. (NSURLErrorDomain error -1012)’. Follow the steps above to fix it and get your Mac working properly again.