Jump to content
McKay Development

Error: Already logged on, cannot log on again


Recommended Posts

Posted

Can someone help me why i get this error if i want to logOn on 3 accounts with delay?

The first accounts logs in normally but the second and the third says that they are already logged on:

(node:5748) UnhandledPromiseRejectionWarning: Error: Already logged on, cannot log on again
    at C:\Users\user1\AppData\Roaming\npm\node_modules\steam-user\components\logon.js:23:10
    at processTicksAndRejections (internal/process/task_queues.js:75:11)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5748) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5748) [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.
  Object.keys(logininfo).forEach((k, i) => {
    setTimeout(() => {
        var logOnOptions = {
            accountName: logininfo[k][0],
            password: logininfo[k][1],
            promptSteamGuardCode: false
        };
        try {
          bot.logOn(logOnOptions, i);
        } catch (error) {
          console.log(error)
        }
    }, 5000 * i);
})

 

Posted
46 minutes ago, neverhood said:

you need new instance of steam-user (bot in this case) for each account

Okay got it work now thanks!

But i got one more question how can i logOff a specific instance?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...