Open LightBurdenOfficial opened 4 years ago
You have invalid authentication details for the RPC.
@uaktags we should probably handle this new error to report what the problem is - I'll take a look into it
Guessing he is upgrading from an older version, his user/pass is probably not updated to username/password.
Guessing he is upgrading from an older version, his user/pass is probably not updated to username/password.
That was exactly my friend! I made the update in my source and it worked!
@TheHolyRoger quick and dirty would be:
const Client = require('bitcoin-core');
if(settings.wallet.password || settings.wallet.username){
}else{
settings.wallet.password = settings.wallet.pass;
settings.wallet.username = settings.wallet.user;
}
const client = new Client(settings.wallet);
in explorer.js it's not a error handling measure, but it's a starting point. Perhaps instead, error handling should look into the ./bin/instance to check that everything is updated for the new versions (so if any settings.json things are changed/updates needed and they're not found, we can warn/error out before launching numerous workers for the instance.) Within there, during npm start, we can test RPC functionality, check settings.json for good configurations/upgrades needed, etc and stop/continue as per.
But regardless, I think his settings.json is from 1.6.1, @DigitalCoin1 please confirm and double check your settings.wallet.password and settings.wallet.username (it use to be called settings.wallet.pass and settings.wallet.user)
Perfect, thanks @DigitalCoin1 for the update.
Reopening the issue and will rename it for the fact we should have error-handling for this required upgrade (it will likely cause issues for others). DigitalCoin, you can mute this issue if you'd like!
Thanks!
When I change from user/pass to username/password I get this error
{ Error: Invalid params, response status code: 401
at IncomingMessage.<anonymous> (/app/node_modules/bitcoin/lib/jsonrpc.js:79:17)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9) code: -32602 }
GET /api/getblockcount 200 144.729 ms - 39
@sundanny26 create a new issue next time so that you can provide your own settings. I've created #475 for you in the meantime. Please show a screenshot/output of your settings.json file as it's telling us "invalid params", so something is getting sent over incorrectly.