btc-rpc-explorer icon indicating copy to clipboard operation
btc-rpc-explorer copied to clipboard

Invalid argument: undefined

Open junjie9021 opened this issue 2 years ago • 4 comments

Error: /workspace/views/includes/index-network-summary.pug:177 175| 176| else

177| - var estimatedSupply = utils.estimatedSupply(getblockchaininfo.blocks); 178| 179| span #{parseInt(estimatedSupply).toLocaleString()} 180| span.text-tiny.ms-2.text-muted

[DecimalError] Invalid argument: undefined at new Decimal (/workspace/node_modules/decimal.js/decimal.js:4373:15) at Decimal.P.times.P.mul (/workspace/node_modules/decimal.js/decimal.js:1878:17) at Object.estimatedSupply (/workspace/app/utils.js:647:48) at block (eval at wrap (/workspace/node_modules/pug-runtime/wrap.js:6:10), :6231:29) at Object.pug_interp (eval at wrap (/workspace/node_modules/pug-runtime/wrap.js:6:10), :255:10) at block (eval at wrap (/workspace/node_modules/pug-runtime/wrap.js:6:10), :6206:27) at Object.pug_interp (eval at wrap (/workspace/node_modules/pug-runtime/wrap.js:6:10), :195:10) at block (eval at wrap (/workspace/node_modules/pug-runtime/wrap.js:6:10), :6019:26) at Object.pug_interp (eval at wrap (/workspace/node_modules/pug-runtime/wrap.js:6:10), :166:10) at eval (eval at wrap (/workspace/node_modules/pug-runtime/wrap.js:6:10), :6016:30) at template (eval at wrap (/workspace/node_modules/pug-runtime/wrap.js:6:10), :9543:7) at Object.exports.renderFile (/workspace/node_modules/pug/lib/index.js:454:38) at Object.exports.renderFile (/workspace/node_modules/pug/lib/index.js:444:21) at exports.__express (/workspace/node_modules/pug/lib/index.js:493:11) at View.engine (/workspace/app.js:175:23) at View.render (/workspace/node_modules/express/lib/view.js:135:8)

junjie9021 avatar Jun 29 '22 08:06 junjie9021

How do you run it and what system do you run it on?

All those questions in the issue template actually make sense so please answer them.

And for proper (monospace/code) quoting please see this: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting

**Describe the bug**

A clear and concise description of what the bug is.

**Environment (please complete the following information):**

 - Bitcoin Core / Node Version [e.g. 0.16.3]
 - NodeJS Version [e.g. 9.x]
 - Browser [e.g. chrome, safari]
 - Code Version / Commit [e.g. ab6cde8]
 - Installation Method [e.g. "npm" or "source code"]
 
**Configuration file content**

Please include the content from the following files. **BE SURE TO MODIFY YOUR CREDENTIALS BEFORE SUBMITTING!!!**
 - bitcoin.conf
 - Your btc-rpc-explorer environment configuration (either `$WORKING_DIR/.env` or `~/.config/btc-rpc-explorer.env`)

**To Reproduce**

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Screenshots or Log Output**

If applicable, add screenshots or log output to help explain your problem.

**Additional context**

Add any other context about the problem here.

jsarenik avatar Jun 30 '22 10:06 jsarenik

soryy, I didn't add a description

os: ubuntu 20.04 btc-rpc-explorer commit: d96ded6e0d294f0c6e1328ebf97a3136e7d63814 run command:

docker build 
docker run 

.env profile

BTCEXP_BITCOIND_URI=bitcoin://test:[email protected]:18443?timeout=10000

my running regtest bitcore node, verison 23.0. After starting the browser, the following exception occurs during access

/workspace/views/includes/index-network-summary.pug:177 175| 176| else > 177| - var estimatedSupply = utils.estimatedSupply(getblockchaininfo.blocks); 178| 179| span #{parseInt(estimatedSupply).toLocaleString()} 180| span.text-tiny.ms-2.text-muted [DecimalError] Invalid argument: undefined

junjie9021 avatar Jul 01 '22 09:07 junjie9021

@janoside Please have a look.

jsarenik avatar Jul 06 '22 06:07 jsarenik

Do it

tsp187 avatar Jul 22 '22 21:07 tsp187

Cleaning up old issues. If you're still having this problem using the latest code (3.4-beta or greater), feel free to reply.

janoside avatar Apr 11 '23 02:04 janoside