Skip to content

Program exits if login fails #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
darkost12 opened this issue Nov 6, 2024 · 7 comments
Open

Program exits if login fails #28

darkost12 opened this issue Nov 6, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@darkost12
Copy link
Contributor

Looks like the program failed to log in. Can we retry login attempts until one succeeds?

[2024-11-05 23:00:00 | INFO] [___] Lost connection to Steam. Error: NoConnection. Trying to relog in 15 seconds...
[2024-11-05 23:00:00 | DEBUG] Logging playtime for '___' to playtime.txt...
[2024-11-05 23:00:16 | INFO] [___] It is now my turn. Relogging in 2 seconds...
[2024-11-05 23:00:18 | DEBUG] [___] getToken(): Created new object for token request
[2024-11-05 23:00:18 | INFO] [___] Found valid token until '2025-05-24 02:56:02 (GMT time)' in tokens.db! Logging in with it to reuse session...
[2024-11-05 23:00:18 | INFO] [___] Logging in...
Goodbye!
@3urobeat
Copy link
Owner

3urobeat commented Nov 6, 2024

Hey, thanks for opening an issue.

Which version are you on? Judging from the log excerpt this seems to be happening on a relog (not on initial login).
In Version 1.10 a bug was fixed where the bot could exit/give up while trying to log in on a relog.

@darkost12
Copy link
Contributor Author

Hey, thanks for opening an issue.

Which version are you on? Judging from the log excerpt this seems to be happening on a relog (not on initial login). In Version 1.10 a bug was fixed where the bot could exit/give up while trying to log in on a relog.

Hi.
Yes, it was relog after steam server maintenance I suppose. It's version 1.10

@3urobeat
Copy link
Owner

Sooooooooooo
I have been running the project (at latest commit) for almost a month now on my server. The script relogs once every day (because of my internet provider assigning me a new IP) and hasn't crashed a single time.

I'm sadly a bit clueless on what may cause this issue as I can't reproduce it. Are you still experiencing it?

@darkost12
Copy link
Contributor Author

@3urobeat
Hi. I couldn't reproduce it either. I've pulled updates several times after your updates. So I probably was missing something. I'll comment here or file a new issue if I encounter anything. Thanks for your work

@3urobeat
Copy link
Owner

Thanks for the response!
I'm going to close this issue for now then, please reopen should you encounter this issue again. Thanks!

@darkost12
Copy link
Contributor Author

@3urobeat Hi.
Previously I've made sure I have the last version of program, set the container with idler on automatic restart and let it be. Worked like a charm non-stop for a few months. Today I've noticed that several games in recently played games lack about 125 hours. Started to research the logs and found this in journalctl. Container info showed the restart about 5 and a half days ago.

[container_name]: [2025-03-04 22:59:53 | INFO] [___] Lost connection to Steam. Error: NoConnection. Trying to relog in 15 seconds...
[container_name]: [2025-03-04 22:59:53 | DEBUG] Logging playtime for '___' to playtime.txt...
[container_name]: [2025-03-04 23:00:09 | INFO] [___] It is now my turn. Relogging in 2 seconds...
[container_name]: [2025-03-04 23:00:11 | DEBUG] [___] getToken(): Created new object for token request
[container_name]: [2025-03-04 23:00:11 | INFO] [___] Found valid token until ___ in tokens.db! Logging in with it t>
[container_name]: [2025-03-04 23:00:11 | INFO] [___] Logging in...
[container_name]: Goodbye!
podman[...]: 2025-03-04 23:03:22.689904655 +0000 UTC m=+0.036999614 container died [hash]
podman[...]: 2025-03-04 23:03:22.694993865 +0000 UTC m=+0.042088807 container restart [hash]
systemd[...]: Started libcrun container.
podman[...]: 2025-03-04 23:03:22.828282535 +0000 UTC m=+0.175377493 container init [hash]
podman[...]: 2025-03-04 23:03:22.841290347 +0000 UTC m=+0.188385280 container start [hash]
[container_name]: [2025-03-04 23:03:22 | INFO] steam-idler by 3urobeat v1.10
[container_name]: [ | ] [2025-03-04 23:03:22 | INFO] Checking for an available update...

The weirdest part is that only a few games which are at the top of my config got affected and lost playtime. The rest of them have normal 330+

@3urobeat 3urobeat reopened this Mar 11, 2025
@3urobeat 3urobeat added the bug Something isn't working label Mar 11, 2025
@3urobeat
Copy link
Owner

So the bot can still rarely exit during login, damn.

After all of this I had started an instance on my server on the 2024-11-25 and after 3,5 months it's still going strong - no restarts. It's also running in a container (but docker instead of podman, though that shouldn't make a difference I think).
I can't comment on game hours because I did not set any game ids for my instance, the account just appears as online.

I had another user complain last week that the bot would exit for them at random times. They were using a cheap VPS, switched to somewhere else and haven't encountered any issues so far. The idea here was that something may have been killing the process from the outside.

Regarding the mismatched hours - can we be sure that Steam isn't interfering? Like I doubt that they are testing an experimental idler detection buuuut idk? Otherwise this must be a bug in setting playinggames after a relog I guess. Either in the bot itself or in the library (though unlikely).

I really have no clue right now. I'll take a look at some point, maybe I can think of anything else. If anything new comes up, please update the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants