-
Notifications
You must be signed in to change notification settings - Fork 4.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
MetaMask - RPC Error: header not found #7234
Comments
Please provide additional information that could help reproduce your issue. For example code snippets, browser/OS versions, and console/network logs could help explain your issue. |
I was able to reproduce this bug. It appears to fail intermittently. This us to a bug with Infura (apparently related to load balancing) - they have a fix in development, but it's still broken in prod at the moment. In the meantime I'd suggest retrying any requests that fail with this error |
im also seeing this issue today. was there ever another ticket created with infura for this? |
This issue has been causing us some trouble for the past couple of days. |
what is happening?
more about the error
Maybe something about the new version of metamask dropping support for web3 related #7708 Do you get this a lot? @owocki @peculiarity |
Solved it! I was on mainnet and the web3 was set to rinkeby instead so it gave this error! |
@x5engine Could you explain a bit more what you mean by solved? I am also getting the same error, It would be great if there was some sort of explanation in the error of what is happening and what the error is. |
@crazyrabbitLTC not solved. It's still happening with regularity on mainnet. Appears to be a bug with infura as @Gudahtt mentioned, but I don't know more than that. |
any update on this issue? We are also experiencing this bug regularly. |
the bug happens when you use something not on mainnet To be honest.... |
The bug is still happening. Working on Ropsten testnet. |
@01fbk let me know! I am waiting! |
FYI for anyone facing the same issue. I was facing the similar issue on ropsten network I changed my network to mainnet and back to ropsten everything started to work fine. |
This error seems to mean that the specified block number is not on geth. |
@karankiri this solved it for me, thank you. I was getting this error when connected to a localnet and needed to switch to mainnet and back for this error to stop throwing. |
I am getting this error. Does anybody have a solution. Thanks in advance. Error to read Metamask ERC balance: {"code":-32000,"message":"header not found"} |
Bump; the error still happens when using getBalance() |
Error still comes quite often any idea how to solve it? |
Also seeing this problem often |
currently getting this error frequently too, has something happened recently to cause this? issue now appears to have resolved itself, perhaps it was an issue with the rpc node metamask was using... |
This started happening to me today with Metamask on Chrome as well. I am unable to load anything and just see this being printed into the console over and over:
I also tried from the browser inside the Metamask wallet app on iOS and I get the same result. |
i also trying to deploy on Binance smart chain and this issue is still showing |
This error is likely due to the web3 app you're on is using Infura for RPC service... Infura is the major web3-rpc gateway and is hosting on AWS... and it has been choking out lately LOL. |
would be awesome to have this annoying bug fixed. It dirties the console a lot |
Is there any way to auto delay RPC calls with Ethers or something? We've been hitting this issue with Polygon's RPC. |
What do you mean “auto-delay”?
On Tue, Feb 22, 2022 at 11:24 AM Jonathan Dunlap ***@***.***> wrote:
Is there any way to auto delay RPC calls with Ethers or something?
—
Reply to this email directly, view it on GitHub
<#7234 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOZEXMUCWGKJDPQQ45EEZLU4O2CJANCNFSM4I4AB6JA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Sent from Gmail Mobile
|
Using ethers.js and a custom node I solved this problem. Instead of relying on metamask (Web3Provider) to make any get calls, I used my custom node from Moralis to make the calls as JsonRpcProvider. You can get a custom node for free at these sites: Alchemy, Infura, Moralis, and Tatum. And $9 per month (7-day free trial) at QuickNode.
|
Still an issue all this time later - this time on Fantom, just randomly get this issue with no explanation or no reasoning. |
I have the same issue. |
I'm also facing the same error on Polygon Mumbai Testnet. When i used the alchemy RPC endpoint in Metamask it just worked fine, i think the issue is with the Public endpoints. They maybe not able to process the request much faster. |
This totally appears to be issues from the RPC health and latency. While monitoring the network and console logs of both MetaMask and the dapp UI, I could find some RPC calls like I also ran a script to continuously fetch the latest block number and that block. And I was seeing really inconsistent block numbers. I faced this mostly when using I also noticed something else. There was an |
I believe the issue relates to the currently selected In my case, my
|
We have such a problem, how to get around it by introducing a delay of 100 ms. delay, you can give a suitable option. |
I had this issue this morning on Polygon and It got fixed when I used another RPC! Seems to be RPC issue |
this error is associated with running against load balanced rpc endpoints whose nodes are not exactly in sync |
For me it was not happen on Main Net. But happen in test net (sometimes happen and not). I tried to call directly from Remix, and when slowly work on remix, then I know the error will appeared on my app. So what is the conclution? |
Still having this issue on Ethereum mainnet. I'm calling a smart contract method that returns a view every 5 seconds using ethers. It works fine but after a while this error appears. I've changed the provider from Infura's public one to Alchemy's private and the error persists. Don't know what to do. |
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions. |
This issue was closed because there has been no follow up activity in the last 45 days. If you feel this was closed in error, please reopen and provide evidence on the latest release of the extension. Thank you for your contributions. |
I believe it's because JSON-RPC service providers are using load balancers which provide inconsistent view of the blockchain for the user. Or some sort of a similar error. The solution is to have error retry handling on the application level. Here is an example PR that does it for Python Web3.py: |
- Whitelist header not found as retryable RPC error - See discussion MetaMask/metamask-extension#7234
Hi |
I don't launched a project for a 5 days and everything works fine. But now the calls like
web3.eth.getBalance
or contract methods returns:{code: -32000, message: "header not found"}
Does anything changed during this period, what the header means? Will appreciate your help, thanks in advance.
The text was updated successfully, but these errors were encountered: