Обновление вашего Mac имеет решающее значение для бесперебойной работы ваших приложений и процессов. Устаревшие приложения и операционные системы могут привести к различным ошибкам и проблемам с производительностью. Это верно независимо от того, на какой версии операционной системы Mac вы работаете.
Итак, если у вас не включено автоматическое обновление, регулярно проверяйте наличие ожидающих обновлений. Для macOS вам нужно щелкнуть меню Apple, затем щелкнуть «Обновление программного обеспечения», чтобы проверить наличие доступных обновлений, которые необходимо установить. Если обновления доступны, нажмите кнопку «Обновить сейчас», чтобы установить их.
Чтобы обновить свои приложения, перейдите в Mac App Store, перейдите на вкладку «Обновления» и нажмите «Обновить все». Вы также можете нажать кнопку «Обновить» рядом с приложениями, чтобы обновлять их одно за другим. Вот как легко обновить программное обеспечение Mac.
Процесс обновления обычно занимает несколько минут, за исключением случаев, когда вы обновляете операционную систему. Это также зависит от того, сколько данных вам нужно загрузить для обновления ваших приложений. Но если вы устанавливаете незначительные обновления, нескольких минут должно хватить, чтобы все завершить.
К сожалению, при установке обновлений может произойти многое. Одна из проблем, с которой вы можете столкнуться и вызвать у вас головную боль, — это сбой обновления программного обеспечения (ошибка NSURLErrorDomain -1012) на Catalina. Эта ошибка указывает на то, что что-то пошло не так с процессом загрузки и установки обновления, поэтому он не может продолжаться.
Несколько пользователей Mac написали об этой ошибке на онлайн-форумах и на страницах поддержки Apple, но исправлений нет. доступно онлайн. Мы составили это руководство, чтобы помочь пользователям Mac, страдающим от этой проблемы.
Что такое ошибка NSURLErrorDomain -1012 на Mac?
Ошибка обновления программного обеспечения (ошибка NSURLErrorDomain -1012) на Catalina в последнее время затрагивает многих пользователей Mac. При проверке через Обновление программного обеспечения вы увидите полное сообщение об ошибке, в котором говорится:
Невозможно проверить наличие обновлений
Убедитесь, что вы подключены к Интернету.
При попытке выполнить обновление через Терминал вы получите следующее уведомление об ошибке:
Поиск доступного программного обеспечения.
Операция не может быть завершена. (Ошибка NSURLErrorDomain -1012.)
Когда пользователи проверяют файл журнала, выясняется, что конкретный файл обновления не может быть загружен, что приводит к сбою процесса. В большинстве случаев причиной ошибки является следующий файл:
NSErrorFailingURLKey = https: //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
NSLocalizedRecoverySuggestion = Убедитесь, что вы подключены к Интернету, и повторите попытку.
SUErrorRelatedCode = SUErrorCodeScanCatalogNotFound
Когда пользователь пытался загрузить тот же файл с того же URL-адреса, файл был успешно загружен без сбоев.
Та же ошибка NSURLErrorDomain -1012 не работает. всплывает только тогда, когда пользователь пытается установить обновления. Были случаи, когда этот код ошибки появлялся при синхронизации устройства iOS с облаком или при входе в приложение. Обстоятельства различны, что затрудняет выявление настоящего виновника.
Почему Mac получает ошибку NSURLErrorDomain -1012?
Эта ошибка может появиться по многим причинам. Тем не менее, нам необходимо рассмотреть все задействованные факторы, чтобы сузить все возможности.
Одной из причин, приведенных для этой ошибки, является проблема с сертификатом, особенно когда сервер swscan.apple.com не работает. вовлеченный. Так было со старыми компьютерами Mac, на которых возникала эта ошибка. В некоторых случаях также появляется следующее сообщение об ошибке.
Произошла ошибка
Сертификат для этого сервера недействителен. Возможно, вы подключаетесь к серверу, который выдает себя за «swscan.apple.com», что может поставить под угрозу вашу конфиденциальную информацию.
Swscan.apple.com — один из многих серверов, на которых Mac’s Software Update использует для связи с Apple. Проблема здесь в том, что срок действия сертификата безопасности для сервера истек. Хотя Apple, похоже, устранила эту проблему много лет назад, время от времени все еще возникает несколько проблем с сервером.
Другая причина возникновения этой ошибки — плохое интернет-соединение. Для успешной загрузки установочных файлов с серверов требуется стабильное подключение к Интернету. Если он каким-либо образом будет прерван, файлы будут либо неполными, либо поврежденными, что приведет к упомянутой выше ошибке.
Вам также следует проверить свой брандмауэр, чтобы убедиться, что он чрезмерно защищает. Брандмауэр вашего Mac предназначен для фильтрации входящего трафика, и он может фильтровать слишком строго, так что даже обновления программного обеспечения блокируются.
Другой причиной является несовместимость стороннего программного обеспечения. Если стороннее приложение не справляется с обновлением программного обеспечения, проблемы неизбежны.
Независимо от причины, вы не должны оставлять свой Mac с устаревшей операционной системой. Следовательно, исправление этой ошибки должно быть вашим приоритетом. Если вы не знаете, как действовать, обратитесь к приведенному ниже руководству.
Как исправить ошибку NSURLErrorDomain -1012
Если у вас возникают проблемы с обновлением программного обеспечения, вам следует сначала выполнить некоторые базовые проверки. Вот первые шаги, которые вам следует предпринять:
- Перезагрузите Mac, чтобы избавиться от ошибок, которые могут вызывать ошибку.
- Убедитесь, что у вас стабильное интернет-соединение. Если возможно, переключитесь на кабельное соединение. Если нет, попробуйте другую сеть.
- Оптимизируйте свой Mac с помощью приложения для ремонта Mac, чтобы убедиться, что нет других проблем, которые могут усложнить процесс устранения неполадок.
- Отключите периферийные устройства компьютера, которые вам не нужны. Также удалите внешние запоминающие устройства.
- Убедитесь, что на вашем жестком диске достаточно места для обновлений.
Если этих шагов недостаточно для исправления ошибки NSURLErrorDomain -1012, попробуйте следующие методы.
Исправление №1: сбросьте настройки обновления программного обеспечения.
Обновление программного обеспечения может иметь проблемы с загрузкой обновлений из-за старых кэшированных файлов или загрузок. Чтобы исправить это, вы можете сбросить списки обновлений программного обеспечения из папки «Настройки». Перед удалением этих файлов рекомендуется выйти из Mac App Store.
Для этого:
Попробуйте запустить обновление программного обеспечения еще раз, чтобы проверить, помогает ли это. Если нет, вы можете перетащить их обратно в папку «Настройки».
Исправление №2: сбросить кэш DNS.
Для новых компьютеров Mac с последней версией macOS вы можете сбросить кеш DNS, введя команду ниже в Приложения & gt; Утилиты & gt; Терминал:
- sudo killall -HUP mDNSResponder
Нажмите Enter , затем введите в вашем пароле администратора при появлении запроса.
Если вы используете более старую версию macOS, попробуйте следующие команды:
- sudo discoveryd udnsflushcaches
- sudo discoveryutil mdnsflushcache
Исправление №3: установите автономное обновление.
Если вы не можете использовать инструмент обновления программного обеспечения в macOS, вы можете загрузить автономные обновления с веб-сайта Apple. Каждое обновление поставляется с собственным установщиком в виде отдельной версии на случай, если у пользователей возникнут проблемы с инструментом обновления программного обеспечения. Чтобы загрузить автономное обновление для Mac, откройте страницу загрузки службы поддержки Apple и выберите вариант установки обновления. Загрузите и примените обновление, затем перезагрузите компьютер, если будет предложено.
Исправление №4: Обновление в безопасном режиме.
Попробуйте обновить Mac в безопасном режиме. Вот как:
Исправление № 5: установите Combo Update.
Вы можете использовать комбинированное обновление для установки обновлений Mac. Обратите внимание, что прежде чем продолжить, вы можете создать резервную копию своего Mac с помощью Time Machine или iCloud.
Комбинированные обновления позволяют обновлять Mac с предыдущей версии macOS в рамках того же основного выпуска. Это комбинированное обновление, что означает, что оно содержит все изменения с момента первоначального выпуска этой основной версии.
Комбинированные обновления огромны, поэтому вам нужно освободить для них место. Чтобы загрузить и установить комбо-обновления, следуйте инструкциям ниже:
Исправление №6: обновите Mac с помощью восстановления macOS.
Если вам по-прежнему не удается обновить Mac, вы можете попробовать использовать MacOS Recovery. Для этого вам необходимо перезагрузить Mac из MacOS Recovery. Используя метод ниже, вы можете обновить MacOS до последней версии, совместимой с вашим Mac. Вот как:
Резюме
Ошибка обновления программного обеспечения (ошибка NSURLErrorDomain -1012) на Catalina сейчас может показаться незначительной ошибкой, но в долгосрочной перспективе это может иметь серьезные последствия. Чем раньше вы исправите эту ошибку обновления программного обеспечения, тем скорее вы сможете обновить свой Mac.
YouTube видео: Как бороться с ошибкой обновления программного обеспечения (ошибка NSURLErrorDomain -1012) на Catalina
02, 2023
Last modified: Jul 9, 2014 8:07 AM
Rating: 5 out of 5
3
2 likes
44,338 views
Last modified Jul 9, 2014 8:07 AM
This tip is derived from the thread started by
AppStore Error «NSURLErrorDomain error -1100» – how to fix it
by roto. Corrected a couple typos and after the quote added some commentary:
After searching around for a longer time how to fix this problem in Software-Update, I finally found out how to manage this:
1. Delete PLISTs
/Users/<my username>/Library/Preferences/com.apple.appstore.plist
/Users/<my username>/Library/Preferences/com.apple.appstore.plist.lockfile
/Users/<my username>/Library/Preferences/com.apple.softwareupdate.plist
[/ indicates the path from the boot hard drive to folders inside. Use Go to Folder in the Go menu to navigate to that folder
replacing <my username> with the login user trying to access the store, the file in question is after the last slash. Quitting from the Mac App Store is recommended before you delete these files, by going to the Mac App Store menu and selecting Quit.]
2. In Applications -> Utilities -> Terminal type or copy/paste:
sudo killall -HUP mDNSResponder
[Hit enter/return key when done typing the above. Enter your administrative password when requested followed by return/enter key.]
Mac OS X 10.6.6 to 10.6.8 users should use instead:
sudo dscacheutil -flushcache
Source: OS X: How to reset the DNS cache
3. Restart
Then:
1. Open System Preferences — Network
2. Highlight active connection
3. Click Advanced.
4. TCP/IP
5. Renew DHCP Lease
Step 2, mDNSResponder issues should not happen unless:
1. The internet service provider is not supporting your IPv6 or IPv4 configuration.
2. The internet service provider has latency issues, such as satellite connections.
3. The internet service provider has a proxy/firewall configuration getting in the way. Often this setup is common with schools and corporate networks.
4. The DNS at the internet service provider is corrupted. To isolate this, change the DNS to an http://www.opendns.org/ one.
Also generally speaking sudo commands should not be issued, or moving any files after a sudo command without ensuring file sharing is first turned off. The good portion of this tip is the reboot which clears the login for sudo, which can leave your machine vulnerable until the reboot has been executed.
Software such as Little Snitch, and software firewalls may also interfere with the connection, as well as peer2peer software.
Updating your Mac is critical for the smooth running of your apps and processes. Outdated apps and operating systems can lead to various errors and performance issues. This is true regardless of what version of Mac’s operating system you are running on.
So, if you don’t have Automatic Updates turned on, make sure to check regularly for pending updates. For macOS, you need to click the Apple menu, then click Software Update to check for available updates that need to be installed. If updates are available, click the Update Now button to install them.
To update your apps, go to the Mac App Store, head to the Updates tab, then click Update All. You can also click the Update button next to apps to update them one by one. That’s how easy it is to update your Mac’s software.
The update process usually takes a few minutes, except for when you’re upgrading your operating system. It also depends on how much data you need to download to update your apps. But if you’re installing minor updates, a few minutes should be enough to complete everything.
Unfortunately, a lot could happen when you’re installing updates. One of the issues you could come across and give you headaches is the Software Update Failing (NSURLErrorDomain error -1012) on Catalina. This error indicates that something has gone wrong with the update download and installation process, therefore, it cannot proceed.
Several Mac users have written about this error in online forums and Apple support pages, but there are no fixes available online. We’ve come up with this guide to help Mac users suffering from this issue.
The Software Update Failing (NSURLErrorDomain error -1012) on Catalina has been affecting a lot of Mac users recently. When you check via Software Update, you’ll see the complete error message that says:
Unable to check for updates
Make sure you are connected to the internet.
When you try to update via Terminal, you will get the following error notification:
Finding available software.
The operation couldn’t be completed. (NSURLErrorDomain error -1012.)
When users check the log file, it turns out that a particular update file cannot be downloaded, causing the process to fail. In most cases, the file responsible for the error is this:
NSErrorFailingURLKey=https://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
NSLocalizedRecoverySuggestion=Make sure you’re connected to the internet, and then try again.
SUErrorRelatedCode=SUErrorCodeScanCatalogNotFound
When the user tried to download the same file from the same URL, the file was successfully downloaded without a hitch.
The same NSURLErrorDomain error -1012 error code does not only pop up when the user is trying to install updates. There have been instances of this error code appearing when syncing an iOS device with the cloud or when signing into an app. The circumstances are varied, making it difficult to pinpoint the real culprit.
Why Mac Is Getting NSURLErrorDomain Error -1012?
There are many reasons why this error could appear. However, we need to look at all the factors involved to be able to narrow down all the possibilities.
One of the reasons cited for this bug is certificate problem, especially when the swscan.apple.com server is involved. This has been the case with older Macs getting this error. In some instances, the following error message also appears.
An Error has occurred
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “swscan.apple.com” which could put your confidential information at risk.
Swscan.apple.com is one of the many servers that Mac’s Software Update uses to communicate with Apple. The problem here is that the security certificate for the server appears to have expired. Although Apple seems to have fixed the issue years ago, there are still several server issues that happen from time to time.
Another reason why this error is happening is due to a poor internet connection. You need a stable internet connection to successfully download the installation files from the servers. If it gets interrupted in any way, the files will either be incomplete or corrupted, leading to the error mentioned above.
You should also check your firewall to see if it is being overprotective. Your Mac’s firewall is designed to filter incoming traffic, and it may be filtering too strictly such that even software updates are blocked.
Third-party software incompatibility is another culprit. If a third-party app does not get along well with Software Update, issues are bound to happen.
No matter what the reason is, you should not leave your Mac with an outdated operating system. Hence, fixing this error should be your priority. You can refer to the guide below if you’re not sure how to proceed.
How to Fix NSURLErrorDomain Error -1012
Whenever you’re having trouble with Software Update, you should do some basic checks first. Here are the initial steps you should take:
- Restart your Mac to get rid of bugs that might be causing the error.
- Check if you have a stable internet connection. Switch to a cabled connection if available. If not, try another network.
- Optimize your Mac using Mac repair app to ensure there are no other issues that might complicate the troubleshooting process.
- Disconnect computer peripherals that you don’t need. Remove external storage devices as well.
- Make sure you have enough storage on your hard drive for the updates.
If these steps are not enough to fix the NSURLErrorDomain Error -1012, try the methods below.
Fix #1: Reset Software Update Preferences.
Software Update might be having trouble downloading the updates because of old cached files or downloads. To fix this, you can reset the Software Update plists from the Preferences folder. Quitting the Mac App Store is recommended before you delete these files.
To do this:
- In Finder, use the Go menu and select Go To Folder.
- Enter this path, then press Enter: ~/Library/Preferences.
- Look for the following files and drag them to the Desktop:
- com.apple.appstore.plist
- com.apple.appstore.plist.lockfile
- com.apple.softwareupdate.plist
Try to run Software Update again to see if doing this helps. If not, you can drag them back to the Preferences folder.
Fix #2: Reset the DNS Cache.
For newer Macs running the latest macOS version, you can reset the DNS cache by typing in the command below into Applications > Utilities > Terminal:
- sudo killall -HUP mDNSResponder
Hit Enter then type in your admin password when prompted.
If you’re running an older version of macOS, try these commands:
- sudo discoveryd udnsflushcaches
- sudo discoveryutil mdnsflushcache
Fix #3: Install the Standalone Update.
If you cannot use the Software Update tool from macOS, you can download standalone updates from the Apple website. Each update is provided with its own installer as a standalone version in case users experience problems with the Software Update tool. To download a stand-alone update for your Mac, open the Apple Support Downloads page and select the update to install option. Download and apply the update, then restart the computer, if prompted.
Fix #4: Update in Safe Mode.
Try updating your Mac in safe mode. Here is how:
- Startup your Mac in safe mode. To do that, turn off your Mac, and then turn on your Mac and immediately press and hold the Shift key until you see the login screen. Then release the Shift key.
- Now, your computer is in safe mode. Try to run the update now.
- To exit safe mode, restart your Mac normally without pressing the Shift key.
Fix #5: Install the Combo Update.
You can use a combo update to install Mac updates. Please note that before you continue, you may want to back up your Mac with Time Machine or iCloud.
Combo updates let you update your Mac from a prior version of macOS within the same major release. It is a combined update which means it contains all of the changes since the original release of that major version.
Combo updates are huge, so you need to make room for them. To download and install combo updates, follow the instructions below:
- Visit Apple’s combo updates site: https://support.apple.com/downloads/macos
- Find the right combo update and download it. The combo will download as a .dmg file.
- Now, quit all apps on your Mac.
- Double-click the downloaded file, if it does not start automatically.
- Follow the onscreen instructions.
Fix #6: Use macOS Recovery to Update Your Mac.
If you still could not update your Mac, you may try to use macOS Recovery. To do this, you need to restart your Mac from macOS Recovery. Using the method below, you can upgrade to the latest macOS that is compatible with your Mac. Here is how:
- Turn off your Mac.
- Turn on your Mac and immediately press and hold the Option + Command + R keys together until you see the Apple logo or the spinning globe icon.
- Log into your Mac.
- Click Reinstall macOS and follow the onscreen instructions.
Summary
Software Update Failing (NSURLErrorDomain error -1012) on Catalina might seem like a minor error now but it can have serious implications in the long run. The sooner you fix this Software Update bug, the sooner you’ll be able to update your Mac.
Vic is a certified gadget freak who feels the need to surround himself with cutting-edge technology. And this passion has helped him a lot in creating content that informs and guides users on using and troubleshooting the latest technology. He is an avid researcher who is always hungry for the latest news and updates on the most cutting-edge technology.
Vic is the one in charge of keeping our website running smoothly and efficiently, to make sure that our readers have a wonderful experience while visiting the website. He’s good at troubleshooting errors and fixing Windows issues that come up either when playing games or working on the computer.
It has been considered as the error name that makes use of the error detail, including the reason why such error tool place, what is the application or component of the system malfunction that leads to this NSURLErrorDomain Error 1012 along with some additional information. It is a numerical code error that encompasses the data that is being deciphered through the manufacturer component or the application that seems to be malfunctioning.
This shows an error code message like,
Error 1012
The operation couldn’t be completed. (NSURLErrorDomain Error 1012)
The NSURLErrorDomain Error 1012 that makes use of such code may take place in various locations within the system, so however it carries some details in its name, it seems to be still complex for the user to pinpoint and fix the Netflix Error 1012 reason without having the specific technical knowledge or appropriate software. The article will highlight the detailed information regarding the NSURLErrorDomain Error 1012 that includes the causes, effect on the computer system along with the methods that can be adopted by the user to fix the Netflix Error 1012 in quick turnaround time.
Causes of NSURLErrorDomain Error 1012 –
- If you are having such sort of NSURLErrorDomain Error 1012 in PC, it indicates the instance that you might be having the malfunction in the system operation. Or maybe the error is with your internet connection.
- There might be some of the common reason that makes use of the incorrect or the failed installation of the software which has left some invalid entries in the registering of the Window.
- Due to the consequences of the malware or virus attack, the improper system seems to shut down because of the power failure or some other factor, the person with the less technical knowledge will accidentally tend to delete the required system file or the registry entry along with the number of the different cause.
- The most common reason regarding the NSURLErrorDomain Error 1012 error considered to be the failure to accurately run one of the normal operations through the application or system components. It has been seen that due to such error, the system starts responding slowly to the input and make the operating time of the system very much low.
- All of these problems lead to the NSURLErrorDomain Error 1012. For which, you need to understand the methods through which you will be able to fix the error in the quick turnaround time, you need to check the below section that depicts the ways through which you will be able to fix the Netflix Error 1012.
Prerequisites before Fixing NSURLErrorDomain Error 1012:
- If you are facing such error, and the system starts responding slowly to the input that has been given by keyboard or mouse, there is need to understand the method through which you will be able to fix the NSURLErrorDomain Error 1012.
- With such error, identically the most application or system errors, the user generally is provided the choice to send the error report to the publisher of the software and considered as the effective way to assist the publisher in eliminating the issues in enhanced versions of the software.
- However, if you have been looking for the immediate fix, the advanced user of PC might be able to repair the issue through the manual editing of the registry along with other instance where the user wants to hire a technician that assist them in solving the problem.
- However, for the reason that from the time that any manipulation associated with Window registry. Seems to carry the risk to render the OS unbootable. To the instance when the user has been in the doubt of their technical knowledge or technique. There is a need to make use of the particular software that has been designed to repair the Window registry. That too without needing any technical skill from the individual that has been facing such issues.
So, below is simple and easy to understand the method to repair and fix the NSURLErrorDomain Error 1012.
(Guide) How to Fix & Solve NSURLErrorDomain Error 1012 Code Issue
1. Try using Wi-Fi Network –
As mentioned earlier most of the time the NSURLErrorDomain Error 1012 is caused due to slow or unresponsive. And if you’re using an ordinary network connection or your regular data plan. But, when you’re using Wi-Fi. Your internet is uninterrupted, and you will not face any speed lags or things like that. This will eventually eradicate the main cause of NSURLErrorDomain Error 1012.
2. Close your Netflix App & Restart –
Another thing you can do for fixing Netflix Error 1012. Follow these steps, and you can do it pretty easily
- Push your home button
- Now you will be directed to the recent tabs.
- All you have to do now is find the Netflix and Swipe it up.
- That’s it
3. Try Resetting or Changing your Wi-Fi or Internet Connection –
There are times when your internet is still working, but you’re still facing the same NSURLErrorDomain Error 1012. Which is due to clutter between you device the Wi-Fi connection you’re using. At that time you can easily reset your Wi-Fi. Just turn it off for 10 seconds and turn it back on after that.
If this doesn’t fix your NSURLErrorDomain Error 1012 issues, you can try to change the device you’re using or the internet connection you’re using. And you will eventually get a decent and working connection.
You can also check:
Error 0x000006ba | Err Access Denied |
0xc000009a | Error 520 |
Error Code 7 Spotify | 0x0000004e |
Err Timed Out | Error 113 |
Bugcode Ndis Driver | iTunes Error 26 |
413 That’s an Error | Error 107 |
Err Empty Response | 0x000000c2 |
Err Connection Failed | Google Play Error Code 2 |
Conclusion:
These are some of the steps that have to be followed in order to fix the NSURLErrorDomain Error 1012. And make the system respond quick or speedy. The detailed information regarding the issue will help you to understand the methods. Through which you will be able to rectify the NSURLErrorDomain Error 1012 issues. Hoping! The information delivered to you gives the best value for your time. In case, if you are having any sort of issue or suggestions, please let us know. You can drop a comment in the box given below.
When we talk of tech giants, Apple is the first name that comes to our mind. Apple is the boss, no doubt. But we must also accept the fact that errors are inevitable. Apple devices also suffer from few errors. Errors are annoying and so we are here to fix a few. In this article, we are going to talk of one such annoying error,
that is, NSURLErrorDomain Error 1012. This error might have freaked out your mind, but you need not worry as we are here to calm you down. In the upcoming section, we will be providing you few methods to fix NSURLErrorDomain Error 1012. So go through each of the methods steps by step and carefully.
Method 1: Reset The DNS Cache
In this method, we will be deleting some PLISTs followed by a command that will reset the DNS cache to fix NSURLErrorDomain Error 1012. Go through each of the steps carefully:
- First of all, delete the following PLISTs as mentioned in the below list:
- Users/<my username>/Library/Preferences/com.apple.appstore.plist.
- Users/<my username>/Library/Preferences/com.apple.appstore.plist/lockfile
- Users/<my username>/Library/Preferences/com.apple.softwareupdate.plist
NOTE: <my username> is the user through which you are trying to access the store.
- Go to Applications -> Utilities -> Terminal.
- In this terminal, type the following command:
sudo killall -HUP mDNSResponder
- This will reset the DNS Cache.
- Now restart your device.
- After a successful startup, go to System Preferences –> Network.
- Now highlight the active connection and click Advanced.
- Go to TCP/IP –> Renew DHCP License.
This is one of the most successful methods to fix NSURLErrorDomain Error 1012. But if this didn’t work for you, try the methods mentioned below to fix NSURLErrorDomain Error 1012.
Method 2: Soft Reset Your Apple Device
Soft resetting an apple device can also fix this error. One good thing about the soft reset is that you won’t be losing any data. However, if you are afraid, you can take a back of your data. Follow this link to know the steps to Soft Reset your Apple device:
This should fix NSURLErrorDomain Error 1012. However, if this didn’t fix your problem, follow the last method as mentioned below.
Method 3: Disable Antivirus Or Firewall
Many times, Antivirus and/or firewall can also cause NSURLErrorDomain Error 1012. So you can disable them for few minutes to check it fixes NSURLErrorDomain Error 1012. This method is being reported to fix NSURLErrorDomain Error 1012 by some users. Hope it works for you too. Follow the steps mentioned below to go through this method:
- Disable Antivirus Software (If installed).
- Go to System Preferences –> Security & Privacy –> Firewall –> Firewall Options.
- If the firewall has been enabled, disable it.
- Make sure the gatekeeper is enabled.
After following these steps, check if the error still persists. I hope you have successfully fixed NSURLErrorDomain Error 1012.
So these were the three methods to fix NSURLErrorDomain Error 1012 in Apple devices. Hope you liked this article on fix NSURLErrorDomain Error 1012 in iPhone and iPad. In case you find yourself in trouble while going through the methods mentioned above, feel free to ask via comments. Thanks and stay in touch
Robert Borowski is passionate about blogging and wants to share knowledge with others. His passion, dedication, and quick decision-making quality make him stand from others.
нам было трудно защитить сетевые подключения нашего приложения с помощью SSL с помощью AFNetworking 2.5.0.
мы используем самозаверяющий центр сертификации и реализовали пользовательскую политику безопасности с использованием закрепленных сертификатов.
мы протестировали довольно много конфигураций, предоставляемых AFNetworking, но пока не повезло. Сообщение об ошибке, которое мы получаем:
2015-01-05 19: 03: 07.191 AppName[9301: 319051] ошибка обновления пользователя
путешествие. Ошибка: Ошибка Domain=NSURLErrorDomain Код=-1012 «На
операция не может быть завершена. (Ошибка NSURLErrorDomain -1012.)»
UserInfo=0x7ae056b0
{NSErrorFailingURLKey=https://api.XXX.com/XXX/XXX/,
NSErrorFailingURLStringKey=https://api.XXX.com/XXX/XXX/}
наш сертификат отлично работает на других клиентах, таких как cURL и Android. При использовании HTTP наша реализация работает отлично.
кто-нибудь знает о каких-либо проблемах связанные с закрепленными сертификатами и AFNetworking? Если да, мы будем признательны за любые советы, которые у вас могут быть.
вот часть реализации:
+ (AFSecurityPolicy*)customSecurityPolicy {
AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
NSString *cerPath = [[NSBundle mainBundle] pathForResource:@"filename" ofType:@"der"];
NSData *certData = [NSData dataWithContentsOfFile:cerPath];
[securityPolicy setAllowInvalidCertificates:NO];
[securityPolicy setValidatesCertificateChain:NO];
[securityPolicy setPinnedCertificates:@[certData]];
return securityPolicy;
}
+ (AFHTTPRequestOperationManager*)customHttpRequestOperationManager {
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.securityPolicy = [self customSecurityPolicy]; // SSL
return manager;
}
+(void)getRequestWithUrl:(NSString*)url success:(void(^)(AFHTTPRequestOperation *operation, id responseObject))success failure:(void(^) (AFHTTPRequestOperation *operation, NSError *error))failure {
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
AFHTTPRequestOperationManager *manager = [HttpClient customHttpRequestOperationManager];
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
[manager GET:url parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
success(operation, responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
failure(operation, error);
}];
}
спасибо!
8 ответов
после прочтения кода AFNetworking и проверки журналов изменений, вот что я должен был сделать, чтобы заставить это работать.
создайте объект AFSecurityPolicy с помощью AFSSLPinningModeCertificate:
AFSecurityPolicy* policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate];
по умолчанию AFNetworking проверяет доменное имя сертификата. Наши сертификаты генерируются на серверной основе, и не все из них будут иметь доменное имя, поэтому нам нужно отключить это:
[policy setValidatesDomainName:NO];
так как сертификаты являются самоподписанными, они технически «недействительны», поэтому нам нужно разрешить и это:
[policy setAllowInvalidCertificates:YES];
наконец, AFNetworking попытается проверить сертификат на всем пути вверх по цепочке сертификатов, которая мне кажется, что она будет идти только вверх по цепочке к нашему CA, но по какой-то причине это не так, поэтому мы должны отключить это тоже:
[policy setValidatesCertificateChain:NO];
и это все! Установите политику безопасности в диспетчере запросов, как вы уже делаете, и она должна работать штраф.
Итак, резюмируем, все, что вам действительно нужно изменить в коде, который вы опубликовали, это:
A) Как Дэвид Caunt упомянуто, измените режим закрепления с AFSSLPinningModeNone
до AFSSLPinningModeCertificate
и
B) добавьте строку, чтобы отключить проверку доменного имени:[policy setValidatesDomainName:NO]
еще одно примечание, AFNetworking теперь автоматически проверяет ваш пакет .файлы cer, поэтому, если вы должны были переименовать свой сертификат, чтобы иметь .расширение cer, вы можете устранить код для получения данных сертификата из пакета и установки закрепленных сертификатов.
поскольку вы инициализировали manager, вы можете сделать:
manager.securityPolicy.allowInvalidCertificates = YES;
manager.securityPolicy.validatesDomainName = NO;
и он будет работать для самозаверяющего сертификата
Я получал эту ошибку,Error Domain=NSURLErrorDomain Code=-1012 NSErrorFailingURLStringKey
только нижеприведенное изменение заставило его работать на меня.
self.validatesDomainName = NO;
вы создаете AFSecurityPolicy
С SSLPinningMode
режим AFSSLPinningModeNone
.
для AFNetworking доверять серверу, с режимом закрепления установлен в AFSSLPinningModeNone
, вы должны установить allowInvalidCertificates
to YES
, но это напротив чего вы пытаетесь достичь.
вместо этого вы должны создать свою политику безопасности с помощью режима закрепления AFSSLPinningModeCertificate
или AFSSLPinningModePublicKey
:
AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate];
3
автор: David Snabel-Caunt
- (AFSecurityPolicy *)securityPolicy {
NSString *cerPath = [[NSBundle mainBundle] pathForResource:@"*.something.co.in" ofType:@"cer"];
NSData *certData = [NSData dataWithContentsOfFile:cerPath];
AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate];
[securityPolicy setAllowInvalidCertificates:YES];
[securityPolicy setPinnedCertificates:@[certData]];
[securityPolicy setValidatesDomainName:NO];
[securityPolicy setValidatesCertificateChain:NO];
return securityPolicy;
}
это то, что ошибка генерации политики безопасности выглядит как —
- (AFSecurityPolicy *)securityPolicy {
NSString *cerPath = [[NSBundle mainBundle] pathForResource:@"*.something.co.in" ofType:@"cer"];
NSData *certData = [NSData dataWithContentsOfFile:cerPath];
AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate];
[securityPolicy setAllowInvalidCertificates:NO];
[securityPolicy setPinnedCertificates:@[certData]];
[securityPolicy setValidatesDomainName:YES];
return securityPolicy;
}
теперь придерживаясь правила «не исправить, если он не нарушен»
имея дело с аналогичной проблемой, это обычно для вещей, кажущихся нормальными через HTTPS-соединения браузера, так как многие браузеры кэшируют файлы сертификатов от третьих лиц, так что они не всегда должны быть загружены. Поэтому вполне может быть, что ваша цепочка сертификатов не полностью доверена, как вы, возможно, поверили.
другими словами, может показаться, что безопасно подключаться к браузеру, но в зависимости от настроек AFNetworking ваше приложение фактически не будет принимать цепочка сертификатов. После того, как вы убедитесь, что ваши настройки подходят, следующий шаг-убедиться, что цепочка сертификатов действительно так хороша, как вы думаете. Загрузите приложение под названием SSL Detective и запросите свой сервер. Вы также можете использовать www.ssldecoder.org. Убедитесь, что в вашей цепочке нет красных (ненадежных) элементов. Если есть, измените настройку сертификата на сервере.
учитывая, что настройки AFNetworking следующие:
[securityPolicy setAllowInvalidCertificates:NO];
[securityPolicy setValidatesCertificateChain:NO];
Это может не похоже на цепочку сертификатов, потому что она подписана самостоятельно. Возможно, Вам также придется переключить их на «да».
для меня, у меня use_frameworks!
установить в my Podfile
— проект не делает пользователя Swift, и я использовал Pods
на AFNetworking
. Комментируя это, исправил проблему для меня.
Я пробовал все это, но ничего не помогло, тогда я искал эту строку
‘ NSLog (@»для проверки доменного имени для самозаверяющих сертификатов необходимо использовать закрепление.»);’
и ниже этой строки я изменил
‘ return NO;’
к
‘вернуться да;’
и это магия.
спасибо.