WalletConnect connection failure iOS client - wallet-connect

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"

Related

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.

Alamofire 4.0.1 SSL Requests Failing (secure connection to the server cannot be made)

I'm new to Alamofire, but this should be really simple, and I'm not sure why I'm running into an issue.
I'm using XCode8, Swift3, and Alamofire 4.0.1, and building for iOS9.
The URL I'm accessing is secured with a brand new cert acquired from GoDaddy. Both Chrome and Safari can load the secure site on my MacBookPo, and all looks well.
However the following code:
Alamofire.request(buildRequestString().addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed)! ).validate().responseJSON { response in
switch response.result {
case .success(let data):
print(JSON(data))
case .failure(let error):
print(error)
}
}
results in the following error: (not I have replace my address/domain for security reasons)
[] nw_coretls_read_one_record tls_handshake_process: [-9801]
[] nw_endpoint_flow_protocol_error [1.1 12.345.67.890:443 in_progress socket-flow (satisfied)] TLS protocol sent error: [-9801]
[] nw_endpoint_flow_protocol_disconnected [1.1 12.345.67.890:443 in_progress socket-flow (satisfied)] Output protocol disconnected
[] nw_endpoint_resolver_receive_report [1 sub.domain.ext:443 in_progress resolver (satisfied)] received child report:[1.1 12.345.67.890:443 failed socket-flow (satisfied)]
[] nw_connection_endpoint_report [1.1 12.345.67.890:443 failed socket-flow (satisfied)] reported event flow:failed_connect, error Error Domain=kNWErrorDomainTLS Code=-9801 "Security Error: -9801" UserInfo={NSDescription=Security Error: -9801}
[] nw_connection_endpoint_report [1 sub.domain.ext:443 failed resolver (satisfied)] reported event flow:failed_connect
[] __tcp_connection_start_block_invoke 1 sending event TCP_CONNECTION_EVENT_DISCONNECTED in response to state failed and error Error Domain=kNWErrorDomainTLS Code=-9801 "Security Error: -9801" UserInfo={NSDescription=Security Error: -9801}
[] tcp_connection_event_notify 1 event: TCP_CONNECTION_EVENT_DISCONNECTED, reason: nw_connection event, should deliver: true
[] tcp_connection_cancel 1
[] nw_endpoint_handler_cancel [1 sub.domain.ext:443 failed resolver (satisfied)]
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)
[] nw_endpoint_handler_cancel [1.1 12.345.67.890:443 failed socket-flow (satisfied)]
[] nw_resolver_cancel_on_queue 0x600000101b00
[] -[NWConcrete_tcp_connection dealloc] 1
Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9801, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x608000046e70 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9801, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9801}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://sub.domain.ext/api/v1/Assignment?query=%22%22&device=%22%22, NSErrorFailingURLStringKey=https://sub.domain.ext/api/v1/Assignment?query=%22%22&device=%22%22, _kCFStreamErrorDomainKey=3}
Can anyone give me some insight as to why this error is occurring? It appears as if the site is not being trusted, even though there is a valid cert in place. Are there any other settings within XCode I need to adjust to allow this connection? The Alamofire documentation seemed to indicate the code above was all that was necessary.
To summarize the comments, #OP's site did not meet Apple's iOS ATS requirements. When tested with SSL Labs, the site scored an F and indicated lack of support for TLS. While bypassing ATS could have been an option, the server's TLS configuration was improved using the IIS Crypto tool as described at https://scotthelme.co.uk/getting-an-a-on-the-qualys-ssl-test-windows-edition/
Note: DO NOT set up Strict Transport Security without knowing what it does.
This addressed the issue.

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

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?

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;

WebSocket connection to 'wss://' failed: Unexpected response code: 500

I'm getting 500 error when running SignalR on secure websocket when running on IIS Express.
Site is running on localhost:44300 with default cert.
It works just fine with longPolling.
When changing to webSockets, I'm getting following error:
WebSocket connection to
'wss://localhost:44300/signalr/connect?transport=webSockets&connectionToken='
failed: Unexpected response code: 500
If the error is due to self-signed cert, how do I disable it with SignalR and websockets?
Or could it be caused by something else?
I tried solving this issue with initializing EventMachine, by inserting the following code in an initializer config/initializers/eventmachine.rb:
Thread.new { EventMachine.run } unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive?
and it worked for me!
Maybe check this out:
http://websocketstest.com/
BTW: Internal Error (500)