Search code examples
ethereumsoliditysmartcontractsetherremix

Contract deployment & transactions inconsistently fail on Rinkeby test network?


I'm using Infura & MetaMask and deploying to the Rinkeby test network. The contract compiles & runs without error in Remix. After compiling the contract in console, it deploys inconsistently. When it fails, I receive the following error:

UnhandledPromiseRejectionWarning: Error: Transaction was not mined within 50 blocks, please make sure your transaction was properly send. Be aware that it might still be mined!

I also receive this error when performing transactions after successful deployment.

What is causing this error? Is this related to network congestion/traffic? I can post the contract, compile, and deploy code if it helps.


Solution

  • The error is sometimes misleading. See http://github.com/ethereum/web3.js/issues/1102. It can also be due to blockchain congestion and/or low gas prices.