create account

SFR WorkLog: Discord.JS Invalid Token issue by anthonyadavisii

View this thread on: hive.blogpeakd.comecency.com
· @anthonyadavisii · (edited)
$3.86
SFR WorkLog: Discord.JS Invalid Token issue
*Noticed the following error trying to restart our upvote bot:*

![swollMrFlaggy.png](https://ipfs.busy.org/ipfs/QmdELteyU8oQf5ejrpdEnBt6FLFXTdcdrSXbNxq6ZNPsW2)


```
sfr@sfr:~/steemflagrewards/sfrvotingbot_update$ node sfrvotingbot_consolidated.js
(node:13595) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided.
    at WebSocketManager.connect (/home/sfr/steemflagrewards/sfrvotingbot_update/node_modules/discord.js/src/client/websocket/WebSocketManager.js:132:26)
    at Client.login (/home/sfr/steemflagrewards/sfrvotingbot_update/node_modules/discord.js/src/client/Client.js:210:21)
    at processTicksAndRejections (internal/process/task_queues.js:82:5)
(node:13595) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13595) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```

This was resolved by following actions provided in this [article](https://stackoverflow.com/questions/16525430/npm-check-and-update-package-if-needed)

```

sfr@sfr:~/steemflagrewards/sfrvotingbot_update$ npm outdated
Package        Current  Wanted  Latest  Location
discord.js  12.0.0-dev     git     git  sfrvotingbot
sfr@sfr:~/steemflagrewards/sfrvotingbot_update$ npm update discord.js

```

Specifically, I executed the 'npm outdated' and 'npm update discord.js' in the bot folder. As soon as the update was complete, was able to run the bot again no problem. 

---

My next task will be testing looking into a mechanism for the bot to ascertain free downvotes against a HF21 RPC node. My assumption is that such a node with plugins is available by now rather than just a condenser. I was able to obtain the HF21 node that Keychain uses previously but, unfortunately, the needed plugin was not available.

If I'm not mistaken, it is the reward API. I could spin up a testnet RPC node but I am still working on correcting an issue with my new server. Specifically, I am trying to pull the image off a degraded RAID 1 array but am having a hard time. The software I am using seems intent on pulling a sector-by-sector from a 931 GB disk but, in actuality, less than 50 GB or so is currently being utilized on the disk. 

I ordered a couple spare drives in case my issue is related to a hardware failure on one. Hope that does it but still need to figure out a solution in the interrim. I may just use my gaming server which isn't as nice but should probably be able to get the job done for testing.

The problem is my SSD is somewhere around 235 ish GB and my plan is to reimage onto that drive for performance reasons. Will keep tinkering to see if I can find a solution. I would prefer not building anything on this server until I do as there is a potential for data loss until I am able to back it up. Anyways, that's a little bit about what's going on. Also, will need to update our repository at some point. Working from this [branch](https://github.com/anthonyadavisii/steemflagrewards/tree/steemflagrewards-token-bot) currently for the token distribution which is slightly out of date. 

Need to get with @reazuliqbal on the upvote bot code being put on a repository that way I can put in a PR with the changes made. That way we are working from the same sheet of music.
<center>
### More updates to come!
</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
👎  , , , , , , , ,
properties (23)
authoranthonyadavisii
permlinksfr-worklog-discord-js-invalid-token-issue
categorymarlians
json_metadata{"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["marlians","steemflagrewards","opensource","antiabuse","busy","neoxian","palnet"],"users":["sfr","reazuliqbal"],"links":["https://stackoverflow.com/questions/16525430/npm-check-and-update-package-if-needed","https://github.com/anthonyadavisii/steemflagrewards/tree/steemflagrewards-token-bot","/@reazuliqbal"],"image":["https://ipfs.busy.org/ipfs/QmdELteyU8oQf5ejrpdEnBt6FLFXTdcdrSXbNxq6ZNPsW2"]}
created2019-08-15 02:41:51
last_update2019-08-15 03:10:42
depth0
children2
last_payout2019-08-22 02:41:51
cashout_time1969-12-31 23:59:59
total_payout_value2.976 HBD
curator_payout_value0.882 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,580
author_reputation212,687,024,526,213
root_title"SFR WorkLog: Discord.JS Invalid Token issue"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,542,150
net_rshares11,718,738,893,287
author_curate_reward""
vote details (56)
@steem-ua ·
#### Hi @anthonyadavisii!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your **UA** account score is currently 5.435 which ranks you at **#671** across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 157 contributions, your post is ranked at **#125**.
##### Evaluation of your UA score:

* You've built up a nice network.
* The readers appreciate your great work!
* Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!


**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-sfr-worklog-discord-js-invalid-token-issue-20190816t061558z
categorymarlians
json_metadata"{"app": "beem/0.20.23"}"
created2019-08-16 06:16:00
last_update2019-08-16 06:16:00
depth1
children0
last_payout2019-08-23 06:16:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length698
author_reputation23,214,230,978,060
root_title"SFR WorkLog: Discord.JS Invalid Token issue"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,586,038
net_rshares0
@tts ·
To listen to the audio version of this article click on the play image.
[![](https://s18.postimg.org/51o0kpijd/play200x46.png)](http://ec2-52-72-169-104.compute-1.amazonaws.com/anthonyadavisii__sfr-worklog-discord-js-invalid-token-issue.mp3)
Brought to you by [@tts](https://steemit.com/tts/@tts/introduction). If you find it useful please consider upvoting this reply.
properties (22)
authortts
permlinkre-sfr-worklog-discord-js-invalid-token-issue-20190815t030116
categorymarlians
json_metadata""
created2019-08-15 03:01:18
last_update2019-08-15 03:01:18
depth1
children0
last_payout2019-08-22 03:01:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length369
author_reputation-4,535,154,553,995
root_title"SFR WorkLog: Discord.JS Invalid Token issue"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,542,547
net_rshares0