3urobeat / steam-comment-service-bot

📡 The most advanced Steam Account Manager Bot with mass coordinated comments/likes/favs/follows and plugin support
https://steamcommunity.com/id/3urobeatscommentbot
GNU General Public License v3.0
274 stars 40 forks source link

Accounts can get stuck in relog queue, soft-locking the bot #139

Closed 3urobeat closed 2 years ago

3urobeat commented 2 years ago

Describe the bug An account looses connection, queues for a relog but never manages to relog again, clogging up the relog queue. This results in no account being able to relog anymore, basically soft-locking the bot.

Full error In this case an error actually occurred, however accounts can also just get stuck at "Trying to relog..." without any explicit errors in the log.

[2022-10-25 23:01:04 | INFO] [Bot 5] Lost connection to Steam. Reason: Error: NoConnection
[2022-10-25 23:01:04 | INFO] [Bot 5] Initiating a relog in 30 seconds.
...
[2022-10-25 23:01:34 | INFO] [Bot 5] Queueing for a relog. 0 other accounts are waiting...
...
[2022-10-25 23:01:35 | INFO] [Bot 5] It is now my turn. Waiting 2.5 seconds before attempting to relog...
[2022-10-25 23:01:38 | INFO] [Bot 5] Trying to relog with proxy 5...
[2022-10-25 23:01:38 | INFO] [Bot 5] No token found in tokens.db. Logging in with credentials to get a new session...
[2022-10-25 23:02:01 | WARN] Error: Proxy connection timed out while trying to log in bot5. Retrying in 5 seconds...
...

Additional context This bug is known for quite some time now, however I'm experiencing it a lot more since 2.12.1 which is way I'm now creating a dedicated issue for it.

3urobeat commented 2 years ago

This particular issue could be linked to the new login system. It looks like it is possible that the sessionHandler gets a 2FA code request from Steam even though one was supplied, leading to the "impossible error message" being shown. Relog only problem?

A force progressing system after 60 seconds of an account being stuck should still be implemented. Implement a temporary solution with a second array for now and store a "relogStartTimestamp" in the bot object later in 2.13 as a better solution.
Push account to the back of the queue. If account gets stuck again, retry one last time and skip account if it still does not work.

3urobeat commented 2 years ago

Another observation:
Accounts encountering an error while relogging won't start another attempt because relogAccount() (which is called by the steam-user error event) ignores the request as the account is already in the relog queue.
This is likely what happened in the log excerpt from above as well.

3urobeat commented 2 years ago

This issue should be fixed now. A forceRelogProgression system is still being implemented in #141

3urobeat commented 2 years ago

This issue should now be fixed.
I'm leaving it open until version 2.12.2 is out on the master branch.

3urobeat commented 2 years ago

Version 2.12.2 is now out on the master branch and fixes this issue.
See the release notes here.