sentanos / roblox-js

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

joinGroup Captcha #60

Open Neztore opened 6 years ago

Neztore commented 6 years ago

It throws the following error regardless of which account I use and which group I try to join.

Unhandled rejection Error: Failed to join group, verify that you have enough group space
    at C:\Users\Josh\node_modules\roblox-js\lib\group\joinGroup.js:17:13
    at tryCatcher (C:\Users\Josh\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\Josh\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\Josh\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\Users\Josh\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\Users\Josh\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (C:\Users\Josh\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (C:\Users\Josh\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (C:\Users\Josh\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

Code:

var username = "" //These values were removed for this issue
var password = ""
var rbx = require('roblox-js');
rbx.login(username, password)
.then(function () {
console.log("Successfully logged in with account " + username);
process.on('uncaughtException', err => {
  log(err.stack);
});

var promise = rbx.joinGroup(group);
promise.then(function (res) {

console.log('User ' + username + 'Successfully joined group ' + group);

});

});
sentanos commented 6 years ago

You are not waiting for the login to complete before doing joinGroup and are executing it when there is no user logged in. Put joinGroup in the promise:

rbx.login(username, password)
.then(function () {
  console.log('Logged in');
  rbx.joinGroup(group)
  .then(function () {
    console.log('Joined group');
  });
});
Neztore commented 6 years ago

Oops. Stupid mistake. Sorry for wasting your time.

Neztore commented 6 years ago

Error still persists, even using your code. I do have enough group space.

sentanos commented 6 years ago

It looks like ROBLOX has changed the API for joining groups in order to also add captcha to joining groups in order to prevent bots. As such this it is not a priority to update the API because it will be useless anyways as long as captcha is enforced.