Skip to content
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

Error loading recent blocks: TypeError: cache.get(...).then(...).catch(...).finally is not a function #108

Closed
d3spwn opened this issue Mar 9, 2019 · 2 comments
Labels

Comments

@d3spwn
Copy link

d3spwn commented Mar 9, 2019

I've recently upgraded from version 7a88078 (2018-12-09) which is running just fine to the current version.

I get an error on startup:

Error loading recent blocks: TypeError: cache.get(...).then(...).catch(...).finally is not a function

Unable to get basic blockchain data

    If you just started your node, it may still be initializing.
    If your node is already initialized, check your RPC connection info.

Console output:

Loading env file: /home/btc-rpc-explorer/btc-rpc-explorer/.env
Loading RPC cookie file: /home/btc-rpc-explorer/.bitcoin/.cookie
Running RPC Explorer for Bitcoin
Connecting via RPC to node at 127.0.0.1:8332
Error 923grf20fge: TypeError: cache.get(...).then(...).catch(...).finally is not a function, error json: {}

However I'm pretty sure the RPC connection info is configured correctly:

# Bitcoin RPC Credentials (URI -OR- HOST/PORT/USER/PASS)
#BTCEXP_BITCOIND_URI=bitcoin://rpcusername:[email protected]:8332
#BTCEXP_BITCOIND_HOST=localhost
#BTCEXP_BITCOIND_PORT=8332
#BTCEXP_BITCOIND_USER=rpcusername
#BTCEXP_BITCOIND_PASS=rpcpassword
BTCEXP_BITCOIND_COOKIE=/home/btc-rpc-explorer/.bitcoin/.cookie
btc-rpc-explorer@debian:~/btc-rpc-explorer$ bitcoin-cli -rpccookiefile=/home/btc-rpc-explorer/.bitcoin/.cookie getnetworkinfo
{
  "version": 170100,
  "subversion": "/Satoshi:0.17.1/",
  ...
@d3spwn d3spwn added the bug label Mar 9, 2019
@d3spwn
Copy link
Author

d3spwn commented Mar 10, 2019

I think I've tracked down the error to the line below. I'm not a JS programmer though. I don't know what's happening here.

cache.get(cacheKey).then(function(result) {

@janoside
Copy link
Owner

Hey @d3spwn - Thanks for reporting this and doing some investigating. I think the issue has to do with the version of node.js you're running. I think my recent change - be9c3cc - should fix the problem for you by removing the code that requires a newer node.js. Please let me know if you're still seeing the errors. Hopefully this gets you up and running!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants