Home > News Tips

How to Fix NSURLErrorDomain error -1012 on Mac?

Updated on Tuesday, August 27, 2024

iBoysoft author Jenny Zeng

Written by

Jenny Zeng
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

When updating the software on a Mac, you may encounter the error reading "The operation couldn't be completed. (NSURLErrorDomain error -1012.)" It can happen while you are checking or installing updates in the Mac App Store, the Software Update preference pane, or Terminal.

NSURLErrorDomain error -1012 on Mac

What does the error NSURLErrorDomain error -1012 mean? Let's discuss it in the following paragraphs and fix it for good.

What is NSURLErrorDomain error -1012 on Mac?

NSURLErrorDomain error -1012 typically indicates a problem with an HTTP request that prevents your Mac from running or checking software updates. It can be caused by various factors, such as incorrect catalog URLs for old OS versions like macOS High Sierra, corrupted preference files, or internet problems.

Share the information to help others understand error 1012!

 

How to fix NSURLErrorDomain error -1012 on Mac?

If you're stuck with NSURLErrorDomain error -1012 on Mac, try the following solutions.

Fix 1: Change the CatalogURL for software updates

If the error "NSURLErrorDomain error -1012" occurs on macOS High Sierra, consider changing the CatalogURL for software updates on your Mac. This will enable your Mac to look for software updates at the specified URL instead of the default location, which isn't working now.

To do this:

  1. Open Terminal.
  2. Input the following command and hit Enter.sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "http://swscan.apple.com/content/catalogs/others/index-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
  3. Type in your login password and hit Enter.

Fix 2: Delete preference files

Another tip that has been proven effective in resolving "NSURLErrorDomain error -1012" is to delete the preference files related to the App Store and Software Update, allowing them to recreate.

  1. Quit the Mac App Store.
  2. Open Finder.
  3. Click Go > Go to Folder.
  4. Type in the following paths separately, hit Enter, then delete the specified plist files. 
    How to delete plist file to fix NSURLErrorDomain error 1012  
    ~/Library/Preferences/com.apple.appstore.plist 
    ~/Library/Preferences/com.apple.appstore.plist.lockfile
    ~/Library/Preferences/com.apple.softwareupdate.plist
  5. Empty the Trash.
  6. Restart your Mac.

Fix 3: Restart the mDNSResponder

Sometimes the error shows up due to internet issues. For example, your internet service provider (e.g., school or corporate) may not support your IPv6 or IPv4 configuration, have latency issues, or have corrupted DNS. To fix this, you can restart the mDNSResponder process.

  1. Open Terminal.
  2. Run the command below.sudo killall -HUP mDNSResponderIf your Mac is using OS X 10.6.6. ~ 10.6.8, run this one instead:sudo dscacheutil -flushcache
  3. Input the login password and press Enter.
  4. Reboot your Mac.

Fix 4: Renew the DHCP lease

If the error remains, you can renew the DHCP lease to refresh the IP address assigned to your Mac by the DHCP server. This helps maintain network stability and ensure your Mac is connected without reconfiguring network settings.

On macOS Ventura and later:

  1. Go to the Apple menu > System Settings > Network.
  2. Select the connected WiFi network.
  3. Choose TCP/IP.
  4. Click "Renew DHCP Lease." 
    Renew DHCP lease to fix NSURLErrorDomain error -1012 on Mac

On macOS Monterey and earlier:

  1. Open the Apple menu > System Preferences > Network.
  2. Select the connected network service.
  3. Click Advanced > TCP/IP.
  4. Click "Renew DHCP Lease."

Hopefully, the error "NSURLErrorDomain error -1012" no longer bothers you and you can update the software as expected. Share this guide if you find it helpful!