I got this error since early today. It’s a simple background script for sending transactions. It has been running for 3 days smoothly. However since early today (2020-08-26 UTC 01:23), the script started to get the following error when it’s idle.
./node_modules/@trufflesuite/web3-provider-engine/index.js:62
this.emit('error', new Error("Could not find block"))
^
Error: Could not find block
at self._getBlockByNumberWithRetry (./node_modules/@trufflesuite/web3-provider-engine/index.js:62:28)
at afterRequest (./node_modules/@trufflesuite/web3-provider-engine/index.js:163:9)
at _handleAsync (./node_modules/@trufflesuite/web3-provider-engine/index.js:177:12)
at ./node_modules/@trufflesuite/web3-provider-engine/index.js:240:9
at ./node_modules/async/internal/once.js:12:16
at replenish (./node_modules/async/internal/eachOfLimit.js:61:25)
at ./node_modules/async/internal/eachOfLimit.js:71:9
at eachLimit (./node_modules/async/eachLimit.js:43:36)
at ./node_modules/async/internal/doLimit.js:9:16
at end (./node_modules/@trufflesuite/web3-provider-engine/index.js:217:5)
at Request._callback (./node_modules/@trufflesuite/web3-provider-engine/subproviders/rpc.js:72:5)
at Request.self.callback (./node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request.<anonymous> (./node_modules/request/request.js:1154:10)
at Request.emit (events.js:198:13)
at IncomingMessage.<anonymous> (./node_modules/request/request.js:1076:12)
I restarted the script a few times. Every time it can run for between a few minutes to a few hours, but eventually it crashes.
A similar problem was mentioned here. Probably it’s caused by the block number returned from eth_blockNumber
is higher than what we can get from eth_getBlockByNumber
.
Any idea?