I use mobile Metamask to take picture of the QR code
Metamask asks if I want to connect to the site
Signing fails in browser (error): Login failed: JsonRpcError: Missing or invalid. request() chainId: eip155:8453
I only have Base blockchain selected - is this the reason that it is failing? If I understand correctly it should propose to add the chain if it is missing? Or is the logic that auth should only specify Ethereum Mainnet (0x1)?
index.92c53fec.js:1 Login failed: JsonRpcError: Missing or invalid. request() chainId: eip155:8453
at getJsonRpcError (errors.js:38:10)
at Object.internal (errors.js:87:20)
at r.sendAsync (jrpcEngine.js:395:23)
at async r.request (jrpcEngine.js:416:11)
at async WalletConnectV2Adapter._getSignedMessage (walletConnectV2adapter.js:354:11)
at async WalletConnectV2Adapter.authenticateUser (walletConnectV2adapter.js:200:13)
at async Proxy.sendWeb3AuthTokenToXano (index.92c53fec.js:1:23357)
at async e (index.92c53fec.js:1:22323)
Hi Silver Sepp! Thank you for reaching out with your issue regarding the WalletConnect adapter. I understand how frustrating it can be to encounter these kinds of errors.
Here’s a summary of the details you’ve provided:
SDK Details: PnP Web SDK
Issue: WalletConnect Adapter giving error on connection ‘Missing or invalid.’
It seems like the issue may be related to the chain ID you’ve specified. The error suggests that the chain ID being used (eip155:8453) is not being recognized or is invalid. Ensure that:
The chain ID being sent during the request is supported and correctly configured in both your application and the WalletConnect settings.
If using Base blockchain, confirm that it is correctly set up and supported by WalletConnect.
Additionally, if you want WalletConnect to propose adding the chain, make sure that your WalletConnect configuration is set up to allow for that.
Next Steps:
Please check if you can modify the chain ID and see if that resolves the issue.
If the problem persists, could you provide us with any browser console screenshots? They might give us more insight into the error.
Feel free to reach out with any further questions or clarifications! We’re here to help.
Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.
Hey @silver,
Thanks for providing the details. To help us better diagnose the issue, could you please submit a recording of the process using jam.dev? This will allow us to see exactly which call is failing and what the response looks like.
Sorry but there is no way to message you. I think perhaps only admins can private message people? Can you please message and I will respond to you?
Btw, it seems that even if I have the chain in mobile Metamask but it is not active, then WalletConnect adapter will throw an exception. Only when I previously have the chain active it seems to work.
The error comes when I have Ethereum (or some other chain, not Base) selected in Metamask mobile wallet. When I try to connect it immediately says Login failed: JsonRpcError: Missing or invalid. request() chainId: eip155:8453. When Base is selected prior to login it shows signature screen correctly without error and I can log in successfully.
It should offer me to change the wallet to Base chain, like it does with other login methods (like Metamask). But it does not offer me to change the wallet to Base - instead throws the error.
I am using the latest version of the libraries, 9.4.4. @maharshi It has now been over a month since I posted the issue - its quite urgent as Mobile Metamask is one of the most popular login methods.
Hey @silver can you please try to reproduce the issue with demo.web3auth.io? I tried with our demo, and not facing any issues. If you are able to reproduce the issue on the demo, please let us know.
Hey @silver
thank you for the clarification.
Please follow what @Ayush has suggested, also please try out one more thing
Here, instead of ["0x2105"], can you please send ["0x2105", "0x1"]. This will get the settings for Ethereum as well, since you confirmed in your last message that the error happens when you switch to Ethereum from Base.
As I said I get the error when choosing walletconnect in the desktop browser, opening mobile metamask in the phone and scanning the QR code. This works when I have Base selected previously in Metamask. It does not work, when I have some other chain selected - it never offers to change the chain and just errors out.
The code you provided has no effect. I think the problem is because the initial chainConfig going into EthereumProvateKeyProvider is set to Base. So if I connect Metamask while anything else is selected then I still see this in the logs: