janoside / btc-rpc-explorer

Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
https://bitcoinexplorer.org
MIT License
1.48k stars 1.11k forks source link

Error message and stack trace when viewing block details #561

Open bkeroack opened 1 year ago

bkeroack commented 1 year ago

Describe the bug

Clicking into block details results in an error page and stack trace.

Environment (please complete the following information):

Configuration file content bitcoin.conf:

listen=1
maxconnections=50
onlynet=onion
debug=tor
rpcallowip=127.0.0.1
rpcauth=john.doe:xxxx
rpcuser=john.doe
[main]
[test]
[signet]
[regtest]

.env:

BTCEXP_BITCOIND_HOST=127.0.0.1
BTCEXP_BITCOIND_PORT=8332
BTCEXP_BITCOIND_COOKIE=/opt/var/lib/bitcoind/.cookie
BTCEXP_NO_INMEMORY_RPC_CACHE=false
BTCEXP_SLOW_DEVICE_MODE=false
BTCEXP_NO_RATES=false

To Reproduce

Steps to reproduce the behavior:

  1. Log main btc-rpc-explorer page
  2. Click a recent block number
  3. Note the error screen and stack trace

Screenshots or Log Output

Error message:

/home/bk/devel/btc-rpc-explorer/views/includes/shared-mixins.pug:227
    225| 
    226|                            
  > 227|                            if (!coinbaseTx && Object.keys(txInputs).length < tx.vin.length)
    228|                                +infoBadge
    229|                                    span(data-bs-toggle="tooltip", title="Data truncated by performance settings. See transaction details for fee info.")
    230|                                        span.fw-light …

Cannot convert undefined or null to object

Stack trace:

TypeError: /home/bk/devel/btc-rpc-explorer/views/includes/shared-mixins.pug:227
    225| 
    226|                            
  > 227|                            if (!coinbaseTx && Object.keys(txInputs).length < tx.vin.length)
    228|                                +infoBadge
    229|                                    span(data-bs-toggle="tooltip", title="Data truncated by performance settings. See transaction details for fee info.")
    230|                                        span.fw-light …

Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.eval (eval at wrap (/home/bk/devel/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:479:28)
    at Object.pug_interp [as txList] (eval at wrap (/home/bk/devel/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:1102:4)
    at block (eval at wrap (/home/bk/devel/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:5404:21)
    at Object.pug_interp (eval at wrap (/home/bk/devel/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:173:10)
    at block (eval at wrap (/home/bk/devel/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:5401:30)
    at Object.pug_interp (eval at wrap (/home/bk/devel/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:1210:10)
    at eval (eval at wrap (/home/bk/devel/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:4882:23)
    at template (eval at wrap (/home/bk/devel/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:5980:7)
    at exports.renderFile (/home/bk/devel/btc-rpc-explorer/node_modules/pug/lib/index.js:454:38)
travishoglund commented 4 months ago

Any update on this? I see this bug as well.

alnetarg commented 3 months ago

Any solution about it? I'm having the same problem