luisisito Posted September 26, 2023 Report Posted September 26, 2023 (edited) Hi, I'm trying to build a steam bot everything was going well until I had the need to integrate the bot to two different backends on the same VPS. This means that I have to log in twice with the same public IP, I was reading about it and supposedly this can be done without problems by modifying the logonID parameter at each login, however, although I do this when I log in for the second time in the another backend of the same VPS immediately the first session gives me the error "Revoked" which is 26 of eResult. I am using version 5.0.1 of node-steam-user and here is the simple code that repeats the problem: const SteamUser = require('steam-user'); const client = new SteamUser(); const username = 'your_steam_username'; const password = 'your_steam_password'; const authCode = 'xxxxx'; const ONLINE_INTERVAL = 5 * 60 * 1000; client.logOn({ accountName: username, password: password, authCode, logonID: Math.random() * 100000000, }); client.on('loggedOn', () => { console.log('Logged into Steam'); setInterval(() => { client.setPersona(SteamUser.EPersonaState.Online); }, ONLINE_INTERVAL); }); client.on('error', (err) => { console.log(`Error: ${err.message} ${err.eresult}`); //OUTPUT IF I RUN 2ND INSTANCE: //Error: Revoked 26 }); Thanks in advance for any solution. Edited September 26, 2023 by luisisito Quote
Dr. McKay Posted September 26, 2023 Report Posted September 26, 2023 I've never seen Revoked come through the error event, it should be LogonSessionReplaced for this issue. That said, logonID might not be working for you because it's supposed to be an integer, but Math.random() * 100000000 will instead return a float. You should round it with Math.floor(). luisisito 1 Quote
luisisito Posted September 26, 2023 Author Report Posted September 26, 2023 (edited) Ok, I removed this code in one backend setInterval(() => { client.setPersona(SteamUser.EPersonaState.Online); }, ONLINE_INTERVAL); And now is working fine. It's weird why setting the status in both instances throws Revoked. Anyways my problem is solved thanks for your time and I apologize for this simple issue. Edited September 26, 2023 by luisisito Quote
LinkerH Posted September 29, 2023 Report Posted September 29, 2023 Logging in to the same two accounts at the same time will cause a code 6 LoggedInElsewhere error. How did you solve it? Quote
Recommended Posts
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.