Migration against infura erroring during `Reporter.postDeploy()`
See original GitHub issue- I’ve asked for help in the Truffle Gitter before filing this issue. -> https://gitter.im/ConsenSys/truffle?at=5caccc2225686a7dc301cab4
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
- Operating System: OSX 10.14.3
- Ethereum client: infura via https://ropsten.infura.io/v3/your-key
- Truffle version (
truffle version):
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
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Migration failed due to insufficient fund - Infura Community
Hello, I am trying to deploy my smart contracts on Ethereum mainnet. During migration time I faced an error “x” not deployed due...
Read more >Reporting migration - ICMPD
A handbook on migration reporting for journalists . 3. Table of Contents. Foreword. Introduction. Why was this handbook produced? Why now? What to...
Read more >Truffle migration error on Rospten Infura - Stack Overflow
I also got the same error and tried to use ws instead of https endpoint and got the following issue. Error: Unexpected server...
Read more >Truffle deployment/migration error with Infura - contract got ...
So I figured out the work-around - I changed the Node version to the latest stable version (v16) and everything worked like a...
Read more >Labour migration: Guidance for journalists - ILO
All too frequently, xenophobia against migrant workers is fuelled by populist attitudes that are divorced from the reality on the ground.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

For anyone else out there in the meantime, downgrading to
truffle v5.0.10allowed me to run migrations against infura without issue.@adamgall yup, we typically do issue grooming after release. This should be released in
v5.0.13by end of week. Keeping this open for now.