WalletConnect / WalletConnectUnity

[DEPRECATED] WalletConnect v2 and Modal for Unity 🎮
MIT License
137 stars 48 forks source link

Tls handshake failed after calling WalletConnect.Connect() #62

Closed lex-creon closed 1 year ago

lex-creon commented 1 year ago

Hello, trying to use moralis unity sdk to perform authentication through metamask. Testing on device and getting this error after calling AuthenticationKit.Connect: "System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Security.Interface.TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: 4294957312".

After some deep diving i saw they are using WalletConnect and error happens trying to reach uri "wss://n.bridge.walletconnect.org/" in NativeWebsocketTransport._socketOpen that calls WebSocket.Connect that call s System.Net.WebSockets.ClientWeSocket.ConnectAsync. I tried to set RemoteCertificateValidationCallback on ClientWebSocketOptions and ServerCertificateValidationCallback globally but to no avail - they are not being called and not exposed by api. But even if they were it would be temporary solution.

How can i resolve this? Is there a way to temporarily disable certificate exception handling?

gigajuwels commented 1 year ago

closed due to v1 depreciation