Ok, we sort of finally found the main problem, but we still can't fix that main problem outright, but there is a good main problem workaround.
-The "add other account" mail workaround posted above is still good.
-The "clean install" test also posted above is confirmed.
If you are on High Sierra, and you want to use the main problem workaround instead of just using the mail workaround, keep reading. I highly recommend it, as the main problem can cause multiple errors in multiple places, beyond the few examples I will add below.
The Problem:
It seems there is something local stopping connections to at least swscan.apple.com, but we don't know what/where it is in order to fix it in-place. I'm still looking, but it's mostly over my head now.
Do you have the same main problem?
1. First, I suspect you have to be on High Sierra to have this problem. I installed multiple Mojaves and they were all error-free.
2. Second, take a look at these related errors to the problem. Errors 1-3 are the easiest to test for, but maybe some of the other errors already look familiar.
1) Can't add Google or Yahoo email accounts to Internet Accounts pane. (this thread)
2) Software Update failing on High Sierra: (NSURLErrorDomain error -1012.)
3) iOS 17, iPhone 12 not showing up on 2009 iMac iTunes*
aka. iOS 17/new iPhones can't connect to iTunes. Support files won't download*.
*make sure you have iTunes 12.8.3 if you test this one.
4) Can't download High Sierra full installer.
5) other unspecified "server" or "connection" errors.
3. Third, do 1-3 occur together? If you have 1 or 2 of the errors, but a 3rd one works fine, you likely don't have the problem described above, and this solution would be overkill.
The Solution:
- The current best solution is to install a clean copy of High Sierra. The clean install test I previously posted was right on the money, and was reproducible during testing.
- Migrate your users and data into the clean copy, but to avoid ugly permissions problems, try following the outline found here: Is there a difference in results between Migration Assistant app and 'Transfer Information' option during OS installation?
- The High Sierra installer installs an older version of iTunes. You want to install the latest version of iTunes or you may have iOS device connection issues. On High Sierra this should be iTunes 12.8.3. Get it here: Download iTunes 12.8.3 for Mac
- After install and account migration, check SystemPreferences>InternetAccounts> and choose the "Google" or "Yahoo" account set up option. If you still get blank windows and error messages, don't panic, just restart your system once, and check again.