Error:PollingBlockTracker causes all test net migrations to time out!

Hi, I am not being able to deploy contracts on any of the test nets - pasting the log below. I have defined Infura_key in an .env file and kept the mnemonic in a separate .secret file. My code is at - any help will be much appreciated !

          var e = new Error('ETIMEDOUT')
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
    at Timeout.<anonymous> (C:\Engineering\Via\via-issuer\node_modules\request\request.js:848:19)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)
    at PollingBlockTracker._performSync (C:\Engin
    at processTicksAndRejections (internal/proces
    at runNextTicks (internal/process/task_queues

    at listOnTimeout (internal/timers.js:518:9)
    at processTimers (internal/timers.js:492:7)
1 Like

Hi @kallolborah - welcome to the Infura community! Are you using MetaMask web3 provider engine by any chance? If so, it’s no longer being maintained, so that may be causing some of your issues.

Otherwise, if you can send over the snippet of your code that is producing this error message, that’ll make debugging go a bit quicker :slight_smile:

1 Like

Thanks, @Leiya_Kenney. I am using truffle to do the migration and using hdwalletprovider for signing transactions. Config file is here The mnemonic is for my metamask account which has enough funds.

I am getting the etimedout error when I run truffle migrate --network ropsten.

1 Like

Got it - thanks! Take a look at this GitHub error thread - if you scroll down to nearly the end, it looks like there were a couple of updates pushed as debugs for this issue that should solve your error message. Let me know if those work for you!

1 Like

Thanks for the github link - I did update truffle from v5.1.22 to v5.1.44 and also updated hdwalletprovider to v1.0.44 - the issue still persists ! Not sure what is wrong - perhaps, I should post this on truffle@github ?

Reaching out to the Truffle team on GitHub is a great idea :slight_smile: Once you get an answer, it would be great if you could follow up on this thread so we can help future users who may run into this same issue!

Sure, I have posted the issue today. I will update the solution on this thread when I find one.

@Leiya_Kenney the same issue has been reported by others too to truffle, please check trufflesuite/truffle/issues/3356 (i can’t seem to post github links here!) - some of the comments suggest this is due to empty responses from infura - can you help check ?

I could finally migrate my contracts to infura by setting a ‘networkCheckTimeout’ attribute under networks in truffleconfig.js and this worked after I changed from https to web sockets. Both https and wss were not working otherwise, and even after adding the attribute, only wss worked. My project has 2 fairly complex contracts and 8 other contracts.

1 Like

Thanks for the update! I’ll check out that Truffle issue and will see what we can figure out.
As far as swapping over to wss, are all of your contracts working now on wss?

Buenos dias, @kallolborah, agradecido por tu respuesta, tengo días con este problema y veo que mucha gente tambien lo tiene, porque he leído en varios foros sin tener resultado. Pero siguiendo tus consejos se pudo solucionar el problema. a los que leen este post les digo los pasos que deben modificar.

No utilizar:

const INFURA_API_KEY="wss://

rinkeby: {
provider: () => new HDWalletProvider({ mnemonic:{ phrase: MNENOMIC }, providerOrUrl: INFURA_API_KEY}),
network_id: 4, // rinkeby’s id
numberOfAddresses: 1,
gas: 9500000, // rinkeby has a lower block limit than mainnet
gasPrice: 10000000000,
networkCheckTimeout: 1000000, // NB: this option does nothing
//confirmations: 2, // # of confs to wait between deployments. (default: 0)
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
//skipDryRun: true // Skip dry run before migrations? (default: false for public nets )

Con estas configuraciones pude hacer el deploy de mis SC.

Cualquier informacion, estamos a la orden,


Alexander Ramirez.


This is so irritating is there any solution yet?