question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
adamgallcommented, Apr 9, 2019

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

1reaction
CruzMolinacommented, Apr 15, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found