Comments (24)
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.
from steam-hour-farmer.
There shouldn't be any ,
after each line, try removing them and see if it's working
from steam-hour-farmer.
Oh no... it's like that in the documentation... I will fix it, thank you very much for reporting thisπ
from steam-hour-farmer.
Still getting the same issue, after removing these :/
from steam-hour-farmer.
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.
I'll also update the package soon with an updated Steam library, maybe that fixes it...
from steam-hour-farmer.
Yeah it does. It has !@#$%^&*() characters
from steam-hour-farmer.
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.
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.
No "
\
or '
characters either?
from steam-hour-farmer.
In the password no
from steam-hour-farmer.
Ok, let's determine if this is actually caused by the password getting parsed incorrectly from the file or not...
- In your farmer directory, run
npm i steam-hour-farmer
- Edit the file
./node_modules/steam-hour-farmer/index.js
- Right under the line
require("dotenv").config();
Insert the following so it looks like this:
require("dotenv").config();
console.log(`PASSWORD: [${process.env.PASSWORD}]`);
- Run the process using
npx steam-hour-farmer
(if you don't usenpx
it will use the global install which doesn't have modifications) - 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.
It does match, yes
from steam-hour-farmer.
Any updates?
from steam-hour-farmer.
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.
Hm, thanks for the reply, I'm using Steam Guard but on mobile, could be that be the issue?
from steam-hour-farmer.
Shouldn't be the issue. But, are you on Windows?
from steam-hour-farmer.
Yes
from steam-hour-farmer.
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.
Yep it worked. Thank you so much.
from steam-hour-farmer.
πππ
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.
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.
That's interesting... Glad that it's solved now. thank you :D
from steam-hour-farmer.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steam-hour-farmer.