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

Node details: getblockchaininfo.warnings.trim is not a function after upgrading bitcoind to 28.0 #668

Open
schildbach opened this issue Oct 7, 2024 · 11 comments
Labels

Comments

@schildbach
Copy link
Contributor

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]: bfc9f97
  • 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/.env or ~/.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.

@schildbach schildbach added the bug label Oct 7, 2024
@jaysee260
Copy link

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.

@rogeriobiondi
Copy link

+1 with the same issue

@mntbighker
Copy link

+1 same

@twofaktor
Copy link

+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)

imagen

@twofaktor
Copy link

twofaktor commented Dec 30, 2024

Solved by adding deprecatedrpc=warnings in bitcoin.conf

imagen

Context & refs:
lightningnetwork/lnd#9163
bitcoin/bitcoin#29845
lightningnetwork/lnd#9053

@twofaktor
Copy link

twofaktor commented Dec 30, 2024

Fixed anyway on this commit 01585b7 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 <dan@47.io>" _**[expired]**_
gpg: Note: This key **_has expired_**!
Primary key fingerprint: 4D84 1E6E 6B1B 68EB FAB4  A9E6 70C0 B166 321C 0AF8

@jaysee260
Copy link

@twofaktor do you mean to say I should re-compile from master instead of 3.4.0?

@twofaktor
Copy link

twofaktor commented Jan 6, 2025

@twofaktor do you mean to say I should re-compile from master instead of 3.4.0?

Yes! Or to add deprecatedrpc=warnings in bitcoin.conf whatever you prefer

@jaysee260
Copy link

jaysee260 commented Jan 6, 2025

@twofaktor I tried that, but when I run npm i on master, the operation fails with a really long exception :(

npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated eslint@8.57.1: 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.

@jaysee260
Copy link

@twofaktor Yep, updating bitcoin.conf to include deprecatedrpc=warnings did it, thank you!

@schildbach
Copy link
Contributor Author

Is there a release planned, including the fixes?

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

6 participants
@schildbach @mntbighker @rogeriobiondi @jaysee260 @twofaktor and others