Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

"Sentry" event not firing #178

Closed
Lamb3rt opened this issue Jul 3, 2015 · 5 comments
Closed

"Sentry" event not firing #178

Lamb3rt opened this issue Jul 3, 2015 · 5 comments

Comments

@Lamb3rt
Copy link

Lamb3rt commented Jul 3, 2015

As in topic. First of all, it worked up to some point and after 50-60 successful logins (I had to provide Steam Guard code each time, since I was yet grasping concept of this hash thing, but event was properly firing) it suddenly stopped firing. However it does work properly for another (years-old) account whole time, but not for my new, test one. This is important, because it shows that problem doesn't lie in my code.

I also can't register my own hash - it's ignored even if I properly call logOn method with both valid Steam Guard code and my own hash and then try to provide only hash, without code. I'm simply getting logon error 63 then.

So my first guess is that it's not a problem in node-steam, but rather something on Valve's end - but still possibility of such error could be mentioned around "logOn" method description.

@Lamb3rt
Copy link
Author

Lamb3rt commented Jul 4, 2015

I checked it now and it works properly. I had to trigger some limit on Valve's side apparently.

seishun added a commit that referenced this issue Jul 10, 2015
- Pass the whole object to support potential partial updates
- Let the user send the response for the same reason, and to prevent a
  situation where the user doesn't use sentry files and Steam hits the
  limit for registered sentries (see #178)
- Rename 'sentry' -> 'updateMachineAuth'
@seishun
Copy link
Owner

seishun commented Jul 12, 2015

You're right, it's a Steam weirdness, and these kinds of inexplicable surprises from Valve are the reason node-steam has gradually moved from trying to encapsulate the Steam protocol (like the Steam client does) to being a simple wrapper.

I've moved most of the logOn description to the wiki that anyone can edit instead of (rightfully) submitting issues when such surprises occur.

Regarding your issue, I can have a guess what happened. Whenever node-steam received a sentry, it automatically accepted it by sending a response, even though you didn't handle 'sentry'. If Steam saves all of them, it's reasonable to expect that there is a certain limit on their count. This is another reason why node-steam doesn't auto-accept sentries anymore. (see 'updateMachineAuth')

@seishun seishun closed this as completed Jul 12, 2015
@scholtzm
Copy link

scholtzm commented Jan 7, 2016

steamUser.on('updateMachineAuth', function(sentry, callback) {
  fs.writeFileSync('filename', sentry.bytes);
  callback({ sha_file: calc_sha1(sentry.bytes) });
});

calc_sha1 is a function which calculates SHA-1 checksum

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@seishun @scholtzm @Lamb3rt and others