MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.16k stars 1.11k forks source link

Metamask mobile 5.10.0 not suggesting gas fee on custom hardhat node network #5245

Closed 0xHristo closed 1 year ago

0xHristo commented 1 year ago

Describe the bug

I have set up custom hardhat node which I have added to the Metamask mobile app. Every time when I try to submit transaction the Metamask app is not suggesting any gas and I cannot send the transaction, if I try to send it I am getting internal JSON RPC error.

Screenshots

IMG_8255 IMG_8251

Expected behavior I expect Metamsk to suggest and fill the gas price fields

Smartphone:

I've tried on all of the above phones and it doesn't work on version 5.10.0 but it works on 5.9.1


to be added after bug submission by internal support / PM Severity

tommasini commented 1 year ago

Thanks for reporting @0xHristo , we are aware and solving this issue ASAP

0xHristo commented 1 year ago

Hi @tommasini,

May you provide me with further information about the resolving of this issue. How long it will take to resolve it? Should I expect it resolved in 5.10.1? If yes, when is the release of the 5.10.1?

Thank you in advance!

tommasini commented 1 year ago

Thanks for your patience, a fix already have been developed, and it's about to be available in the stores on version 5.11.0

In Android, until it is available you can download the apk of version 5.9.1 here on our GitHub repo https://github.com/MetaMask/metamask-mobile/releases/tag/v5.9.1

0xHristo commented 1 year ago

Hi @tommasini thank you for the fast response. I have downloaded the updated version and it works fine on the normal transactions but when I try to do approve transaction it still has the above issue. The value is not NaN but instead it is totally missing.

IMG_8307

tommasini commented 1 year ago

@0xHristo Thanks for update the issue!

We are not being able to reproduce it on ethereum mainnet and on polygon mainnet, using the app.aave.com with an IOS on Version 5.11

Could you help us with more information? It would be awesome the steps you do and the network rpc URL and chain id that you are using to reproduce this bug

0xHristo commented 1 year ago

@tommasini hi,

This is the information needed to reproduce the transaction. I want to note that I am using WalletConnect to connect with Metamask.

rpc URL: https://2488-206-189-108-140.ngrok.io/ chaid id: 31337

the transaction which I am trying to send(basically ERC20 approval to the USDC token smart contract address)

{
  "id": "1669044200605642",
  "jsonrpc": "2.0",
  "method": "eth_sendTransaction",
  "params": [
    {
      "from": "0x0e1751fb76a2f4a8288c0af347def0d5fd5313a7",
      "data": "095ea7b3000000000000000000000000151087e77a918d33df147e748e3bea54c2c08c21ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
      "to": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
      "gas": "0x2dc6c0"
    }
  ]
}

The MetaMask's visualisation:

IMG_8309

0xHristo commented 1 year ago

I think the problem is from MetaMask because when I am trying submitting the transaction bellow to the same network everything seems okay.

{
  "id": "1669044699708046",
  "jsonrpc": "2.0",
  "method": "eth_sendTransaction",
  "params": [
    {
      "from": "0x0E1751Fb76a2F4a8288C0AF347def0d5fD5313A7",
      "data": "c04a8a10000000000000000000000000151087e77a918d33df147e748e3bea54c2c08c21ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
      "to": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
      "gas": "0x2dc6c0"
    }
  ]
}
Screenshot 2022-11-21 at 17 36 09
0xHristo commented 1 year ago

Hey @tommasini, any updates on this issue. Can I help in some way?

tommasini commented 1 year ago

Hey @0xHristo we tried to reproduce this on goerli network with the usdc smart contract

And we were able to estimate the gas and approve the permission to access the token

0xHristo commented 1 year ago

@tommasini I understand. I agree that it is working on public testnets & mainnets but I hit this issue when I try to submit approval on selfhosted testnet. Please, can you try with the following network:

Network RPC URL: https://2679-206-189-108-140.ngrok.io/ (Fork of the Polygon's mainnet, Forked with Hardhat) Network Chain ID: 31338

I am trying to submit the following transaction:

{
  "id": "1669044200605642",
  "jsonrpc": "2.0",
  "method": "eth_sendTransaction",
  "params": [
    {
      "from": "0x0e1751fb76a2f4a8288c0af347def0d5fd5313a7",
      "data": "095ea7b3000000000000000000000000151087e77a918d33df147e748e3bea54c2c08c21ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
      "to": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
      "gas": "0x2dc6c0"
    }
  ]
}

Note: If I try submitting on any other public testnet/mainnet everything is populated just fine but not on the above network. Note 2: Every other transaction (transfer. transferFrom, etc.) works perfectly fine with the above network.

tommasini commented 1 year ago

Thank you @0xHristo I will send this issue to our team!

Since this issue had been updated and the confirm button differs from the initial submitted, do you confirm it was working on version 5.9.1?

0xHristo commented 1 year ago

Yes it was working.

0xHristo commented 1 year ago

@tommasini Hello, are there any updates on this topic?

tenax002 commented 1 year ago

Also came across this issue when attempting to send and approval transaction on Avalanche Fuji testnet.

chrisleewilcox commented 1 year ago

@tenax002 can you confirm the MetaMask mobile app version?

chrisleewilcox commented 1 year ago

@0xHristo we are still not able to repro on other testnets and mainnet.

jarnaez728 commented 1 year ago

I can confirm this problem continues in Metamask mobile 5.12.0 Works fine as plugin in the browser. I have two custom networks and with one of them, gas is properly calculated but the other not. I'll gather all the information and will post it here so you can reproduce the issue and hopefully solve it :)

tommasini commented 1 year ago

@jarnaez728 thank you!

bschorchit commented 1 year ago

Is this still an issue?

jarnaez728 commented 1 year ago

Hi, I just tested and no, it is not in the version 6.0.0. Thanks!!

bschorchit commented 1 year ago

Awesome news! Thanks for checking it :)