3

I am sending ether by using web3.eth.sendTransaction. But when I send, there is error:

Failed to check for transaction receipt:

web3.eth.sendTransaction({
    from: base_address,
    to: withdrawer,
    gasLimit: GASLIMIT,
    gasPrice: GASPRICE,
    value: wei_val
})
.on('error', function(err){
    console.log('error', err);
    res.json({error: "Sending error"});
})
.on('transactionHash', function(transactionHash){

 })
 .on('receipt', function(receipt){
     var transactionHash = receipt.transactionHash;
     console.log('transactionHash', transactionHash);

 })
 .on('confirmation', function(confirmationNumber, receipt){ 

  });

I think I can see the transactionHash in console, but error is coming. How can I do it?

  • I think it depends on Geth version. I installed geth 1.8.1-stable In this geth version, I can't use sendTransaction? – H.Ming Mar 4 '18 at 3:35
  • It indeed seems to be geth issue, see github.com/ethereum/web3.js/issues/1255 for workarounds. Note that according to some comments the transaction gets through eventually – comodoro Mar 4 '18 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.