Connection error when loading the app (using Parse.com) - ios

I'm using Parse.com SDK.
my internet connection is OK and reset the emulator not help.
And for some reason, from yesterday i see this message every time the app load:
2014-11-25 10:00:32.275 myApp[6551:952636] Error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo=0x78f3b6f0 {NSErrorFailingURLStringKey=https://api.parse.com/2/client_events, _kCFStreamErrorCodeKey=57, NSErrorFailingURLKey=https://api.parse.com/2/client_events, NSLocalizedDescription=The network connection was lost., _kCFStreamErrorDomainKey=1, NSUnderlyingError=0x78f3ad40 "The network connection was lost."} (Code: 100, Version: 1.4.0)
2014-11-25 10:00:32.275 myApp[6551:952637] Attempt at runEventually command timed out. Waiting 600.000000 seconds. 5 retries remaining.

I suggest you to first subscribe parse status mail list from here.
Check your api number.
Reset simulator and close open xcode.
If you reset simulator, problem could be from api keys or parse.

Related

iOS IPV6 testing: Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected"

We are testing apps for IPV6 compatibility in both IPV6 (nat64 network) only and IPV4 only networks. We had been using the GCDAsyncSocket network library to make socket connections for our app to send and receive data over it.
1. When we test our iOS app (using the old GCDAsyncSocket code that we had downloaded in 2014) connecting to IPV6 only (nat-64) network as per Apple's guides here, the socket connection gets established successfully as soon as we log into the app, but within a few seconds (probably 20-30seconds , sometimes in a couple of mins), the -(void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)err gets called disconnecting the socket.
This happens only once every time we log out and log in to our app. As soon as we login, socket gets established, then suddenly gets disconnected throwing the below error:
2016-12-17 09:11:10.650437 atCommand Enterprise[288:13780] LOG: Socket disconnect
2016-12-17 09:11:11.979232 atCommand Enterprise[288:13780] LOG: -
[MLAPIControl socketDidDisconnect:withError:] -> 175
Printing description of err:
Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected"
UserInfo={_kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}
Printing description of ((__NSCFDictionary *)0x0000000170470880):
{
"_kCFStreamErrorCodeKey" = 57;
"_kCFStreamErrorDomainKey" = 1;
}
Printing description of sock:
<GCDAsyncSocket: 0x101737d70>
2016-12-17 09:11:55.853540 atCommand Enterprise[288:13780] LOG: Error
Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo=
{_kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}
2016-12-17 09:11:55.858775 atCommand Enterprise[288:13780] LOG: -
[MLAPIControl socketDidDisconnect:withError:] :
2. The exactly same issue of socket disconnection, after initial successful connection, happens even when i downloaded the latest (Latest commit 8ce941d 25 days ago) GCDAsyncSocket library code.
Any help is greatly appreciated.
Thank You.

iOS: KinesisEventRecorder without connection

Hi I am working with AWS Mobile SDK for iOS.
I am tracking some data with KinesisEventRecorder.
When the device has not connection I get this error:
AWSiOSSDK v2.4.2 [Error] AWSURLSessionManager.m line:211 | -[AWSURLSessionManager URLSession:task:didCompleteWithError:] | Session task failed with error: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline.
I know that this framework continue to keep data also without connection, but when the connection come back it seems send nothing.
Is there some properties to setting?

Error Domain=NSURLErrorDomain Code=-1004 instead of -1009 in Swift service calls

Generally, while performing GET or POST calls in iOS using dataTaskWithRequest or sendAsynchronousRequest we use to face network related errors with error codes like,
NSURLErrorNotConnectedToInternet = -1009
NSURLErrorCannotConnectToHost = -1004
NSURLErrorTimedOut = -1001
In my case i'm disconnecting the internet and performing service calls. So, the expected error code is "NSURLErrorNotConnectedToInternet = -1009". But, its throwing "NSURLErrorCannotConnectToHost = -1004" like below,
Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the
server." UserInfo=0x1700f0e00 {NSUnderlyingError=0x170255e70 "The
operation couldn’t be completed. (kCFErrorDomainCFNetwork error
-1004.)", NSErrorFailingURLStringKey=https://example.com/reg,
NSErrorFailingURLKey=https://example.com/reg, _kCFStreamErrorDomainKey=1,
_kCFStreamErrorCodeKey=51, NSLocalizedDescription=Could not connect to the server.}
So, how to get the exact error status while using dataTaskWithRequest or sendAsynchronousRequest.
As a rule, IIRC, the OS sends "not connected to Internet" only in two situations:
The network is determined to be nonfunctional after:
One or more URL requests fail and
The OS tries to probe a well-known captive-portal-detection URL and
That request also fails
No interface has an IP address
Including any connected VPNs
Excluding loopback interface
Up until the system reaches that state, the failures you see will be "cannot connect to host", because that's all the OS knows for certain.
As a rule, your app should interpret these in the same way — by using reachability to determine when to try again, then trying again when reachability changes.

Can't initialize Google Maps in Swift

i'm trying to use google maps in my app, i followed there main steps here: https://developers.google.com/maps/documentation/ios/start#getting_the_google_maps_sdk_for_ios
the sceene was loaded, but the map is empty, and i got this error :
ClientParametersRequest failed, 0 attempts remaining (0 vs 6). Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo=0x7fd8ab5e9680 {NSUnderlyingError=0x7fd8b0201c40 "The network connection was lost.", NSErrorFailingURLStringKey=https://clients4.google.com/glm/mmap, NSErrorFailingURLKey=https://clients4.google.com/glm/mmap, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=57, NSLocalizedDescription=The network connection was lost.
anyone knows what's the problem ?
Try reseting the iOS simulator:
iOS Simulator -> Reset Content and Settings

Network debugging specific to network carriage

I have an iPhone application in which I have a request which works fine on wifi and with all network carriages but one carriage. On this carriage, if I use ASIHttpRequest, it gives me the below error:
ASIHTTPRequest request_didFail: Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0xd54e2f0 {NSUnderlyingError=0xd502de0 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.)", NSLocalizedDescription=A connection failure occurred}
If I use AFNetworking it returns below error:
NSLocalizedDescription = "Could not connect to the server.";
NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1004 \"Could not connect to the server.\" UserInfo=0xdc98630 {NSErrorFailingURLKey=https://sitename.com, NSErrorFailingURLStringKey=https://sitename.com, NSLocalizedDescription=Could not connect to the server.}";
First of all, what could be the reason of this error assuming it only happens for a specific carrier? Second, as the request works with everything but this carriage, it seems hard to debug, so how can I debug it to find the exact problem?
Thanks
It turned out that the problem was with this specific telco. Without changing the code, it started to work again after some time.
For the answer to this question, I can say that the reason could be about some proxy thing that is made by the telco and we tried to debug it by applying different proxy tests.

Resources