-
Notifications
You must be signed in to change notification settings - Fork 61
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
JsonRpcError when sending transaction using MetaMask #176
Comments
Hi, we seem to have a similar issue. In my case the transfer of tokens via my erc721 compatible contract deployed on Polygon started to fail after having to migrate to WalletConnect v2 in our Flutter dApp. |
+1 have the same problem from the last week. |
If you are sending a transaction on an established wallet connect pairing session, you only need to launch the wallet with the redirect link (i.e. native: metamask:// ) . If you include the original encoded WalletConnect pairing URI, you are attempting to create a new session with a duplicate seed. (Right before you send a transaction ... ) FYI : I am working on some interop and troubleshooting pointers here: |
Not working getting same error. |
@devsideal - I can't offer more given what you have posted. You can look at my demo app https://gitlab.com/graflr/flutter_web3_demo and the wiki pages on that site. If you go the route of using a class WalletConnectEip155Credentials that extends the web3dart CustomTransactionSender, you can likely avoid the need to manually create the Transaction.callContract (which I suspect is causing you trouble.) Peek at: |
I was able to reproduce what I think you saw. To confirm:
This is going to take more context to track down. As I have only seen this once. Do you have any of these in common?
Curious if this is a startup, initialization issue. But I won't have time to look at it further for a few days. There is also a good possibility this is on the Metamask side since the same message works other times. |
I believe it's a MetaMask issue. I created an example of signing a smart contract interaction transaction. |
@Luzzotica - I found sending a stale session ID (i.e. expired) to signEngine.request can cause this error. (I am sure there are more ways...) Should the app check for expired sessions or should the library catch & correct this before sending it to Metamask? I see you can use WalletConnectUtils.isExpired(sessionData.expiry) to check expired. What do you call for an existing pairing to re-establish a new signing session?
|
I am also facing this issue |
Hello @Mash-Woo (and anyone else), do you still need help here? |
Can you update your demo? I config my projectID, But I cannot initialize the wallet normally and an Error when Running on iPhone |
@FelixYin66 - I updated my demo project dependencies. Note: I wasn't able to use the latest (0.1.0) web3dart_builders due to inveker/web3dart_builders#12 |
When I'm calling a custom contract method to send transaction through metamask app, getting below error
Unhandled Exception: JsonRpcError(code: 5000, message: Internal JSON-RPC error.)
STR
I have three step process like:
Step-1 is working fine when i click on Connect button its open the Metamask and i successfully received chain id and account address.
But when i click on Approve button its open the Metamask app & show the Modal sheet with Approve and Reject buttons, when click on Approve It shows Internal JSON-RPC error alert as showing in screenshot:
My Code is:
Anyone, can you help me what's going wrong?
The text was updated successfully, but these errors were encountered: