WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.26k stars 627 forks source link

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

Open Quadrizzz opened 3 months ago

Quadrizzz commented 3 months ago

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](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):

Smartphone (please complete the following information):

glitch-txs commented 2 months ago

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

Quadrizzz commented 2 months ago

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.

jessejay247 commented 2 months ago

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

Quadrizzz commented 2 months ago

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 commented 2 months ago

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: @.***>

jessejay247 commented 2 months ago

update your packages, Wagmi core, connector

hanwong commented 2 months ago

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.

Quadrizzz commented 2 months ago

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: @.***>

Cuardiper commented 2 months ago

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

Fearless09 commented 2 months ago

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??

ConfidenceYobo commented 1 month ago

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.

yucheng-Li commented 3 weeks ago

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.