Truffle: Migration against infura erroring during `Reporter.postDeploy()`

Created on 9 Apr 2019  Â·  7Comments  Â·  Source: trufflesuite/truffle


Issue

Getting errors thrown from this line when doing migrations and using HDWalletProvider connected to infura nodes.

2_deploy_contract.js
=========================

   Deploying 'Contract'
   ----------------------------------
   > transaction hash:    0xtxH4sh
   â ¹ Blocks: 0            Seconds: 0TypeError: Cannot read property 'timestamp' of null
    at Reporter.postDeploy (/../node_modules/truffle/build/webpack:/packages/truffle-reporters/reporters/migrations-V5/reporter.js:317:1)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)
   â ¦ Blocks: 0            Seconds: 0

Migration hangs at this point.

This was likely introduced in https://github.com/trufflesuite/truffle/pull/1868, and is probably due to infura using an array of endpoint nodes, which might not all have the same block state at any given moment.

Steps to Reproduce

Perform a migration using HDWalletProvider, pointed at a public infura endpoint (such as https://ropsten.infura.io/v3/your-key), and observe the above error. It's sporadic, but has been happening very often for me.

Expected Behavior

I'd expect that the migration does not fail.

Actual Results

See error text above :)

Environment

Truffle v5.0.11 (core: 5.0.11)
Solidity v0.5.0 (solc-js)
Node v11.12.0
Web3.js v1.0.0-beta.37
  • node version (node --version): 11.12.0
  • npm version (npm --version): 6.9.0

Most helpful comment

For anyone else out there in the meantime, downgrading to truffle v5.0.10 allowed me to run migrations against infura without issue.

All 7 comments

Hey @adamgall , literally just noticed this error on my end while looking into other truffle-hdwallet-provider-related issues!

Hoping to fix this shortly 🤞

For anyone else out there in the meantime, downgrading to truffle v5.0.10 allowed me to run migrations against infura without issue.

so it looks like this is a known issue when polling from both geth & parity nodes (paritytech/parity-ethereum#8788, paritytech/parity-ethereum#6334, INFURA/infura/issues/43). I've noticed locally it's a sporadic error, but happens often enough to ruin the migrations experience. PR incoming.

Why has this been closed? Using the latest version of truffle, that is v5.0.12, I still have this issue.

@PaulRBerg My fault, this is probably poor GitHub etiquette on my part.

I believe that version v5.0.13 will contain the fix.

@CruzMolina what's the process for closing issues which contained merged fixes? Do you go through and close them after pushing a release?

@adamgall yup, we typically do issue grooming after release. This should be released in v5.0.13 by end of week. Keeping this open for now.

Closing since I believe this has been resolved in 5.0.13. Happy to reopen if it's still a problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timothywangdev picture timothywangdev  Â·  3Comments

TOMOAKI12345 picture TOMOAKI12345  Â·  3Comments

rotcivegaf picture rotcivegaf  Â·  3Comments

tcurdt picture tcurdt  Â·  3Comments

ferittuncer picture ferittuncer  Â·  3Comments