Error Domain=NSURLErrorDomain Code=-1003 解决方案

本文解决Mac模拟器中出现的ErrorDomain=NSURLErrorDomainCode=-1003问题,该问题由DNS配置不当引起。通过关闭模拟器,修改DNS设置,再重启模拟器并删除自定义DNS,最后验证页面加载情况,可以有效解决问题。

1.Mac 模拟器报 Error Domain=NSURLErrorDomain Code=-1003 

2.问题是dns导致的

处理方案:

1)关闭模拟器

2)更换dns:设置->网络->高级->DNS

3)打开模拟器

4)删除添加的dns 

5)现在刷新页面,应该就没问题了

 

 

Can't find or decode reasons Failed to get or decode unavailable reasons networkd_settings_read_from_file Sandbox is preventing this process from reading networkd settings file at "/Library/Preferences/com.apple.networkd.plist", please add an exception. networkd_settings_read_from_file Sandbox is preventing this process from reading networkd settings file at "/Library/Preferences/com.apple.networkd.plist", please add an exception. nw_resolver_can_use_dns_xpc_block_invoke Sandbox does not allow access to com.apple.dnssd.service nw_resolver_create_dns_service_locked [C1.1] DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563) Connection 1: received failure notification Connection 1: failed to connect 10:-72000, reason -1 Connection 1: encountered error(10:-72000) Task <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1> HTTP load failed, 0/0 bytes (error code: -1003 [10:-72000]) Task <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x600003987090 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 0ms using unknown from query, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: lo0}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDownloadTask <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=http://localhost:8080/appcast.xml, NSErrorFailingURLKey=http://localhost:8080/appcast.xml, _kCFStreamErrorDomainKey=10} Encountered download feed error: Error Domain=SUSparkleErrorDomain Code=2001 "An error occurred while downloading the update. Please try again later." UserInfo={NSErrorFailingURLKey=http://localhost:8080/appcast.xml, NSLocalizedDescription=An error occurred while downloading the update. Please try again later., NSUnderlyingError=0x6000039ae880 {Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x600003987090 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 0ms using unknown from query, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: lo0}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDownloadTask <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=http://localhost:8080/appcast.xml, NSErrorFailingURLKey=http://localhost:8080/appcast.xml, _kCFStreamErrorDomainKey=10}}}
11-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值