WalletConnectSwift icon indicating copy to clipboard operation
WalletConnectSwift copied to clipboard

Connection failure iosApp

Open abdenourbestam opened this issue 2 years ago • 13 comments

Hello, 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 :)

abdenourbestam avatar Oct 15 '22 13:10 abdenourbestam

I'm also getting this error.

grimtrigg avatar Oct 17 '22 17:10 grimtrigg

Also getting this error

ljs19923 avatar Oct 18 '22 07:10 ljs19923

Same... https://safe-walletconnect.gnosis.io/ returns a 404 error:

{"statusCode":404,"error":"Not Found","message":"Not Found"}

maurovz avatar Oct 18 '22 11:10 maurovz

Looks like a problem with the bridge. Try replacing https://safe-walletconnect.gnosis.io/ with https://bridge.walletconnect.org/

That worked for me at least...

maurovz avatar Oct 18 '22 11:10 maurovz

Thanks for the reply

Using https://bridge.walletconnect.org/ instead of https://safe-walletconnect.gnosis.io/ does not resolve the problem the error still occurring.

I can connect by using wss instead of https ( wss://bridge.walletconnect.org/ )

But why ? is that normal ?

abdenourbestam avatar Oct 18 '22 12:10 abdenourbestam

The bridge is used to exchange WebSocket messages, the http request should be re-routed to change of protocol.

That being said, we're migrating our services to a new domain, so the https://safe-walletconnect.gnosis.io/ redirects to https://safe-walletconnect.safe.global/ .

Sorry for the inconvenience.

DmitryBespalov avatar Oct 18 '22 12:10 DmitryBespalov

Guys I have checked in our app again, and can confirm that the bridge is working fine. I should repeat that HTTP is not the protocol that the bridge works with, it's web sockets.

DmitryBespalov avatar Oct 18 '22 12:10 DmitryBespalov

Please try with the https://safe-walletconnect.safe.global/ bridge

DmitryBespalov avatar Oct 18 '22 12:10 DmitryBespalov

Same thing

https://safe-walletconnect.safe.global/ ----> -1005 error wss://safe-walletconnect.safe.global/ ------> works

abdenourbestam avatar Oct 18 '22 13:10 abdenourbestam

Please try with the https://safe-walletconnect.safe.global/ bridge

Constructing the WCURL using the new bridge URL you provided works for me on using 1.7.0 (tested 1.6.2 as well, works there too). I only use the Client part of the library and not the Server though.

robin-on-git avatar Oct 19 '22 12:10 robin-on-git

When I open the metamask app with

https://safe-walletconnect.safe.global/ or

https://safe-walletconnect.gnosis.io/

The popup confirmation to login on Metamask iOS App doesn't appear...

Do you have the same issue?

ljs19923 avatar Oct 19 '22 22:10 ljs19923

I think we've got such an issue reported recently, we'll take a look at it

DmitryBespalov avatar Oct 20 '22 07:10 DmitryBespalov

@ljs19923 for me, when I use the safe-walletconnect.safe.global as a bridge, metamask opens, as well as rainbow. With the old (gnosis.io) bridge it doesn't open.

DmitryBespalov avatar Oct 20 '22 09:10 DmitryBespalov