-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: etherscan api 403 when using getDefaultProvider #904
Comments
Can you try again? I just tested it an it seems to have worked. Maybe Görli (Etherscans fleet) was down at the time? If you still have issues, I’ll dig into this more. |
Thanks. I’ll look into it first thing. :) |
Heya! Just did some experimenting and can't reproduce it yet, so I have a few questions. :)
|
My quick fix was to remove etherscan provider for now - it is possible I am getting throttled so I'll have to check if creating my own api key fixes it |
Quick question. What browser are you using and what is its user agent? I spent the last few days debugging a similar issue with the browser tests failing, and I was finally able to determine the issue was the Cloudflare configurations sitting in-front of all the Etherscan testnet hosts (mainnet is fine) were overly aggressively blocking the User-Agent that the headless chrome reports. I fixed it by changing the User-Agent string. |
I was seeing this in Chrome. @PierrickGT may have more details. |
Could it have been configured with a custom User-Agent (or maybe a plugin that tweaked it) or had an automated option enabled? Chrome with the Just a hypothesis, but trying to narow it down. |
Closing as I don't believe this is an issue any longer? The EtherscanProvider now passes an empty API key along, which instructs their API to use IP throttling instead of API key throttling. Thanks! :) |
I've the same problem before and got solved by doing this!
Etherscan eventually blocked request that without headers |
Oh! That usually has to do with their configured Cloudflare heuristics for detecting a bot. This can often be addressed by acquiring your own API key. It also changes frequently and it hard to predict what rules are in effect and when. :( |
GET https://api-goerli.etherscan.io/api?module=proxy&action=eth_getBlockByNumber&tag=latest&boolean=false&apikey=9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB 403
The text was updated successfully, but these errors were encountered: