opensea-creatures icon indicating copy to clipboard operation
opensea-creatures copied to clipboard

Error: There was a timeout while attempting to connect to the network.

Open doverradio opened this issue 4 years ago • 1 comments

Hi, I'm constantly receiving this error:

Error: There was a timeout while attempting to connect to the network.
       Check to see that your provider is valid.
       If you have a slow internet connection, try configuring a longer timeout in your Truffle config. Use the networks[networkName].networkCheckTimeout property to do this.
    at Timeout._onTimeout (C:\Users\User\Desktop\wiki\o\opensea\opensea-creatures-template\node_modules\truffle\build\webpack:\packages\provider\index.js:56:1)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
error Command failed with exit code 1.

This error occurs after I run this command on Windows 10: yarn --ignore-engines truffle deploy --network rinkeby

I added --ignore-engines flag because it was constantly giving me errors about my node version and this stopped that. Hopefully it's not contributing to this error.

Here is the exact output I get after running that command:

PS> yarn --ignore-engines  truffle deploy --network rinkeby
yarn run v1.22.17
$ C:\Users\User\Desktop\wiki\o\opensea\opensea-creatures-template\node_modules\.bin\truffle deploy --network rinkeby
Warning: Please rename truffle.js to truffle-config.js to ensure Windows compatibility.

Compiling your contracts...
===========================
√ Fetching solc version list from solc-bin. Attempt #1
> Compiling .\contracts\common\meta-transactions\EIP712Base.sol
> Compiling .\contracts\common\meta-transactions\Initializable.sol
√ Fetching solc version list from solc-bin. Attempt #1
> Artifacts written to C:\Users\User\Desktop\wiki\o\opensea\opensea-creatures-template\build\contracts
> Compiled successfully using:
   - solc: 0.8.11+commit.d7f03943.Emscripten.clang

Error: There was a timeout while attempting to connect to the network.
       Check to see that your provider is valid.
       If you have a slow internet connection, try configuring a longer timeout in your Truffle config. Use the networks[networkName].networkCheckTimeout property to do this.
    at Timeout._onTimeout (C:\Users\User\Desktop\wiki\o\opensea\opensea-creatures-template\node_modules\truffle\build\webpack:\packages\provider\index.js:56:1)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

How do I overcome this issue?

doverradio avatar Jan 14 '22 01:01 doverradio

@doverradio Hey Intermittently , I faced this issue on my MAC laptop . I solved this issue by adding configuring a longer timeout value and added the following code networkCheckTimeout: 10000 here https://github.com/ProjectOpenSea/opensea-creatures/blob/master/truffle.js#L38

humanwhoexplores avatar Jan 17 '22 05:01 humanwhoexplores