Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code: 4010, reason: Disconnecting for load balancing reasons #161

Open
AmjadKhan2k18 opened this issue Jul 28, 2023 · 2 comments
Open

code: 4010, reason: Disconnecting for load balancing reasons #161

AmjadKhan2k18 opened this issue Jul 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@AmjadKhan2k18
Copy link

AmjadKhan2k18 commented Jul 28, 2023

I was trying to connect but there was no response I investigate and when this logs appear connect method worked and I got uri but

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (25169): │ #0   RelayClient._handleRelayClose (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:293:17)
relay_client.dart:293
I/flutter (25169): │ #1   RelayClient._createJsonRPCProvider.<anonymous closure> (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:271:11)
relay_client.dart:271
I/flutter (25169): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (25169): │ 💡 Handling relay close, code: 4010, reason: Disconnecting for load balancing reasons

then when _client.connect method is executed this error appear immediately

I/flutter (25169): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (25169): │ #0   RelayClient._sendJsonRpcRequest (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:399:19)
relay_client.dart:399
I/flutter (25169): │ #1   RelayClient._onSubscribe (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:414:25)
relay_client.dart:414
I/flutter (25169): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (25169): │ StateError, reconnecting: Bad state: Cannot add event after closing
I/flutter (25169): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (25169): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (25169): │ #0   RelayClient._onSubscribe (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:421:19)
relay_client.dart:421
I/flutter (25169): │ #1   <asynchronous suspension>
I/flutter (25169): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (25169): │ ⚠️ RelayClient, onSubscribe error. Topic: e13e23197e59238bb4da2542e389fcbf141649921c3ab8a8b3c852c57a8d892d, Error: Bad state: Cannot add event after closing
I/flutter (25169): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Once Metamask/Trustwallet is launched this error appear and no connect pop up appear in Wallet

wc:6a684cad24ee6e93dfeab0b6add43521285fefd647e95577d204da5ba992f18c@2?relay-protocol=irn&symKey=95cfaf3386b45663a728bf07cb10507e830454c6ac38a92a97306fc979071d9d&methods=%5Bwc_sessionPropose%2Cwc_sessionRequest%5D%2C%5Bwc_authRequest%5D
I/flutter (25169): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (25169): │ #0   RelayClient._sendJsonRpcRequest (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:399:19)
relay_client.dart:399
I/flutter (25169): │ #1   RelayClient.publish (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:123:21)
relay_client.dart:123
I/flutter (25169): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (25169): │ StateError, reconnecting: Bad state: Cannot add event after closing
I/flutter (25169): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

EDIT : to reproduce this you can try to connect and disconnect multiple times and restart your Dapp sometimes when you disconnect a wallet it will happen

I did more testing and I reproduce it after connecting and disconnecting wallet for 10 - 15 times, did hot restart sometimes and re debug app 2 - 3 times
it's hard to reproduce but QA reported sometimes it happen on first run of app

I checked when it's happening _client.connect doesn't give response and we doesn't have URI or any error

@Luzzotica Luzzotica added the bug Something isn't working label Jul 31, 2023
@Luzzotica
Copy link
Contributor

Thank you for the bug report, I'll be looking into it.

@r-oman-G
Copy link

r-oman-G commented Aug 15, 2023

Same issue

I/flutter ( 5934): │ #0 RelayClient._handleRelayClose (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:291:17)
I/flutter ( 5934): │ #1 RelayClient._createJsonRPCProvider. (package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart:266:11)
I/flutter ( 5934): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter ( 5934): │ 💡 Handling relay close, code: 4010, reason: Disconnecting for load balancing reasons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants