That error popping up is annoying—it usually means a download or a page load just stops dead. Let's get you back to work. The fix below handles the most common causes, and it takes less than five minutes.
The Quick Fix: Restart and Clear the App's Cache
- Quit the app completely. For Safari, press Cmd + Q. Don't just close the window—that keeps it running in the background.
- After it closes, reopen the app and try the action again. If that works, you're done. If not, move to step 3.
- Clear the app's cache. For Safari, go to Safari > Settings > Privacy and click Manage Website Data. Then click Remove All. This wipes stored cookies and site data, not your bookmarks or history.
- For Mail, open Mail > Settings > Accounts, select your account, and turn off Mail syncing. Wait a few seconds, then turn it back on.
After removing website data in Safari, you should see a confirmation box that says "Done." Then try loading that page again. For Mail, check the bottom of the message list—it'll start downloading messages again after you re-enable it.
Why This Works
Error -1012 is part of the URL loading system. It specifically means the request was canceled. Think of it like a phone call that someone hangs up on before you finish speaking. The server didn't reject you, and your Mac didn't crash—something in between just stopped the connection.
The most common trigger is a stale or corrupt cache entry. The app tries to reuse a cached response, but the server says that data is no longer valid. Instead of fetching fresh data, the app cancels the request entirely. Clearing the cache forces it to ask the server from scratch. That's why the restart alone often works—it flushes the in-memory cache. When it doesn't, the disk cache is the culprit, which is why you need step 4.
Less Common Variations
If the restart and cache clearing didn't help, you're dealing with one of these two less common situations.
1. Proxy or VPN Interference
If you use a VPN, a corporate proxy, or even a system-wide ad blocker, that can cancel connections on purpose. The error might pop up only when you're on a specific Wi-Fi network.
Here's how to check:
- Open System Settings (or System Preferences on older macOS).
- Click Network, then select your active connection (Wi-Fi or Ethernet).
- Click Details (or Advanced on older macOS).
- Click Proxies. Make sure Auto Proxy Discovery is unchecked, and also uncheck any specific proxy types like HTTP or HTTPS if you don't have a corporate proxy.
- Click OK, then Apply.
After you click Apply, you might see the Wi-Fi icon blink for a second—that's normal. Try your download again. VPN users: disconnect from the VPN and test. If it works, your VPN is the problem. Reconnect and check if there's a setting that can exclude certain domains.
2. Certificate Pin Validation
In rare cases, error -1012 appears when an app uses SSL certificate pinning. That's a security measure where the app only trusts a specific certificate, not any valid one. You'll see this if you use enterprise apps or some financial software. The fix is to check for an app update—developers often issue updates when they rotate certificates.
Don't try to disable this security feature by installing a custom root certificate. It can leave you exposed. Just update the app.
Prevention: What to Do Differently
Most people hit this error once and never again. But if you're seeing it weekly, take these steps:
- Keep your macOS updated. Apple has improved the URL loading system several times. Bug fixes for this exact issue appear in macOS 12.3 and later.
- Don't let your Mac sleep while downloading. A wake from sleep can cause the network connection to drop. In System Settings > Battery (or Energy Saver on older macOS), set the sleep timer to something long—like 15 minutes or more—when you're downloading large files.
- Check your DNS settings. A flaky DNS resolver can cause intermittent cancellations. In System Settings > Network > Details > DNS, add
8.8.8.8and8.8.4.4(Google's DNS) if your ISP's servers are unreliable. Click Apply and test.
Honestly, the restart-and-clear-cache fix handles 80% of these cases. The proxy check handles another 15%. The rest are app-specific quirks that updates will fix. You've got this.