Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

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

Open
doverradio opened this issue Jan 14, 2022 · 1 comment
Open

Comments

@doverradio
Copy link

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?

@humanwhoexplores
Copy link

@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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants