If you encounter this error even though there is ETH on the account it is because your gasLimit and gas price exceeds the amount of ETH available.
For instance let's suppose that I have a gas limit of 8 000 000 (aka gas when you use sendtransaction ) and a gasPrice of 200Gwei that means that you will need to have 8000000×200000000000 wei = 1.6 ETH available on your account. Of course that doesn't mean your transaction will use all this gas but it needs to be there as you have to send it along even if it is a simple call to a transfer fonction of an ERC20. If we go down to 3000000 gas limit we would need only 0.6 ETH
So to make it short make sure that your gas limit is set to a reasonable amount
in truffle config
ropsten: {
provider: () =>
new HDWalletProvider(
mnemonic,
`wss://ropsten.infura.io/ws/v3/`
),
websockets: true, // (default: false)
confirmations: 2, // (default: 0)
network_id: 3, // ropsten's id
networkCheckTimeout: 1000000000,
gas: 3000000,
or directly in the sendTransaction
web3.eth.sendTransaction({
from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
to: '0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe',
value: '1000000000000000',
gas:'3000000'})