walletconnect-monorepo icon indicating copy to clipboard operation
walletconnect-monorepo copied to clipboard

Error: WebSocket connection failed for host: wss://relay.walletconnect.org

Open Quadrizzz opened this issue 1 year ago • 12 comments

I am using web3 modal on my react app which uses wallet connect, it was working previously but now when I try to connect to the app I get an error this error in my browser console "Error: WebSocket connection failed for host: wss://relay.walletconnect.org", I did some research and someone mentioned that it might be because of a missing project id but my project id is in the code so I can't seem to find what is wrong with it. I will appreciate any help I can get.

SDK Version (if relevant) Js v2

To Reproduce Steps to reproduce the behavior:

  1. Go to https://react-wallet.walletconnect.com/
  2. you can also check here by clicking connect wallet https://web3modal.com/
  3. Just on page load you will get an alert of the same error

Expected behavior It should load the walletconnect modal but that is not happening

Desktop (please complete the following information):

  • OS: Windows
  • Browser edge

Smartphone (please complete the following information):

  • Device: iPhone 11
  • OS: iOS 16.3.1
  • Browser: Safari, Chrome

Quadrizzz avatar Mar 12 '24 09:03 Quadrizzz

Hi, are you still experiencing this? where are you located?

glitch-txs avatar Apr 08 '24 00:04 glitch-txs

On Mon, 8 Apr 2024 at 01:02, Glitch @.***> wrote:

Hi, are you still experiencing this? where are you located?

— Reply to this email directly, view it on GitHub https://github.com/WalletConnect/walletconnect-monorepo/issues/4318#issuecomment-2041653996, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYKDIF2CLVAL3KHIHMPQ53Y4HNBHAVCNFSM6AAAAABERZ5MF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGY2TGOJZGY . You are receiving this because you authored the thread.Message ID: @.***>

Hello, thank you very much for reaching out. Yes I am still experiencing this issue and I am located in Lagos, Nigeria.

Quadrizzz avatar Apr 08 '24 07:04 Quadrizzz

try using a vpn to change your location and try again.

jessejay247 avatar Apr 13 '24 13:04 jessejay247

It’s an app for different users, I am not sure it will be sustainable to tell users to use a vpn if they want to use the all.

On Sat, 13 Apr 2024 at 14:01, jessejay247 @.***> wrote:

try using a vpn to change your location and try again.

— Reply to this email directly, view it on GitHub https://github.com/WalletConnect/walletconnect-monorepo/issues/4318#issuecomment-2053640251, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYKDIDTXTBTFFAOPQNAY3DY5EUA3AVCNFSM6AAAAABERZ5MF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJTGY2DAMRVGE . You are receiving this because you authored the thread.Message ID: @.***>

Quadrizzz avatar Apr 13 '24 13:04 Quadrizzz

It does work fine when using a VPN

On Sat, 13 Apr 2024 at 14:02, Malik Quadri @.***> wrote:

It’s an app for different users, I am not sure it will be sustainable to tell users to use a vpn if they want to use the all.

On Sat, 13 Apr 2024 at 14:01, jessejay247 @.***> wrote:

try using a vpn to change your location and try again.

— Reply to this email directly, view it on GitHub https://github.com/WalletConnect/walletconnect-monorepo/issues/4318#issuecomment-2053640251, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYKDIDTXTBTFFAOPQNAY3DY5EUA3AVCNFSM6AAAAABERZ5MF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJTGY2DAMRVGE . You are receiving this because you authored the thread.Message ID: @.***>

Quadrizzz avatar Apr 13 '24 13:04 Quadrizzz

update your packages, Wagmi core, connector

jessejay247 avatar Apr 15 '24 06:04 jessejay247

Does location matter much? I got a lot of same situation when i try to request signing on iOS mobile browsers, but i was no matter when i have tried on android mobile.

hanwong avatar Apr 16 '24 07:04 hanwong

I think location is an issue here because when a VPN is used it works fine and this issue is not just on my app, when I tried using the web3modal website also, I got the same issue, the qrcode for walletconnect was not opening.

On Tue, 16 Apr 2024 at 08:29, hanwong @.***> wrote:

