Node details: `getblockchaininfo.warnings.trim is not a function` after upgrading bitcoind to 28.0
Describe the bug
After upgrading bitcoind from 27.1 to 28.0, btc-rpc-explorer 3.4.0 when clicking on "node details" yields the error:
Error
Message
getblockchaininfo.warnings.trim is not a function
Stack
(unavailable)
Error Object
{}
Environment (please complete the following information):
- Bitcoin Core / Node Version [e.g. 0.16.3]: 28.0
- NodeJS Version [e.g. 9.x]: using official Docker image
- Browser [e.g. chrome, safari]: Firefox 131.0
- Code Version / Commit [e.g. ab6cde8]: bfc9f97715
- Installation Method [e.g. "npm" or "source code"]: using official Docker image
Configuration file content
- BTCEXP_DEBUG=btcexp:*
- BTCEXP_COIN=BTC
- "BTCEXP_HOST=::"
- BTCEXP_BITCOIND_URI=bitcoin://bitcoind:${BITCOIND_RPC_PORT}
- BTCEXP_BITCOIND_COOKIE=xxx
- BTCEXP_ADDRESS_API=electrumx
- BTCEXP_ELECTRUM_SERVERS=tcp://electrs:${ELECTRS_TCP_PORT}
- BTCEXP_PRIVACY_MODE=true
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/.envor~/.config/btc-rpc-explorer.env)
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.
Having the same issue... For now, I just reverted to Bitcoin Core 27.1, but guessing this will require a new release of BTC RPC Explorer to fix.
+1 with the same issue
+1 same
+1 same
npm[1373254]: 2024-12-30T17:00:19.983Z btcexp:error Error ExpressUncaughtError: TypeError: /home/btcrpcexplorer/btc-rpc-explorer/views/node-details.pug:29
npm[1373254]: 27| +pageTab("Details", true)
npm[1373254]: 28|
npm[1373254]: > 29| if (getblockchaininfo.warnings && getblockchaininfo.warnings.trim().length > 0)
npm[1373254]: 30| +contentSection("Active Warnings")
npm[1373254]: 31| if (getblockchaininfo.warnings && getblockchaininfo.warnings.trim().length > 0)
npm[1373254]: 32| span.text-danger #{getblockchaininfo.warnings}
npm[1373254]: getblockchaininfo.warnings.trim is not a function, json: {"path":"/home/btcrpcexplorer/btc-rpc-explorer/views/node-details.pug"}, userData: [object Object] (json: {})
npm[1373254]: 2024-12-30T17:00:19.994Z btcexp:errorVerbose Stack: TypeError: /home/btcrpcexplorer/btc-rpc-explorer/views/node-details.pug:29
npm[1373254]: 27| +pageTab("Details", true)
npm[1373254]: 28|
npm[1373254]: > 29| if (getblockchaininfo.warnings && getblockchaininfo.warnings.trim().length > 0)
npm[1373254]: 30| +contentSection("Active Warnings")
npm[1373254]: 31| if (getblockchaininfo.warnings && getblockchaininfo.warnings.trim().length > 0)
npm[1373254]: 32| span.text-danger #{getblockchaininfo.warnings}
npm[1373254]: getblockchaininfo.warnings.trim is not a function
npm[1373254]: at block (eval at wrap (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:4806:63)
npm[1373254]: at Object.pug_interp (eval at wrap (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:1170:10)
npm[1373254]: at eval (eval at wrap (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:4803:23)
npm[1373254]: at template (eval at wrap (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:6653:7)
npm[1373254]: at exports.renderFile (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/pug/lib/index.js:454:38)
npm[1373254]: at exports.renderFile (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/pug/lib/index.js:444:21)
npm[1373254]: at exports.__express (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/pug/lib/index.js:493:11)
npm[1373254]: at View.engine (/home/btcrpcexplorer/btc-rpc-explorer/app.js:176:23)
npm[1373254]: at View.render (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/express/lib/view.js:135:8)
npm[1373254]: at tryRender (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/express/lib/application.js:657:10)
Solved by adding deprecatedrpc=warnings in bitcoin.conf
Context & refs: https://github.com/lightningnetwork/lnd/issues/9163 https://github.com/bitcoin/bitcoin/pull/29845 https://github.com/lightningnetwork/lnd/issues/9053
Fixed anyway on this commit https://github.com/janoside/btc-rpc-explorer/commit/01585b7825afe0eb3e8f6cf39e9e135a20c8c2dd you need to re-compile from the source code without point to the latest 3.4.0
BTW: @janoside you should renovate your GPG and release a new version, it's been over a year since the last release. Thanks
gpg: Signature made Mon 16 Dec 2024 03:23:58 PM UTC
gpg: using EDDSA key 4D841E6E6B1B68EBFAB4A9E670C0B166321C0AF8
gpg: Good signature from "Dan Janosik <[email protected]>" _**[expired]**_
gpg: Note: This key **_has expired_**!
Primary key fingerprint: 4D84 1E6E 6B1B 68EB FAB4 A9E6 70C0 B166 321C 0AF8
@twofaktor do you mean to say I should re-compile from master instead of 3.4.0?
@twofaktor do you mean to say I should re-compile from
masterinstead of3.4.0?
Yes! Or to add deprecatedrpc=warnings in bitcoin.conf whatever you prefer
@twofaktor I tried that, but when I run npm i on master, the operation fails with a really long exception :(
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
npm error code 1
npm error path /home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq
npm error command failed
npm error command sh -c node ./script/install.js
npm error Building addon node via cmake-ts (requires cmake, ninja, and the vcpkg dependencies)
npm error --------------------------------------------------
npm error WARNING: Building only for the current runtime.
npm error WARNING: DO NOT SHIP THE RESULTING PACKAGE
npm error --------------------------------------------------
npm error no generator specified, checking ninja
npm error ninja not found, checking make
npm error found make at /usr/bin/make (fallback)
npm error running in /home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq command [ 'nativeonly' ]
npm error > Setting up staging directory... [ DONE ]
npm error ---------------- BEGIN CONFIG ----------------
npm error > Distribution File Download... [ DONE ]
npm error > Determining ABI... [ DONE ]
npm error > Building directories... [ DONE ]
npm error > Applying overrides... [ DONE, 0 applied ]
npm error --------------- CONFIG SUMMARY ---------------
npm error Name: N/A
npm error OS/Arch: linux arm64
npm error Runtime: node 20.18.1
npm error Target ABI: 115
npm error Toolchain File: null
npm error Custom CMake options: no
npm error Staging area: /home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/staging/linux/arm64/node/115
npm error Target directory: /home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/build/linux/arm64/node/115
npm error Build Type Release
npm error ----------------------------------------------
npm error > Setting up config specific staging directory... [ DONE ]
npm error > Building CMake command line... "/usr/bin/cmake" "/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq" --no-warn-unused-cli -DCMAKE_BUILD_TYPE="Release" -DCMAKE_JS_INC="/home/btcrpcexplorer/.cmake-ts/node/linux/arm64/v20.18.1/include/node;node_modules/node-addon-api" -DNODE_RUNTIME="node" -DNODE_ARCH="arm64" -DNODE_PLATFORM="linux" -DNODE_RUNTIMEVERSION="20.18.1" -DNODE_ABI_VERSION="115" -DCMAKE_JS_DEFINES="" -G"Unix Makefiles"
npm error [ DONE ]
npm error > Invoking CMake... Not searching for unused variables given on the command line.
npm error -- ZMQ_DRAFT: OFF
npm error -- ZMQ_CURVE: OFF
npm error -- ZMQ_SODIUM: OFF
npm error -- ZMQ_WEBSOCKETS: OFF
npm error -- ZMQ_WEBSOCKETS_SECURE: OFF
npm error -- ZMQ_NO_SYNC_RESOLVE: OFF
npm error -- Repository already exists at /home/btcrpcexplorer/vcpkg.
npm error -- Updating /home/btcrpcexplorer/vcpkg
npm error Already up to date.
npm error Unable to determine a binary release of vcpkg; attempting to build from source.
npm error Building vcpkg-tool...
npm error -- Configuring incomplete, errors occurred!
npm error See also "/home/btcrpcexplorer/vcpkg/buildtrees/_vcpkg/build/CMakeFiles/CMakeOutput.log".
npm error -- Configuring incomplete, errors occurred!
npm error Generic error occured Error: Process terminated: 1
npm error at ChildProcess.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/@aminya/cmake-ts/build/util.js:100:24)
npm error at ChildProcess.emit (node:events:518:28)
npm error at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm error Error: Failed to load zeromq.js addon.node: Error: ENOENT: no such file or directory, scandir '/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/build/linux/arm64/node'
npm error Error: ENOENT: no such file or directory, scandir '/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/build/linux/arm64/node'
npm error at Object.readdirSync (node:fs:1506:26)
npm error at findAddon (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/lib/load-addon.js:22:43)
npm error at Object.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/lib/load-addon.js:50:15)
npm error at Module._compile (node:internal/modules/cjs/loader:1469:14)
npm error at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
npm error at Module.load (node:internal/modules/cjs/loader:1288:32)
npm error at Module._load (node:internal/modules/cjs/loader:1104:12)
npm error at Module.require (node:internal/modules/cjs/loader:1311:19)
npm error at require (node:internal/modules/helpers:179:18)
npm error at main (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:26:7)
npm error at findAddon (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/lib/load-addon.js:43:15)
npm error at Object.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/lib/load-addon.js:50:15)
npm error at Module._compile (node:internal/modules/cjs/loader:1469:14)
npm error at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
npm error at Module.load (node:internal/modules/cjs/loader:1288:32)
npm error at Module._load (node:internal/modules/cjs/loader:1104:12)
npm error at Module.require (node:internal/modules/cjs/loader:1311:19)
npm error at require (node:internal/modules/helpers:179:18)
npm error at main (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:26:7)
npm error at Object.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:34:1)
npm error 'os' was missing in the 'configurations'. Defaulting to the current operating system linux
npm error 'arch' was missing in the 'configurations'. Defaulting to the current architecture arm64
npm error `runtime` was missing in the `configurations`. Defaulting to `node`
npm error 'runtimeVersion' was missing in the 'configurations'. Defaulting to the current runtimeVersion 20.18.1
npm error CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
npm error CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
npm error CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
npm error CMake Error at staging/linux/arm64/node/115/_deps/_project_options-src/src/Vcpkg.cmake:53 (execute_process):
npm error execute_process last command failed
npm error Call Stack (most recent call first):
npm error staging/linux/arm64/node/115/_deps/_project_options-src/src/Vcpkg.cmake:106 (_bootstrap_vcpkg)
npm error staging/linux/arm64/node/115/_deps/_project_options-src/src/Vcpkg.cmake:227 (_install_and_update_vcpkg)
npm error CMakeLists.txt:100 (run_vcpkg)
npm error
npm error
npm error node:child_process:930
npm error throw err;
npm error ^
npm error
npm error Error: Command failed: /usr/bin/node /home/btcrpcexplorer/btc-rpc-explorer/node_modules/@aminya/cmake-ts/build/main.js nativeonly
npm error at genericNodeError (node:internal/errors:984:15)
npm error at wrappedFn (node:internal/errors:538:14)
npm error at checkExecSyncError (node:child_process:891:11)
npm error at Object.execFileSync (node:child_process:927:15)
npm error at cmakeTs (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:10:6)
npm error at main (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:29:7)
npm error at Object.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:34:1)
npm error at Module._compile (node:internal/modules/cjs/loader:1469:14)
npm error at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
npm error at Module.load (node:internal/modules/cjs/loader:1288:32) {
npm error status: 1,
npm error signal: null,
npm error output: [ null, null, null ],
npm error pid: 73062,
npm error stdout: null,
npm error stderr: null
npm error }
npm error
npm error Node.js v20.18.1
npm error A complete log of this run can be found in: /home/btcrpcexplorer/.npm/_logs/2025-01-06T19_01_48_819Z-debug-0.log
I will try updating the bitcoin.conf.
@twofaktor Yep, updating bitcoin.conf to include deprecatedrpc=warnings did it, thank you!
Is there a release planned, including the fixes?
setting deprecatedrpc=warnings does not solve anything in my case !
@twofaktor I tried that, but when I run
npm ion master, the operation fails with a really long exception :(npm warn deprecated [email protected]: This package is no longer supported. npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead npm warn deprecated [email protected]: This package is no longer supported. npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead npm warn deprecated [email protected]: This package is no longer supported. npm warn deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options. npm error code 1 npm error path /home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq npm error command failed npm error command sh -c node ./script/install.js npm error Building addon node via cmake-ts (requires cmake, ninja, and the vcpkg dependencies) npm error -------------------------------------------------- npm error WARNING: Building only for the current runtime. npm error WARNING: DO NOT SHIP THE RESULTING PACKAGE npm error -------------------------------------------------- npm error no generator specified, checking ninja npm error ninja not found, checking make npm error found make at /usr/bin/make (fallback) npm error running in /home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq command [ 'nativeonly' ] npm error > Setting up staging directory... [ DONE ] npm error ---------------- BEGIN CONFIG ---------------- npm error > Distribution File Download... [ DONE ] npm error > Determining ABI... [ DONE ] npm error > Building directories... [ DONE ] npm error > Applying overrides... [ DONE, 0 applied ] npm error --------------- CONFIG SUMMARY --------------- npm error Name: N/A npm error OS/Arch: linux arm64 npm error Runtime: node 20.18.1 npm error Target ABI: 115 npm error Toolchain File: null npm error Custom CMake options: no npm error Staging area: /home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/staging/linux/arm64/node/115 npm error Target directory: /home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/build/linux/arm64/node/115 npm error Build Type Release npm error ---------------------------------------------- npm error > Setting up config specific staging directory... [ DONE ] npm error > Building CMake command line... "/usr/bin/cmake" "/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq" --no-warn-unused-cli -DCMAKE_BUILD_TYPE="Release" -DCMAKE_JS_INC="/home/btcrpcexplorer/.cmake-ts/node/linux/arm64/v20.18.1/include/node;node_modules/node-addon-api" -DNODE_RUNTIME="node" -DNODE_ARCH="arm64" -DNODE_PLATFORM="linux" -DNODE_RUNTIMEVERSION="20.18.1" -DNODE_ABI_VERSION="115" -DCMAKE_JS_DEFINES="" -G"Unix Makefiles" npm error [ DONE ] npm error > Invoking CMake... Not searching for unused variables given on the command line. npm error -- ZMQ_DRAFT: OFF npm error -- ZMQ_CURVE: OFF npm error -- ZMQ_SODIUM: OFF npm error -- ZMQ_WEBSOCKETS: OFF npm error -- ZMQ_WEBSOCKETS_SECURE: OFF npm error -- ZMQ_NO_SYNC_RESOLVE: OFF npm error -- Repository already exists at /home/btcrpcexplorer/vcpkg. npm error -- Updating /home/btcrpcexplorer/vcpkg npm error Already up to date. npm error Unable to determine a binary release of vcpkg; attempting to build from source. npm error Building vcpkg-tool... npm error -- Configuring incomplete, errors occurred! npm error See also "/home/btcrpcexplorer/vcpkg/buildtrees/_vcpkg/build/CMakeFiles/CMakeOutput.log". npm error -- Configuring incomplete, errors occurred! npm error Generic error occured Error: Process terminated: 1 npm error at ChildProcess.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/@aminya/cmake-ts/build/util.js:100:24) npm error at ChildProcess.emit (node:events:518:28) npm error at ChildProcess._handle.onexit (node:internal/child_process:293:12) npm error Error: Failed to load zeromq.js addon.node: Error: ENOENT: no such file or directory, scandir '/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/build/linux/arm64/node' npm error Error: ENOENT: no such file or directory, scandir '/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/build/linux/arm64/node' npm error at Object.readdirSync (node:fs:1506:26) npm error at findAddon (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/lib/load-addon.js:22:43) npm error at Object.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/lib/load-addon.js:50:15) npm error at Module._compile (node:internal/modules/cjs/loader:1469:14) npm error at Module._extensions..js (node:internal/modules/cjs/loader:1548:10) npm error at Module.load (node:internal/modules/cjs/loader:1288:32) npm error at Module._load (node:internal/modules/cjs/loader:1104:12) npm error at Module.require (node:internal/modules/cjs/loader:1311:19) npm error at require (node:internal/modules/helpers:179:18) npm error at main (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:26:7) npm error at findAddon (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/lib/load-addon.js:43:15) npm error at Object.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/lib/load-addon.js:50:15) npm error at Module._compile (node:internal/modules/cjs/loader:1469:14) npm error at Module._extensions..js (node:internal/modules/cjs/loader:1548:10) npm error at Module.load (node:internal/modules/cjs/loader:1288:32) npm error at Module._load (node:internal/modules/cjs/loader:1104:12) npm error at Module.require (node:internal/modules/cjs/loader:1311:19) npm error at require (node:internal/modules/helpers:179:18) npm error at main (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:26:7) npm error at Object.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:34:1) npm error 'os' was missing in the 'configurations'. Defaulting to the current operating system linux npm error 'arch' was missing in the 'configurations'. Defaulting to the current architecture arm64 npm error `runtime` was missing in the `configurations`. Defaulting to `node` npm error 'runtimeVersion' was missing in the 'configurations'. Defaulting to the current runtimeVersion 20.18.1 npm error CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. npm error CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage npm error CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage npm error CMake Error at staging/linux/arm64/node/115/_deps/_project_options-src/src/Vcpkg.cmake:53 (execute_process): npm error execute_process last command failed npm error Call Stack (most recent call first): npm error staging/linux/arm64/node/115/_deps/_project_options-src/src/Vcpkg.cmake:106 (_bootstrap_vcpkg) npm error staging/linux/arm64/node/115/_deps/_project_options-src/src/Vcpkg.cmake:227 (_install_and_update_vcpkg) npm error CMakeLists.txt:100 (run_vcpkg) npm error npm error npm error node:child_process:930 npm error throw err; npm error ^ npm error npm error Error: Command failed: /usr/bin/node /home/btcrpcexplorer/btc-rpc-explorer/node_modules/@aminya/cmake-ts/build/main.js nativeonly npm error at genericNodeError (node:internal/errors:984:15) npm error at wrappedFn (node:internal/errors:538:14) npm error at checkExecSyncError (node:child_process:891:11) npm error at Object.execFileSync (node:child_process:927:15) npm error at cmakeTs (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:10:6) npm error at main (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:29:7) npm error at Object.<anonymous> (/home/btcrpcexplorer/btc-rpc-explorer/node_modules/zeromq/script/install.js:34:1) npm error at Module._compile (node:internal/modules/cjs/loader:1469:14) npm error at Module._extensions..js (node:internal/modules/cjs/loader:1548:10) npm error at Module.load (node:internal/modules/cjs/loader:1288:32) { npm error status: 1, npm error signal: null, npm error output: [ null, null, null ], npm error pid: 73062, npm error stdout: null, npm error stderr: null npm error } npm error npm error Node.js v20.18.1 npm error A complete log of this run can be found in: /home/btcrpcexplorer/.npm/_logs/2025-01-06T19_01_48_819Z-debug-0.log
Related to this issue: https://github.com/janoside/btc-rpc-explorer/issues/701
Fixed in v3.5
Fixed in v3.5
What about https://github.com/janoside/btc-rpc-explorer/pull/727 and https://github.com/janoside/btc-rpc-explorer/pull/699 ??