Hi,
we have been using web3auth for a while and we have some strange issues.
For example, we use Alchemy as our RPC provider and we see these errors on Alchemy from time to time
eth_requestAccounts
{“jsonrpc”:“2.0”,“id”:7239266411887734,“error”:{“code”:-32600,“message”:“Unsupported method: eth_requestAccounts. See available methods at https://docs.alchemy.com/alchemy/documentation/apis”}}
eth_subscribe
{“jsonrpc”:“2.0”,“id”:1162590935369748,“error”:{“code”:-32000,“message”:“notifications not supported”}}
It seems like web3auth and torus libraries have a lot of calls to the JSON-RPC API and we cannot understand why. The calls are coming from the web3auth library itself.
These are the packages we use:
“@walletconnect/client”: “^1.8.0”,
“@walletconnect/sign-client”: “^2.8.4”,
“@walletconnect/utils”: “^2.8.5”,
“@web3auth/base”: “^5.2.0”,
“@web3auth/modal”: “^5.2.0”,
“@web3auth/torus-wallet-connector-plugin”: “^6.1.7”,
“@web3auth/wallet-connect-v2-adapter”: “^6.1.1”,
Also ,some users see a blank screen when trying to connect with Google:
Hi, Thanks for the answers.
I was able to pinpoint the issue.
Alchemy/Quicknode and other providers does not support eth_subscribe through JSON-RPC. It’s supported only through Websocket connection.
So the question is how can I set web3auth to work with Websocket and not RPC?
This is the only way to fix the too much calls issue.
any updates on this? I’m not sure how to enable a web socket connection if the npc target is mandatory. in couldn’t find a reference to wsTarget in your code
@omryo@yaro.hakimi It is very unlikely that Alchemy and other providers do not support the methods through JSON-RPC, please inquire about it. The reason that I am urging you to use JSON-RPC is that a webSocket connection is highly insecure.