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 https://github.com/verified-network/via-issuer - any help will be much appreciated !

C:\Engineering\Via\via-issuer\node_modules\request\request.js:848
          var e = new Error('ETIMEDOUT')
                  ^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Error: ETIMEDOUT
    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
a\via-issuer\node_modules\eth-block-tracker\src\p
:51:24)
    at processTicksAndRejections (internal/proces
eues.js:97:5)
    at runNextTicks (internal/process/task_queues

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

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:

Thanks, @Leiya_Kenney. I am using truffle to do the migration and using hdwalletprovider for signing transactions. Config file is here https://github.com/verified-network/via-issuer/blob/master/truffle-config.js. The mnemonic is for my metamask account which has enough funds.

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

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!

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.

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?