Does location matter much? I got a lot of same situation when i try to request signing on iOS mobile browsers, but i was no matter when i have tried on android mobile.

— Reply to this email directly, view it on GitHub https://github.com/WalletConnect/walletconnect-monorepo/issues/4318#issuecomment-2058418948, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYKDIAIYOXVD6VCLILWXGTY5THNPAVCNFSM6AAAAABERZ5MF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGQYTQOJUHA . You are receiving this because you authored the thread.Message ID: @.***>

Quadrizzz avatar Apr 16 '24 07:04 Quadrizzz

Some of my users are receiving this error too....Big part of the user base connecting from Nigeria. We need a solution for that :(

Cuardiper avatar Apr 23 '24 20:04 Cuardiper

I am experiencing the same error too but when I use a VPN, it works fine. Please is there a way to resolve this error without VPN??

Fearless09 avatar Apr 27 '24 01:04 Fearless09

I am also having this issue. Everything was working fine before but suddenly stopped working. Now when I open my local development project on the browser I get this error message immediately the page loads ERROR WebSocket connection failed for host: wss://relay.walletconnect.org at f.emitError (http://localhost:3000/static/js/bundle.js:37767:31) at i.onerror (http://localhost:3000/static/js/bundle.js:37735:16).

Then if you try to connect with trustwallet or walletconnect you get a popup message that says "declined". I think the trust wallet shouldn't use walletconnect API but rather injector or trustwallet extension if it exists.

ConfidenceYobo avatar May 12 '24 22:05 ConfidenceYobo

Change version "@walletconnect/react-native-compat" version 2.9.0 -> 2.11.0, to do this it will not breaking your whole app. By the way connection failed for host: wss://relay.walletconnect.org in China, work fine by use VPN. So you can try to change @walletconnect/react-native-compat version to make the app work fine.

yucheng-Li avatar Jun 04 '24 02:06 yucheng-Li

This should be fixed now, please reopen the issue if the issue persists on the latest version.

glitch-txs avatar Jul 06 '24 01:07 glitch-txs

@glitch-txs can you point me to the specific package / version that includes this fix? walletconnect libs tend to be transitive deps, so trying to figure out what exactly needs to get updated

javamonn avatar Aug 15 '24 13:08 javamonn

I am using "@walletconnect/react-native-compat": "2.13.3" and I still get these errors:

WebSocket connection failed for host: wss://relay.walletconnect.org

nop33 avatar Aug 21 '24 11:08 nop33

I can’t even access the walletconnect website anymore in my country, it doesn’t load at all, I can’t use walletconnect on any Dapp

On Wed, 21 Aug 2024 at 12:11, Ilias Trichopoulos @.***> wrote:

I am using @.***/react-native-compat": "2.13.3" and I still get these errors:

WebSocket connection failed for host: wss://relay.walletconnect.org

— Reply to this email directly, view it on GitHub https://github.com/WalletConnect/walletconnect-monorepo/issues/4318#issuecomment-2301792029, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYKDIG2LLYGO2ZPNJVLOJDZSRYUXAVCNFSM6AAAAABERZ5MF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRG44TEMBSHE . You are receiving this because you authored the thread.Message ID: @.***>

Quadrizzz avatar Aug 21 '24 11:08 Quadrizzz

I noticed the issue happens randomly. It was working fine yesterday in Nigeria and for some reason stopped meanwhile people in the US can use it.

ConfidenceYobo avatar Aug 21 '24 17:08 ConfidenceYobo

It is not fixed at all. Excellent support

naixx avatar Aug 23 '24 11:08 naixx

What fixed it for me:

Enable DNS over HTTPS on all browsers

You can check here for details: https://www.ghacks.net/2021/10/23/how-to-enable-dns-over-https-secure-dns-in-chrome-brave-edge-firefox-and-other-browsers/

You can also set up a private secure DND on the OS level, check the doc here (select your platform/OS): https://one.one.one.one/dns/

And finally, test out your connection by visiting on your browser https://one.one.one.one/help/

josenriagu avatar Aug 23 '24 12:08 josenriagu