ganache-core 'header not found' error when forking on node 14
See original GitHub issueI am having an error when forking using the programmable version of ganache (ganache-core version 2.13.2
). the error is ‘header not found’ :
Error: Returned error: header not found
at Object.ErrorResponse (/node_modules/ganache-core/node_modules/web3-core-helpers/src/errors.js:30:19)
at onJsonrpcResult (node_modules/ganache-core/node_modules/web3-core-requestmanager/src/index.js:172:36)
at node_modules/ganache-core/lib/forking/forked_blockchain.js:136:11
at processTicksAndRejections (internal/process/task_queues.js:93:5)
this is a very recurrent issue and breaks the usage of ganache forking.
my node version is v14.15.2.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
ganache - npm
A tool for creating a local blockchain for fast Ethereum development. Features • Getting Started • Documentation • Community • Docker ...
Read more >Ganache-cli Not Working properly WSL 2
I installed npm install -g ganache-cli on my WSL, but when I entered ganache-cli , it is showing me this error. Error: error:0308010C:digital...
Read more >Compiling your contracts... - ConsenSys/truffle - Gitter
Error : Cannot destructure property body of 'undefined' or 'null'. ... "^1.0.0-beta.0", "ganache-cli": "^6.9.1", "truffle": "^5.1.26" node v14.2.0
Read more >Paradigm CTF 2021 比赛环境- ripwu's blog - godorz.info
ValueError: {'message': 'Returned error: header not found', ... /node_modules/ganache-cli/build/ganache-core.node.cli.js:55:2110625)\n at .
Read more >Node-gyp fetches headers from internet - Stack Overflow
In that installation of ibm_db, node-gyp wants to download headers file from the internet which is not allowed under company firewall rule.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It doesn’t request the block data before the block number, it’s just that the external node we interact with knows the block number of the block it is currently processing, but because it hasn’t finished processing it yet when we request the block itself the node response like it doesn’t know about it. It’s very frustrating behavior, as you’ve seen!
An alternative approach for ganache is for us to automatically set the default fork block number to
"latest" - n
, wheren
is~5 blocks
. That way we can:"header not found"
errorAnother alternative, and the one I prefer, but haven’t figured out how to fully implement, is to attempt a time-based approach, where we just want to make sure the blocks are at least
t
seconds old. But this get complicated because the user’s clock isn’t always reliable! We’d need to sync with an authoritative time server, like pool.ntp.org, which requires an always-on internet connection. Additionally, block times themselves are permitted to be inaccurate to a certain degree (15 minutes!).I’m going to close this issue, as it’s really an issue with the node (though we are working on ways of minimizing the occurrence on start up)
Well, that did it. it fixed a lot of the issues I had with the forking, it’s weird that it requests block data before having the blocknumber.