Jump to content


Photo
Question

Accepting confirmations on different machines.

node.js node-steamcommunity

  • Please log in to reply
5 replies to this topic

#1 anazyka

anazyka

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 28 May 2016 - 04:30 AM

Hi all,

 

I'm trying to setup node-steamcommunity to accept trade offers from my VPS.

 

I just copied simple script from node-steam-tradeoffer-manager:

steam.login(logOnOptions, function(err, sessionID, cookies, steamguard) {
    if (err) {
        console.log("Steam login fail: " + err.message);
        process.exit(1);
    }

    fs.writeFile('steamguard.txt', steamguard);

    console.log("Logged into Steam");

    manager.setCookies(cookies, function(err) {
        if (err) {
            console.log(err);
            process.exit(1); // Fatal error since we couldn't get our API key
            return;
        }

        console.log("Got API key: " + manager.apiKey);
    });

    steam.startConfirmationChecker(5000, config.sharedSecret); // Checks and accepts confirmations every 30 seconds
});

It works on my local machine (windows 10) - bot is able to accept confirmations.

 

I tried to run this on my VPS (debian) but I'm still getting error:

 

Can't check confirmations: It looks like your Steam Guard Mobile Authenticator is providing incorrect Steam Guard codes. This could be caused by an inaccurate clock or bad timezone settings on your device. If your time settings are correct, it could be that a different device has been set up to provide the Steam Guard codes for your account, which means the authenticator on this device is no longer valid.

fake

I checked every issue on github, every post on forum but still don't know what is going on.

 

On my VPS and local computer I have the same time. I tried to modify time on my vpsy with: " date -s "5 seconds ago"" and " date -s "5 seconds" but it doesn't work.

 

VPS is located in France, my local computer is located in Poland. I also tried with dedicated server from online.de, problem still exists.

 

I added:

console.log(SteamTotp.time());

to my script and I see the same timestamp on both machines.

 

Guys - could you help me?

 



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,140 posts

Posted 28 May 2016 - 02:55 PM

That error means that either your secret is wrong or your clock is wrong. If you're using the same code and the same secret on both machines, then the time must be wrong on the VPS.



#3 cookie

cookie

    Advanced Member

  • Member
  • PipPipPip
  • 62 posts

Posted 30 May 2016 - 12:17 AM

if you're running linux do run these commands

rm /etc/localtime

ln -sf /usr/share/zoneinfo/GMT /etc/localtime


#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,140 posts

Posted 30 May 2016 - 03:15 AM

 

if you're running linux do run these commands

rm /etc/localtime

ln -sf /usr/share/zoneinfo/GMT /etc/localtime

 

Don't do this. Timezones don't matter.



#5 cookie

cookie

    Advanced Member

  • Member
  • PipPipPip
  • 62 posts

Posted 30 May 2016 - 03:39 AM

Don't do this. Timezones don't matter.

 

When changing Timezones the hours will be deducted/added to the clock but not the seconds, so he'll have to synchronize it himself 


Edited by cookie, 30 May 2016 - 03:47 AM.


#6 banned

banned

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 06 June 2016 - 12:44 AM

steam.startConfirmationChecker(5000, config.sharedSecret);

Shouldnt you be passing it identity secret and not shared secret?
  • banned likes this





Also tagged with one or more of these keywords: Question, node.js, node-steamcommunity

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users