PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." - objective-c

Hi I am getting this error
PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={NSErrorFailingURLStringKey=https://gsp10-ssl.apple.com/use, _kCFStreamErrorCodeKey=8, NSErrorFailingURLKey=https://gsp10-ssl.apple.com/use, NSLocalizedDescription=The Internet connection appears to be offline., _kCFStreamErrorDomainKey=12, NSUnderlyingError=0x19735570 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=8, NSErrorFailingURLStringKey=https://gsp10-ssl.apple.com/use, NSErrorFailingURLKey=https://gsp10-ssl.apple.com/use, NSLocalizedDescription=The Internet connection appears to be offline., _kCFStreamErrorDomainKey=12}}}
I know this error came because internet connection is loss in middle.But I am not getting how to handle this error?

Related

WalletConnect connection failure iOS client

I get the following error when i try to connect iOS app to walletconnect
Task <D190A2B9-E403-4DE1-B9F5-527F29D9D50D>.<1> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."
UserInfo={NSErrorFailingURLStringKey=https://safe-walletconnect.safe.global/, NSErrorFailingURLKey=https://safe-walletconnect.safe.global/,
_NSURLErrorRelatedURLSessionTaskErrorKey=("LocalWebSocketTask <D190A2B9-E403-4DE1-B9F5-527F29D9D50D>.<1>"),
_NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <D190A2B9-E403-4DE1-B9F5-527F29D9D50D>.<1>,
NSLocalizedDescription=The network connection was lost.}
Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."
UserInfo={NSErrorFailingURLStringKey=https://safe-walletconnect.safe.global/,
NSLocalizedDescription=The network connection was lost.,
NSErrorFailingURLKey=https://safe-walletconnect.safe.global/}
WC: Connection error: The network connection was lost.
WC: didDisconnect url: https://safe-walletconnect.gnosis.io/
The used bridge :
let bridge = "https://safe-walletconnect.gnosis.io/
Can any body help me with this ? any suggestions ?
The same code was working something has changed
Thanks in advance :)
Replace "https://safe-walletconnect.gnosis.io/" URL With
"https://bridge.walletconnect.org"

NSURLErrorDomain code 1200 and 1004 in a cordova hybrid app

I have an old hybrid mobile app that uses the below:
Cordova iOS 5.1.1
advanced-http plugin version 1.5.5
Xcode 11.6
Other plugins inculded are:
"cordova-plugin-device",
"cordova-plugin-device-orientation,
"cordova-plugin-file",
"cordova-plugin-file-transfer",
"cordova-plugin-inappbrowser",
"cordova-plugin-geolocation",
"cordova-plugin-network-information",
"cordova-plugin-globalization",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"com-badrit-contactpicker",
"com.xxx.keychainencryption",
"cordova-plugin-jailbreak-detection",
"cordova-plugin-advanced-http",
"cordova-plugin-privacyscreen",
"cordova.plugins.diagnostic"
I have a cache-manifest file that is fetched from the server (GET method) and lists around 250+ files that include html, js, css, images and fonts files.
The app then loops through these 250+ files and downloads (advance-http downloadFile method) these files from the server.
The app has SSL pinning enabled.
ISSUE: While making the downloadFile request some request fails and throws errors like:
[-1004] Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={_kCFStreamErrorCodeKey=61, NSUnderlyingError=0x60000283d2f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <8D9836BB-337A-4DE2-BF2C-E91B263C84CB>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <8D9836BB-337A-4DE2-BF2C-E91B263C84CB>.<1>"
), NSLocalizedDescription=Could not connect to the server., NSErrorFailingURLStringKey=https://xxxx.xxx.com/MobileApp/themes/images/icon_home_x2.png, NSErrorFailingURLKey=https://xxxx.xxx.com/MobileApp/themes/images/icon_home_x2.png, _kCFStreamErrorDomainKey=1}
When I connect to another server using VPN same app but a different SSL cert, I get
2020-12-21 11:02:07.670919+0530 ZZZ[67979:2230102] Task <75B8FFDB-C4D7-428D-8BAD-6B641385F7FF>.<1> finished with error [-1200] Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://zzz.zzzzzz.com/MobileBanking/html/services/moneyxxxx.html, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <75B8FFDB-C4D7-428D-8BAD-6B641385F7FF>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <75B8FFDB-C4D7-428D-8BAD-6B641385F7FF>.<1>"
), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://zzz.zzzzzz.com/MobileBanking/html/services/moneyxxxx.html, NSUnderlyingError=0x600000b32b20 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9824, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9824}}, _kCFStreamErrorCodeKey=-9824}
I could not find any docs that explain these errors or any solutions regarding them.

Blazor App - Error: Failed to complete negotiation with the server: Error: Forbidden

I have a Blazor App that runs perfectly well on localhost, however, when I deploy it to the server I get the following error:
Error: Failed to complete negotiation with the server: Error: Forbidden
Error: Failed to start the connection: Error: Forbidden
Error: Error: Forbidden
Error: Cannot send data if the connection is not in the 'Connected' State.
error comes from blazor.server.js.
I looked everywhere and there is no such error reported as far as I know.
Turns out, firewall was blocking it. Simply changing it's security to a lower level did the trick

How to handle Uncaught Error: java.net.SocketTimeoutException

I am trying to open my app and it doesn't apear.
I only get this error message.
Uncaught Error: java.net.SocketTimeoutException: failed to connect to /192.168.56.1 (port 19000) from /192.168.1.232 (port 55968) after 10000ms
This problem is since i changed my cellphone, but i got the app also on my new one.

how to get the message in NSLocalizedDescription in iOS?

I have this error in requesting data from api.. All I want is to get only the message "The request timed out." in NSLocalizedDescription. How to get that? heres the return error below.
Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."
UserInfo=0xa5bd490 {NSErrorFailingURLStringKey=api url,
NSErrorFailingURLKey=api url, NSLocalizedDescription=The request timed
out., NSUnderlyingError=0xa5763b0 "The request timed out."}
I solved already this problem issue...
NSString *getError = error.localizedDescription;