I am using MetaMask with a local Ganache blockchain to test my smart contracts. While using MetaMask, I am encountering an issue in my local blockchain where I cannot perform any transactions, whether they are smart contract interactions or simple ETH transfers to another wallet.
Expected behavior
Transactions sent from MetaMask should be processed, a new block with successful transaction are created, and logged correctly in Ganache, similar to the behaviour observed when executing transactions via nodeJS script.
Screenshots/Recordings
Metamask extension account activity after I attempted to initiate smart contract transactions or send ETH
Transaction detail of contract failure
Error in browser console of my frontend app
Blocks view in Ganache UI after doing transactions. Please notice that there are no transactions in the blocks, created after I attempt to do transactions with metmask
Steps to reproduce
Add local ganache network to metamask
Attempt to perform a transaction (either smart contract interaction from frontend app or ETH transfer).
Ganache logs shows that metamask initiated eth_sendRawTransaction. But no successful transaction after that.
11.15.0 ( Synpress's Google Chrome environment )
11.16.14
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
When I execute the same contract transaction using a nodeJS script with ethers.js, the transaction is successful and is logged correctly in Ganache.
If I test on other networks such as sepolia network using metamask with the same environment, this issue is not happening. I can do both the smart contract transactions and ETH transfer transactions.
This behaviour is consistent across both MetaMask versions (11.15.0 in Synpress and 11.16.14 in Chrome).
Ganache UI show the empty block creation without any transactions when using MetaMask after that failure occurs.
When executing transactions via script:
Ganache logs the transactions correctly.
Transactions are processed and reflected accurately.
I have also tried on other local blockchain networks such as Anvil and Hardhat network and observed the same behavior.
I am using the same ethers version (^5.4.7) in my frontend app to interact with the smart contract.
In the MetaMask extension UI, I can see the failed contract interactions. I clicked retry transaction and submitted again with the aggressive gas option but still could not manage to get a successful transaction.
Severity
Since this is only happening on the local blockchain we are using for end-to-end testing, the current users on mainnets are not affected. However, since the CI is not passing, the changes from bug fixes and features are stuck in the pipeline and blocked by this issue.
Describe the bug
I am using MetaMask with a local Ganache blockchain to test my smart contracts. While using MetaMask, I am encountering an issue in my local blockchain where I cannot perform any transactions, whether they are smart contract interactions or simple ETH transfers to another wallet.
Expected behavior
Transactions sent from MetaMask should be processed, a new block with successful transaction are created, and logged correctly in Ganache, similar to the behaviour observed when executing transactions via nodeJS script.
Screenshots/Recordings
Metamask extension account activity after I attempted to initiate smart contract transactions or send ETH![Screenshot 2024-07-05 at 4 54 30 PM](https://github.com/MetaMask/metamask-extension/assets/33474727/962722f1-1212-49b5-afaa-50c899287218)
Transaction detail of contract failure![Screenshot 2024-07-05 at 4 54 57 PM](https://github.com/MetaMask/metamask-extension/assets/33474727/d0f834e9-039b-4f2d-b836-9a67dc00fed3)
Error in browser console of my frontend app
Blocks view in Ganache UI after doing transactions. Please notice that there are no transactions in the blocks, created after I attempt to do transactions with metmask
Steps to reproduce
eth_sendRawTransaction
. But no successful transaction after that.Error messages or log output
Version
11.15.0 ( Synpress's Google Chrome environment ) 11.16.14
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
When I execute the same contract transaction using a nodeJS script with ethers.js, the transaction is successful and is logged correctly in Ganache.
If I test on other networks such as sepolia network using metamask with the same environment, this issue is not happening. I can do both the smart contract transactions and ETH transfer transactions.
This behaviour is consistent across both MetaMask versions (11.15.0 in Synpress and 11.16.14 in Chrome).
Ganache UI show the empty block creation without any transactions when using MetaMask after that failure occurs.
When executing transactions via script:
I have also tried on other local blockchain networks such as Anvil and Hardhat network and observed the same behavior.
I am using the same ethers version (^5.4.7) in my frontend app to interact with the smart contract.
In the MetaMask extension UI, I can see the failed contract interactions. I clicked retry transaction and submitted again with the aggressive gas option but still could not manage to get a successful transaction.
Severity
Since this is only happening on the local blockchain we are using for end-to-end testing, the current users on mainnets are not affected. However, since the CI is not passing, the changes from bug fixes and features are stuck in the pipeline and blocked by this issue.