INFURiating timeouts deploying to mumbai on https

I am trying to deploy contracts to polygon mumbai using truffle.

On eth testnets I get this error too, but using websocket fixes it.

Despite trying all the suggestions in various forum posts nothing seems to make it work.

Whenever this gets to deployment it I get this error:

var e = new Error(‘ETIMEDOUT’)
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
at Timeout. (C:\Users\node_modules\request\request.js:848:19)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
at PollingBlockTracker._performSync (C:\Users\node_modules\eth-block-tracker\src\polling.js:51:24)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)

This is my truffle config

mumbai: {

  provider: () => new HDWalletProvider(mnemonic, ``),

  network_id: 80001,     
  gas: 2000000,       
  gasPrice: 3,

  confirmations: 2,   
  timeoutBlocks: 500,  

  skipDryRun: true,    

  networkCheckTimeout: 1000000,


Hi @Dopamine, and welcome to the Infura community!

We’ve seen others have success switching from HTTPS to WebSockets (wss://polygon-mumbai… etc) for the connection, and setting a networkCheckTimeout. I would suggest trying this first and if that doesn’t work, let us know and we’ll continue digging!

This is indeed a solution which works for other things which offer websocket, but infura does not seem to offer websocket for matic mumbai. I tried making this change and it did not fix it. Could you confirm that you do offer WSS for matic + matic mumbai? If so I will attempt again!

As you will see, I have set a networkCheckTimeout.

Thankyou for your help.

Hi Leiya,

Could you please advise on my previous message :)?

Thankyou :slight_smile:

Apologies for steering you astray - we don’t currently support websockets. I’ve reached out to the developers to see if we can figure out a different way to fix the issue.

Hi @Dopamine, it may be the network - have you checked the latest information from the polygon site on the RPC details? Sometimes has the wrong details, so that may be affecting your deployment.