Cannot read properties of null (reading 'accessKeyId')
See original GitHub issueDescribe the bug
When the recently-added BTCEXP_S3_... variables are not defined, the current master (87fe724a357e29fef0dd433b6d065a2ac55a3aab) ends with following error:
> btc-rpc-explorer@3.3.0 start
> node ./bin/www
btcexp:app Searching for config files... +0ms
btcexp:app Config file not found at /home/be/.config/btc-rpc-explorer.env, continuing... +6ms
btcexp:app Config file not found at /etc/btc-rpc-explorer/.env, continuing... +0ms
btcexp:app Config file not found at /home/be/src/btc-rpc-explorer/.env, continuing... +1ms
btcexp:app No config files found. Using all defaults. +0ms
/home/be/src/btc-rpc-explorer/node_modules/@janoside/app-utils/src/s3Utils.js:13
debugLog(`Using AWS Access Key: ${AWS.config.credentials.accessKeyId}`);
^
TypeError: Cannot read properties of null (reading 'accessKeyId')
at Object.<anonymous> (/home/be/src/btc-rpc-explorer/node_modules/@janoside/app-utils/src/s3Utils.js:13:58)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/be/src/btc-rpc-explorer/node_modules/@janoside/app-utils/index.js:4:17)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/be/src/btc-rpc-explorer/app.js:99:18)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
Environment (please complete the following information):
- Bitcoin Core / Node Version
23.0 - NodeJS Version
v16.14.0 - Browser
Google Chrome - Code Version / Commit 87fe724a357e29fef0dd433b6d065a2ac55a3aab
- Installation Method “source code”
Configuration file content
No BTCEXP_S3 options set in the .env file. The Bitcoin Explorer works with following patch applied: https://github.com/jsarenik/btc-rpc-explorer/commit/768de3c182dd9ff275b16f730dcceea4b194e580
The '.env` file for ex.signet.bublina.eu.org:
BTCEXP_HOST=127.0.0.1
BTCEXP_PORT=3003
BTCEXP_BITCOIND_HOST=127.0.0.1
BTCEXP_BITCOIND_PORT=38332
BTCEXP_DEMO=true
BTCEXP_SLOW_DEVICE_MODE=true
BTCEXP_NO_RATES=true
BTCEXP_UI_HOME_PAGE_LATEST_BLOCKS_COUNT=6
BTCEXP_FILESYSTEM_CACHE_DIR=../../.cache/signet
BTCEXP_ADDRESS_API=electrum
BTCEXP_ELECTRUM_SERVERS=tls://signet-electrumx.wakiyamap.dev:50002
BTCEXP_ELECTRUM_TXINDEX=true
BTCEXP_UI_THEME=dark
BTCEXP_NO_INMEMORY_RPC_CACHE=true
To Reproduce
Steps to reproduce the behavior:
- Do not set any
BTCEXP_S3options in theenvfile. - Start the Bitcoin Explorer with
npm start. - See error.
Issue Analytics
- State:
- Created a year ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
"Cannot read property 'accessKeyId' of null" error. when trying ...
First time after installing the application and when trying to make API requests getting 'accessKeyId' of null" error, once the application ...
Read more >Cannot read property 'accessKeyId' of undefined, after latest ...
Failed to get profile: Cannot read property 'accessKeyId' of undefined presents itself. If I remove aws-vault, and create a credentials file ...
Read more >Class: AWS.Credentials — AWS SDK for JavaScript
Represents your AWS security credentials, specifically the accessKeyId, ... Credentials(accessKeyId, secretAccessKey, sessionToken = null) ⇒ void new AWS.
Read more >Determining the access key ID and the secret access key - IBM
In the side navigation, click Service Credentials. Click New credential and provide the necessary information.
Read more >AWS S3 private file access - Observable
Load the AWS SDK from npm. ... a TypeError will appear below. TypeError: Cannot read properties of undefined (reading 'byteLength') ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I tested and works for me now.
I can also confirm that it is working for me now, thanks!