Closed kblade07 closed 4 years ago
this happens when you already try to set it up and fail then you redo it on a different location.
And what is the reason of failing or the fix? There's nothing wrong with my accounts.
Wow - I gotta say - thank you so much for providing so much information! That's really great ngl
So let me try to conclude what's happening here: As it seems we basically have 2-3 problems.
1: When logging in, providing a steamGuard can throw the error that the account is already logged on. 2/3 accounts still log in, so I assume the failing account wasn't the one you provided the steamGuard code for?
2:
Having an account that got skipped or an account that failed to be logged in always corrupts the config.json somehow.
Edit: Problem wasn't the steamGuard but simultaneous writes on startup.
(3: The readyAfter time can be negative when an account fails to log in and one account fails to comment with an unknown error (probably not something I can fix as it comes from steam's side))
Please correct me if I listed something wrong here as this is will be my path to troubleshoot this problem. I'm very glad that you provided so much information as this may help me to fix the config corruption error as it's something a few people encountered in the last days.
And what exactly do you mean with
this happens when you already try to set it up and fail then you redo it on a different location.
? @effex1337
The folder location shouldn't make a difference. But if it does please correct me. Although be sure that the folder isn't a .zip
anymore because this could be problematic.
Oh and btw, don't try without any steamGuard as this will cause an error because you need to have at least the email steam guard configured in order to comment on any profile.
@HerrEurobeat Hello. So I have some informations, unfortunately Ive lost one of the screenshots.
First step Ive added accounts with steam guard enabled only on email. I added 4 of them The bot asked me for steamguard code for account #0 and it worked good. Then the bot asked for the guard code for account #1 with PRESS ENTER TO SKIP. Ive typed the code and how else I can confirm the code other than pressing ENTER? So I guess it skipped or something. Ive got the Already logged in error, you can see it in the screenshots above. After that error, the bot never asked for steam guard for account #2 and #3 but they logged in. All comments were sent
But when I close the CMD and try to start the bot again, I get random errors related to the config.json. Everytime I need to delete the config.json and re extract it even though nothing has changed in it. So it is related to the steam guard code.
How can I bypass the press ENTER to SKIP? I think this is messing something up in the config because accounts can login and they work good after I delete the config json and I re edit it.
Thanks for finding out more information. The steamGuard skip option works a bit different but could still be part of the issue.
The first account always needs to be logged in and therefore has no Press Enter To Skip
option shown.
Every other account that needs steamGuard can be skipped if you press Enter when the input is empty. As soon as you type something and press Enter it will accept your input.
The bot doesn't need to ask for codes for the other two accounts when they were already been successfully logged in by the bot at some point in the past.
You can't disable the skip option that easy, you would have to go into my code and remove it. You can only enable automatic steam guard skipping in the config.
But we can note down that something steam guard code related corrupts the config and therefore can be considered as bug.
Hm, looks like only the second account is always getting the error, which is account #1 in the list. Even if I switch accounts, for example make #3 to #0 or #2 to #1, only the #1 account will give the Already logged in error and then it will mess up the config.json file.
So the corruption error is always caused by the bot1
account in logininfo.json
? I hope thats not only now the case...
I will delete the folder and reinstall the bot so I can make sure it was not a 1 time only error.
Installing the bot. Bot started. No errors, even though I deleted the bot and reinstalled it in another folder, no steamguard was required.
Everything worked good, 4 out of 4 commets were added, chat commands worked until !restart, this happened:
Trying to start again with node start.js
After a new config.json file was created, everything returned to normal. Unfortunately I cannot replicate the steamguard because the bot is not asking me for a steamguard even though I deleted the original folder and reinstalled it, and I don't have any more accounts to test with.
So as far as I see, the fix was always to create a new config.json file because the current one will always be corupted even though there is nothing changed in it, when trying to re edit it.
So I did some testing, installed the bot from scratch and walked through my code to find problematic writes. I sucessfully managed to get my config to corrupt itself right when booting the first time.
If you are interested in the reason:
The bot checks the config and writes to it two times right when booting.
The first check deletes removed config values from older versions. This for example includes the version value which is now stored in data.json
but is still required on GitHub so that older versions recognize that there is an update available.
The second check detects if the bot is not running on one of my machines but still includes my ownerid and owner link in the config. This is the why I didn't notice the bug.
Since these two checks are writing in a very close time frame of each other the file gets corrupted because both write processes have different versions of the file.
The error/crash then occured on restart because the bot was trying to read from it. If you would have left the bot running for a longer period of time it would probably have also crashed.
The fix was to just remove the version remove write as the bot is either way going to write changes at some point and removing the value is not really that important. I'm going to release a new version since you were not the only one to experience this bug/crash/problem.
I'm still not sure if the steam guard already logged on "bug" is also related to something in my code but since it doesn't seem to be crashing the bot etc. I will "ignore" that for now.
Thanks again for finding the bug, providing so much context, screenshots and information! I will leave this issue open until I released 2.6.4.
Edit: Need to figure out a good way to save config at some point otherwise the removed config values will never be saved. (Yeah I tried to use writeFile as few as possible)
Thank you so much for going through this and finding the fix!
Hello bro how fix this error [Bot 1] postUserComment error: Error: The settings on this account do not allow you to add comments.
@sparkdz
Seems like one of you accounts is limited, Im not sure if limited accounts can post comments at all now (even if friends), maybe I am wrong. Also, maybe your profile is private or your comment section is set on Friends Only and you dont have the bots as friends.
all accounts free
Please always open a new issue when your error isn't the same as the one found in this issue. Nevertheless thanks @kblade07 for already answering with the most likely reason. I listed all errors I know of here: https://github.com/HerrEurobeat/steam-comment-service-bot/wiki/Errors,-FAQ-&-Common-problems
In your case since you said all accounts are free, you are probably trying to comment with limited accounts and you aren't friends with all of them. Limited accounts can only comment on your profile when you are friend with them. Please read more about it on the wiki page I linked above.
(Hopefully) fixed in commit 6c06b31. Please try it out, it worked fine for me.
Error/Element that doesn't work Please include the full error you get or if you get none, describe precisely what happened. I have this issue where my accounts are not used anywhere else but onle the first one can login with steam guard. After the login error, I have a config.json error in which case I need to replace the file with a new one.
Additional information Please add any other information here if you have some.
After trying to restart it
Every time it will give a random error when crashing but 2/3 bots are sending comments, but not all 3 at once. The #0 bot will always comment while the #1 and #2 will alternate.
Should I try bots without steamguard at all?