Closed Phaethonix closed 1 month ago
Did you try refreshing? :stuck_out_tongue_winking_eye:
If this occurs repeatedly it seems like a one-off error with the token, a container restart should fix it
Has happened twice on my public instance, have to restart the container to fix it, not the most ideal. In the logs it seems to force a refresh properly a few times then at some point stops being able to.
Hm, are there any relevant logs? Try setting RUST_LOG=redlib=trace
as an environment variable
I’ll set the env variable and wait to see if it happens again. Thanks.
I believe I'm occasionally getting this followed by the countdown for a token refresh.
I haven't confirmed that it actually gives the "OAuth token has expired" as it keeps getting picked up by uptime monitoring stuff, but I saw that behavior appear shortly after the problem was initially fixed so I'm assuming it's still the same issue.
If Redlib is left running it starts working for about ~5 minutes after the token refreshes and then goes back to being rate limited and counting down to the next token refresh. A restart fixes the issue until it pops up again, not sure of the exact frequency but it's happened to both of my Redlib containers now.
I don't have any helpful logs to share yet but I just figured I'd chime in and add in that it's happening to me as well.
I'll enable that RUST_LOG=redlib=trace
you mentioned and see if I can capture something useful next time it happens.
Alright got some relevant logs.
Sep 24 09:54:42 TRACE redlib::oauth > Skipping refresh token roll over, already in progress
Sep 24 09:54:42 ERROR redlib::utils > Error page rendered: Reddit rate limit exceeded. Try refreshing in a few seconds.Rate limit will reset in: 317
Sep 24 09:54:42 TRACE redlib::client > Ratelimit remaining: Header says 0.0, we have 65524. Resets in 317. Rollover: yes. Ratelimit used: 100
Sep 24 09:54:41 TRACE redlib::oauth > Skipping refresh token roll over, already in progress
Sep 24 09:54:41 ERROR redlib::utils > Error page rendered: Reddit rate limit exceeded. Try refreshing in a few seconds.Rate limit will reset in: 318
Sep 24 09:54:41 TRACE redlib::client > Ratelimit remaining: Header says 0.0, we have 65525. Resets in 318. Rollover: yes. Ratelimit used: 100
Sep 24 09:54:41 TRACE redlib::client > Ratelimit remaining: Header says 0.0, we have 65529. Resets in 319. Rollover: yes. Ratelimit used: 100
Sep 24 09:54:40 TRACE redlib::oauth > Skipping refresh token roll over, already in progress
Sep 24 09:54:40 ERROR redlib::utils > Error page rendered: Reddit rate limit exceeded. Try refreshing in a few seconds.Rate limit will reset in: 319
Sep 24 09:54:40 TRACE redlib::client > Ratelimit remaining: Header says 0.0, we have 65527. Resets in 319. Rollover: yes. Ratelimit used: 100
Sep 24 09:54:40 TRACE redlib::oauth > Skipping refresh token roll over, already in progress
Sep 24 09:54:40 TRACE redlib::client > Ratelimit remaining: Header says 0.0, we have 65528. Resets in 319. Rollover: yes. Ratelimit used: 100
Sep 24 09:54:40 TRACE redlib::client > Ratelimit remaining: Header says 1.0, we have 65530. Resets in 319. Rollover: yes. Ratelimit used: 99
Sep 24 09:54:40 TRACE redlib::client > Ratelimit remaining: Header says 2.0, we have 65531. Resets in 319. Rollover: yes. Ratelimit used: 98
Sep 24 09:54:40 TRACE redlib::client > Ratelimit remaining: Header says 3.0, we have 65532. Resets in 320. Rollover: yes. Ratelimit used: 97
Sep 24 09:54:38 ERROR redlib::utils > Error page rendered: Nothing here
Sep 24 09:54:38 TRACE redlib::client > Ratelimit remaining: Header says 4.0, we have 65533. Resets in 322. Rollover: yes. Ratelimit used: 96
Sep 24 09:54:37 TRACE redlib::client > Ratelimit remaining: Header says 5.0, we have 65534. Resets in 322. Rollover: yes. Ratelimit used: 95
Sep 24 09:54:37 TRACE redlib::client > Ratelimit remaining: Header says 6.0, we have 0. Resets in 322. Rollover: yes. Ratelimit used: 94
Sep 24 09:54:37 TRACE redlib::client > Ratelimit remaining: Header says 8.0, we have 2. Resets in 322. Rollover: yes. Ratelimit used: 92
Sep 24 09:54:37 TRACE redlib::client > Ratelimit remaining: Header says 7.0, we have 1. Resets in 322. Rollover: yes. Ratelimit used: 93
Sep 24 09:54:37 TRACE redlib::client > Ratelimit remaining: Header says 9.0, we have 3. Resets in 322. Rollover: yes. Ratelimit used: 91
Shortly after Redlib was automatically restarted, so it never got to run the timer out and regenerate the token.
I see (even though the logs are oddly in reverse order lol). Basically the token task probably failed and got stuck on, so all the atomics are just cycling through (header count, currently restarting bool, etc).
Thanks for the detailed logs, I can start working on a fix!
Just merged a PR that should theoretically fix it if the problem is that a lingering background token refresh had a one-off fail. If it's a more persistent failure, there's some other ideas floating around in my head that I'll turn into code.
Anyway, I'll close this for now - if you see this again, please feel free to reopen it.
Describe the bug
as the name suggest they are not the whole lot else on the page
Steps to reproduce the bug
Open any tab
What's the expected behavior?
open normal site
Additional context / screenshot