Cloudant replication errors: TDChangeTracker (Code=589) and NSURLErrorDomain(Code=-1005) - ios

I have been using Cloudant through Bluemix and everything worked fine at the beginning. But now the replications don't complete successful anymore, constantly throwing errors or finishing with no data being received.
replicatorDidError: Error Domain=NSURLErrorDomain Code=-1005 "(null)"
replicatorDidError: Error Domain=TDChangeTracker Code=589 "(null)"
Bad DB response: {"error":"service_unavailable","reason":"Service unavailable"}
Sometimes it was temporarily fixed assigning new credentials, but now it doesn't do the trick anymore. It happens either from the iOS SDK or from a node.js app.
Any help will be very welcome.
Thanks in advance.

Related

iOS Not playing some Videos - CoreMediaErrorDomain Code=-12939

I am using CTVideoView to playback videos inside a UITableView in iOS. As of late this was working fine, but for some reason, it seems as though the something has gone astray.
About 10% of the videos will play in the table, but many will simply just fail to play. The error occurs when iOS is trying to download the video as can be seen by the error messages below. For some reason, the error message is different in iOS 10 & 11 but the code is the same.
Based on iOS 10's message one would believe that the network is not available, but if I point my safari/chrome browser on the same iOS device it plays the video just fine.
As for the iOS 11 message, I have no idea where to even start as it the first time I've seen this message.
Any help at all would be much appreciated in resolving this.
iOS 10 Error Message
FAILED TO PREPARE VIDEO WITH ERROR: Error Domain=NSURLErrorDomain
Code=-1 "unknown error" UserInfo={NSLocalizedDescription=unknown
error,
NSErrorFailingURLStringKey=URLOBSCUREDFORPRIVACY,
NSErrorFailingURLKey=URLOBSCUREDFORPRIVACY,
NSURL=URLOBSCUREDFORPRIVACY,
NSUnderlyingError=0x17044bd00 {Error Domain=CoreMediaErrorDomain
Code=-12939 "CFNetwork error unavailable"
UserInfo={NSDescription=CFNetwork error unavailable,
NSURL=URLOBSCUREDFORPRIVACY}}}
iOS 11 Error Message
FAILED TO PREPARE VIDEO WITH ERROR: Error Domain=NSURLErrorDomain
Code=-1 "unknown error" UserInfo={NSUnderlyingError=0x1c08483d0 {Error
Domain=CoreMediaErrorDomain Code=-12939 "content range mismatch -
should be start 0 length 1247166 is start 0 length 1048575"
UserInfo={NSDescription=content range mismatch - should be start 0
length 1247166 is start 0 length 1048575,
NSURL=URLOBSCUREDFORPRIVACY}},
NSErrorFailingURLStringKey=URLOBSCUREDFORPRIVACY,
NSErrorFailingURLKey=URLOBSCUREDFORPRIVACY,
NSURL=URLOBSCUREDFORPRIVACY,
NSLocalizedDescription=unknown error}
Update (Possible Clue)
So after some testing I've narrowed it down to videos longer than or equal to 10 seconds. In all other circumstances the video will play.
I have resolved the issue. The issue was with ParseServer and the fact that it could not stream videos to iOS as it does not come out of the box with byte-range headers configured.
The solution was to implement the GridStoreAdapter into the server and from there migrate file storage to S3 or GCS (depending on your preference). This will need to be done alongside the respective adapter for your service.
Once that was done, the app started behaving correctly again.

what could be cause for CXErrorCodeRequestTransactionErrorUnentitled error in call kit?

i Am getting error while using call kit api CXStartCallAction(call: UUID(), handle: handle), call is not getting started, instead am getting Error Domain=com.apple.CallKit.error.requesttransaction Code=1 "(null)"
Ran into this problem just now.
It appears what resolved it for me was you need to add the following in you info.plist
Required Background modes
App provides Voice over IP services

iOS - Runtime errors with GCM

I'm not sure if this is an issue of the library or something wrong on our side but I already spent a lot of time searching about this and found nothing that could shed any light.
We're using GCM since a while on both iOS and Android. The application is in production and is working fine. Our iOS app collects and reports low-impact errors (basically errors we catch and handle) and analyzing these data I found those errors I'm struggling to understand.
While registering a device on GCM with an APNS token
Error Domain=com.google.iid Code=1006 "(null)" that according to the documentation is kGGLInstanceIDOperationErrorCodeInvalidKeyPair
While subscribing to a topic
Error Domain=com.google.gcm Code=501 "(null)" that according to the documentation is kGGLInstanceIDOperationErrorCodeMissingDeviceID
Both errors happens on iOS8/iOS9/iOS10.
Our app includes the GCM library via Cocoapods:
pod 'Google/CloudMessaging', '2.0.4'
Can someone help me understanding what's happening?
Thanks!
The first error kGGLInstanceIDOperationErrorCodeInvalidKeyPair means that you have error in KeyPair access. While the error kGGLInstanceIDOperationErrorCodeMissingDeviceID means that your device seems to be missing a valid deviceID. It cannot authenticate device requests. From this related thread, error code 501 was solved by resetting all data and settings on the device (factory reset) and this fixed the problem. It's also stated here that the error occurred maybe because you are calling GCMService.sharedInstance().connectWithHandler() { error in if(error != nil) { print(error) } } before you had received a registration token, or had failed to refresh your token.
But I found this SO question which have similar issue with you which suggests to transition to Firebase Cloud Messaging as recommended by Google and his issue was solved.

"Error Domain=com.google.iid Code=501" while registering ios devicetoken in gcm

GLInstanceID | Unable to find token in cache Error Domain=com.google.iid Code=-25300 "The operation couldn’t be completed. (com.google.iid error -25300.).
Please get me out of this.
The error log message GLInstanceID | Unable to find token in cache Error Domain=com.google.iid Code=-25300 is traced often, both when receiving google token succeeds or fails. I assume this is not an actual error.
I started receiving the error Error Domain=com.google.iid Code=501 on one device. No matter how many times I retried the call to tokenWithAuthorizedEntity:scope:options:handler: it always returned 501. I tried deleting the app, I tried restarting the device with no luck. I noticed that the same code ran fine on other devices. As a final resort I reset all data and settings on the device (factory reset) and this fixed the problem for me.

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