Git Product home page Git Product logo

Comments (24)

tacheometry avatar tacheometry commented on July 28, 2024

Can you send over the .env file you have (with the password, etc, censored, but keep the formatting) and the logs you got?

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

image
I see no logs at the moment

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

image
I see no logs at the moment

There shouldn't be any , after each line, try removing them and see if it's working

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

Oh no... it's like that in the documentation... I will fix it, thank you very much for reporting thisπŸ‘

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

Still getting the same issue, after removing these :/
image

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

Does your password have any special characters, different than a-Z 0-9, etc?

Also can you try removing the quotes and see if it works?

Also try to remove the SteamData folder each time you do a trial

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

I'll also update the package soon with an updated Steam library, maybe that fixes it...

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

Yeah it does. It has !@#$%^&*() characters

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

Hmm... maybe it's because of the way the env library handles it, see here: https://www.npmjs.com/package/dotenv#what-rules-does-the-parsing-engine-follow

Does it have spaces at the end? I don't know of other rules that'd affect this

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

No spaces at the end, its weird. Maybe I have to try with a different password? But still doesn't make sense.

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

No " \ or ' characters either?

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

In the password no

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

Ok, let's determine if this is actually caused by the password getting parsed incorrectly from the file or not...

  1. In your farmer directory, run npm i steam-hour-farmer
  2. Edit the file ./node_modules/steam-hour-farmer/index.js
  3. Right under the line
require("dotenv").config();

Insert the following so it looks like this:

require("dotenv").config();
console.log(`PASSWORD: [${process.env.PASSWORD}]`);
  1. Run the process using npx steam-hour-farmer (if you don't use npx it will use the global install which doesn't have modifications)
  2. Check if the text between the brackets matches your password EXACTLY

If it does match, then that's not the issue, and we can try with an updated library for login...

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

It does match, yes

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

Any updates?

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

Alright, I've investigated quite a bit... turns out it's not related to the password itself, at all... Steam also sends out the InvalidPassword error (error code 5) in the cases when the access token is invalid. I don't think one is being sent right now - not sure. But here's what I've observed

  • It works on my main account that uses Steam Guard (SteamDesktopAuthenticator in this case). Even when I delete the SteamData directory.
  • It doesn't work on my alt account that only has email based verification (I'm not sure, but this may be on by default), giving me the dreaded InvalidPassword error.

Currently, the CLI doesn't ask for any code received from the email (and an email isn't even being sent, because this verification isn't being requested). But running this script here as a test, this does ask for the email code. Afterwards, the outputted access token can be used for account login.

Interestingly, when I made this project, logging in was less rigorous, and I was also testing on my alt account that only had email verification. 1 month later, that changed, apparently! But I've been running steam-hour-farmer without issue, non-stop, since then. It's been almost two years...

To use steam-hour-farmer right now, you should be fine with setting up Steam Guard (I recommend SteamDesktopAuthenticator and setting SHARED_SECRET so it can re-log-in by itself without any manual intervention) and running it that way. Otherwise you can try using it again after I update it to support this method as well.

Thank you for reporting the initial issue and the sustained replies πŸ˜‰

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

Hm, thanks for the reply, I'm using Steam Guard but on mobile, could be that be the issue?

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

Shouldn't be the issue. But, are you on Windows?

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

Yes

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

Ok... now try it with the updated version. npm i -g steam-hour-farmer@latest should work. But delete everything in your folder other than the .env, and run normally.

You will also need to change USERNAME to ACCOUNT_NAME

Tell me if it works

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

Yep it worked. Thank you so much.

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

πŸ‘πŸ‘πŸ‘

On Windows, the USERNAME env variable is actually the Windows account name... so for me it was trying to log in with DevAccount (my account name) for example... I was so surprised when I found that out...

from steam-hour-farmer.

tacheometry avatar tacheometry commented on July 28, 2024

I didn't catch this initially because I made the project when I was maining Linux... disregard my other theories haha

from steam-hour-farmer.

cRestalious avatar cRestalious commented on July 28, 2024

That's interesting... Glad that it's solved now. thank you :D

from steam-hour-farmer.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.