MetaMask / metamask-mobile

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

[Bug]: eth_sendTransaction ends with "Invalid Id" error #10074

Open Sabriel1984 opened 4 days ago

Sabriel1984 commented 4 days ago

Describe the bug

I have the same issue as reported here: https://github.com/MetaMask/metamask-mobile/issues/6735 and here https://github.com/MetaMask/metamask-mobile/issues/6736 - eth_sendTransaction ends with:

onSessionRequestResponse SessionRequestResponse(topic=73e8b38daa81df141fd0cef805fc0ea877b2a122e0b3a987d0d252f3b8589e09, chainId=eip155:11155111, method=eth_sendTransaction, result=JsonRpcError(id=1718966885359214, code=1, message=Invalid Id))

when I use metamask - it looks like a kind of regression in last metamask versions - currently we're not able to send transactions using this wallet. From the other side, when we send the same transaction (we have WalletConnect library to support different wallets) via DeFi wallet it works perfectly. I have the same error on both iOS and Android - and it's a kind of release blocking issue for us.__

Expected behavior

after send transaction event it should be a popup to confirm transaction in metamask wallet

Screenshots/Recordings

No response

Steps to reproduce

try to send eth_sendTransaction (I'm using Sepholia network if it's important), check logs with error

Error messages or log output

No response

Version

7.24.3

Build type

None

Device

Pixel 6a and others - not related this device

Operating system

Android

Additional context

No response

Severity

No response

christopherferreira9 commented 4 days ago

Hi @Sabriel1984 ! Do you have a dapp we can test this with? I've just tried a test dapp provided by WalletConnect and it seems to work normally.

https://github.com/MetaMask/metamask-mobile/assets/104831203/5f66c59c-a8d0-463e-a69b-5f2c0f285cfc

boxi79 commented 3 days ago

Get the same problems when I try to signTypedMessage with MetaMask in Safari (redirecting to mobile's MetaMask App)

  1. Open my Dapp in Safari
  2. Connect Wallet
  3. Redirect to MetaMask and Connect
  4. Back to my Dapp
  5. Try to sign typed message
  6. get Error with
       {"error":{"code":1, "message": "Invalid Id"}

I'm using @web3modal with ethers5 with MetaMask mobile version: 7.24.3

I also test previous version of MetaMask. There is no problem with 7.21.0

Sabriel1984 commented 14 hours ago

Hi @christopherferreira9, if you give me your email I could invite you to our app beta testing process on Test Fairy and Test Flight. But maybe transaction request will help you

WalletManagerImpl sendTransactionRequest success WalletConnect(method=eth_sendTransaction, params=[{"from":"0xfba2964efc69565d58b3429254db3225cf701035","to":"0x4BDDf9D49F7bE9957f60B5ce17ee32cf3d4A2107","value":"0x0", "data":"0x095ea7b3000000000000000000000000150b1ea321a42a934cbc970a7cf015dbac34b752000000000000000000000000000000000000000000000008e962295c87f43d30"}], chainId=eip155:11155111, requestId=1719577549980500, sessionTopic=a15dc9097a891024c2a53da98ed4fcb8fcc1f88df784b12e3ce40bbdab4a837f)

so basically I use eth_sendTransaction with only from, to and data filled (value is always 0 and it's not required) - becuase we try to send our token (by dapp with wallet connect library) from client metamask wallet to our smart contract address - so I have smart contract abi encoded and filled with values in "data" field

And it used to works lets say often in previous wallet versions (so in most cases dialog appears - if not there was no error in logs), but on latest 7.24 version it completely stop working - and I always have this error in logs:

WalletManagerImpl onSessionRequestResponse SessionRequestResponse(topic=a15dc9097a891024c2a53da98ed4fcb8fcc1f88df784b12e3ce40bbdab4a837f, chainId=eip155:11155111, method=eth_sendTransaction, result=JsonRpcError(id=1719577549980500, code=1, message=Invalid Id))

I checked and for the same params by web browser - https://docs.metamask.io/wallet/reference/eth_sendtransaction - it seems to work perfectly - so it must by regression in mobile metamask app. I also use another wallet (DeFi crypto.com) and the same transaction works without any problems.

If anyone from metamsk devs needs help with debug this issue using our dapp please send me a private message or send me an email.