Error: could not detect network

Hey @spalladinoI have got this error severals times.

Error: could not detect network (event=“noNetwork”, code=NETWORK_ERROR, version=providers/5.0.5)
at Logger.makeError (/opt/nodejs/node_modules/@ethersproject/logger/lib/index.js:179:21)

1 Like

Hi @Bolo,

Is this when you are running the frequent keeper script (every 1 minute, from: https://docs.openzeppelin.com/defender/guide-keep3r#create_an_autotask)?

yes. I have changed to my own keys. I have notice too with “one”, two auto tasks can be running in same time. I have changed for 2 minutes.

1 Like

Hi @Bolo,

I am not sure what you mean by you have changed to your own keys?

Are you running two Autotasks at a frequency of two minutes? This may be causing an issue.

If you are using this code snippet, I recommend running every one minute (the task checks for work every 5 seconds):

I was running the auto task each minute with default DefenderRelayProvider.
I have got this error with configuration. Got this error severals time today.

I have changed to use a provider with my own Infura keys.

1 Like

Hi @Bolo,

How many Autotasks are you running and at what frequency?

one autotask
and now 2 minutes but before it was one minute but severals process were running in same time

1 Like

Hi @Bolo,

You are likely running into an issue with the amount of JSON RPC requests you are making.

For now if you use the recommended one Autotask running at a frequency of every minute, with the check for work every 5 seconds you should be ok. More frequent than that and you may keep running into this.

I have let the development team know about this.

ah ok. got it. I will review my code. I don't need to call Json file each 5 secondes

1 Like

Thanks Bolo! You currently have an allowance of 10K network requests (ie any call to any contract) per hour, but if you see that you need more than that, please let us know.

1 Like