sentanos / roblox-js

!!!THIS PROJECT IS NO LONGER MAINTAINED!!! Execute ROBLOX website actions in node.js
MIT License
46 stars 44 forks source link

Running payout server, nodejs crashes soon after payout. #44

Closed ytomasch closed 6 years ago

ytomasch commented 6 years ago

[Primary] login complete. [Primary] Token Connected. [Primary] Sent A Payout. events.js:141 throw er; // Unhandled 'error' event ^

Error: read ECONNRESET at exports._errnoException (util.js:870:11) at TLSWrap.onread (net.js:544:26)

sentanos commented 6 years ago

Are you using any events (onMessage, onShout, onJoinRequestHandle etc.)? This is not the type of error that would originate from the payout function.

ytomasch commented 6 years ago

For the sake of quick fixes, I wish I was.

Here is a simple snip of the code used:

rbx.login(group_owner_username,group_owner_password)
.then(function(){
rbx.getGeneralToken().then(function(){
rbx.groupPayout(group,username,amount)
.then(function(){
console.log("[Primary] Sent A Payout.");
});
});
});
sentanos commented 6 years ago

Are you sure the error originates from roblox-js? Are you running anything else at all on the same script, even a discord server or something else?

ytomasch commented 6 years ago

Nope, I may contact the VPS for support to see if they are for some reason terminating the connection. It's a simple VPS server with only NodeJS hosting roblox-js server on 8080 - ubuntu 16

sentanos commented 6 years ago

When you run the following what does it output?

rbx.login(group_owner_username, group_owner_password).then(rbx.getCurrentUser).then(console.log);
ytomasch commented 6 years ago

Here is the output, with username and last four of url replaced with X.

root@node-x:~# nodejs test-js-rbx.js
{ UserID: 295078431,
  UserName: 'XXXXXXXX',
  RobuxBalance: 0,
  TicketsBalance: 0,
  ThumbnailUrl: 'http://t7.rbxcdn.com/885259af170cf959ed40c1d60ce0XXXX',
  IsAnyBuildersClubMember: true }
sentanos commented 6 years ago

Nevermind now that I look more closely it has nothing to do with that, you are simply using the wrong arguments. rbx.groupPayout only takes user IDs, NOT usernames.

ytomasch commented 6 years ago

I am aware of this, the arguments sent to the code do use the ID, as it is still able to send payouts. Just crashes shortly after.

sentanos commented 6 years ago

Why would it crash after all operations are done? Is that the full code?

sentanos commented 6 years ago

If the payout executes successfully and completes and you have no other roblox-js functions this has nothing to do with the module and has to do with your personal setup which is not my concern.

ytomasch commented 6 years ago

I see, and believed this to be the case previously. Just wondered if I was missing something.

Thanks