Error Domain=NSURLErrorDomain Code=-1003 : A server with the specified hostname could not be found error - ios

I have an app where I am calling one web service which works fine for the first time but for second time didFailWithError gets called with error
"A server with the specified hostname could not be found."
And also a weird error like
dnssd_clientstub deliver_request: socketpair failed 24 (Too many open files). nw_resolver_create_dns_service_on_queue DNSServiceGetAddrInfo failed: Unknown(-65537)
I don't think it is a network issue. How can I fix it?

Related

"rpc error: code = Unavailable desc = closing transport due to: connection error"

I am using k8 to host my grpc service.
Sometimes, I am getting the following error (few milliseconds into my request):
rpc error: code = Unavailable desc = closing transport due to: connection error: desc = "error reading from server: read tcp <ipaddr>:52220-><internal ip addr>:8070: read: connection reset by peer", received prior goaway: code: NO_ERROR
May I ask how will this occur? Could it be that the k8's network is down?
This happened because on server shutdown, it sends an initial GOAWAY to support graceful shutdown. This means your server shut down.

Making network request from iOS App Extension returns error: "A server with the specified hostname could not be found"

I'm trying to download a language translation model from Google MLKit. I can download the model successfully on the main iOS app, but when I try to download it on the keyboard extension app, I receive an error: "A server with the specified hostname could not be found."
testKeyboard[43687:3987699] [] 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.
testKeyboard[43542:3979636] [discovery] [d 6BF0C0BD-3B78-43CD-A23F-26023D59A4F3] <PKHost:0x283acc400> Failed discovery: Error Domain=PlugInKit Code=4 "Connection invalid" UserInfo={NSLocalizedDescription=Connection invalid}.
testKeyboard[43542:3979636] [xpc] XPC error sending request to pkd: Connection invalid
testKeyboard[43542:3979662] [] nw_resolver_can_use_dns_xpc_block_invoke Sandbox does not allow access to com.apple.dnssd.service
testKeyboard[43542:3979662] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:9 Err:-1 Errno:1 Operation not permitted
testKeyboard[43542:3979662] [connection] nw_resolver_create_dns_service_locked [C1] DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
testKeyboard[43542:3979662] Task <38FA4936-22C4-4E80-BECC-1D592945BE52>.<1> HTTP load failed, 0/0 bytes (error code: -1003 [10:-72000])
testKeyboard[43542:3979662] Task <38FA4936-22C4-4E80-BECC-1D592945BE52>.<1> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x2821c14a0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <38FA4936-22C4-4E80-BECC-1D592945BE52>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDownloadTask <38FA4936-22C4-4E80-BECC-1D592945BE52>.<1>"
), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://redirector.gvt1.com/edgedl/translate/offline/v5/high/r24/en_es.zip, NSErrorFailingURLKey=https://redirector.gvt1.com/edgedl/translate/offline/v5/high/r24/en_es.zip, _kCFStreamErrorDomainKey=10}
error downloading Optional(Error Domain=com.google.mlkit Code=2 "Failed to download the model from the server." UserInfo={NSLocalizedDescription=Failed to download the model from the server.})
I'm using the same code to download the model according to Google's "Translate Text with MLKit on iOS" documentation in the KeyboardViewController's viewDidLoad() function:
let options = TranslatorOptions(sourceLanguage: .english, targetLanguage: .spanish)
self.translator = Translator.translator(options: options)
let conditions = ModelDownloadConditions(allowsCellularAccess: true, allowsBackgroundDownloading: true )
self.translator!.downloadModelIfNeeded(with: conditions) { error in
guard error == nil else {
print("error downloading", error)
return
}
print("Model downloaded successfully")
}
My Info.plist settings are such:
"RequestsOpenAccess" as 1
"App Transport Security Settings" > "Allow Arbitrary Loads" as YES
I don't understand what is going on here. Why am I able to download the ML Kit language model on the main app, but not on the keyboard extension? Any help appreciated.
The issue is with your project's Sandbox settings. Go to your project page / Signing & Capabilities / App Sandbox (Xcode 13.2) and then enable Outgoing Connections (Client) which will allow your app to make http calls.

deisctl list command raises a timeout error what am I doing wrong

help in "deisctl list" I have just started with deis and am following the tutorial of using deis in vagrant
am stuck at the part am doing deisctl list am getting this as the output
INFO client.go:291: Failed getting response from http://127.0.0.1:4001/: ssh: rejected: connect failed (Connection refused)
Error: timeout reached
Your DEISCTL_TUNNEL value is either incorrect or unreachable due to networking/routing/firewall, etc...

Parse.com NSURLErrorDomain Code=-1003 in cellular not in wifi

I have an app that work with the parse.com backend.
Since today have a NSURLErrorDomain Code=-1003 with parse.com only using cellular network. Wifi is working pretty good. What could be the issue ?
Here the full error :
[Error]: Error Domain=NSURLErrorDomain Code=-1003
"A server with the specified hostname could not be found."
UserInfo=0x1700f2200{NSUnderlyingError=0x170245880 "A server with the specified hostname could not be found.",
NSErrorFailingURLStringKey=https://api.parse.com/2/find,
NSErrorFailingURLKey=https://api.parse.com/2/find,
_kCFStreamErrorDomainKey=12,
_kCFStreamErrorCodeKey=8,
NSLocalizedDescription=A server with the specified hostname could
not be found.}
(Code: 100, Version: 1.6.1)
It seems that restarting my phone solve the problem.

A server with the specified hostname could not be found crashlytics

I am running iOS project job on Jenkins. It is a multiple-target scheme. I have unchecked parallelize build. Is worked just fine until last week. I keep getting those messages:
2014-05-31 14:42:44.788 run[62805:507] Crashlytics.framework/run 1.3.8
2014-05-31 14:42:56.193 run[62805:507]
Crashlytics: Could not be onboarded statusCode 0 Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo=0x10061ae00 {NSUnderlyingError=0x10061cca0 "A server with the specified hostname could not be found.", NSErrorFailingURLStringKey=https://api.crashlytics.com/spi/v1/platforms/ios/apps/com.contagme.Tbusiness/built, NSErrorFailingURLKey=https://api.crashlytics.com/spi/v1/platforms/ios/apps/com.contagme.Tbusiness/built, NSLocalizedDescription=A server with the specified hostname could not be found.}
2014-05-31 14:43:02.951 run[62805:507]
Crashlytics: business.app.dSYM could not be uploaded statusCode 0 Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo=0x10023ffb0 {NSUnderlyingError=0x100221170 "A server with the specified hostname could not be found.", NSErrorFailingURLStringKey=https://api.crashlytics.com/api/v1/8b3cc2afd185191b47ce70547f29a014d00fff47/dsyms, NSErrorFailingURLKey=https://api.crashlytics.com/api/v1/8b3cc2afd185191b47ce70547f29a014d00fff47/dsyms, NSLocalizedDescription=A server with the specified hostname could not be found.}
My intepretation:
Crashlytics server cannot be reached. What can I do? Is there any way how to deploy crashlytics and not having to rely on connectivity at the moment? Is the unreachability of crashlytics server really the source of this issue?

Resources