🐛 Bug Report: Failed to create OAuth client: expected value at line 1 column 1
Describe the bug
Getting this error below when running redlib. Was running perfectly fine, now started to get this. Redlib won't start anymore, and this is all my log shows.
ERROR redlib::oauth > Failed to create OAuth client: expected value at line 1 column 1. Retrying in 5 seconds...
- [x] I checked that the instance that this was reported on is running the latest git commit, or I can reproduce it locally on the latest git commit
Same here.
Hello, I am having the same issue since this morning*, along with high CPU usage on one core (this is enough to cause my Pi's case fan to spin up until I restart redlib).
Edit: Also getting a 502 error when trying to visit the instance (it is running behind a reverse proxy).
Edit 2: Tried again after an hour, still getting this issue. Looks like Reddit blacklisted however we were creating our OAuth client.
*check my timezone if you're confused.
I also have the same issue.
ERROR redlib::oauth > Failed to create OAuth client: expected value at line 1 column 1. Retrying in 5 seconds...
can confirm, response is You've been blocked by network security (403 Forbidden) when building the OAuth token, built from latest commit a989d19 and redlib v0.36.0. occurs from more than one IP (mobile, vpn, home) so my guess reddit blacklisted one of their hardcoded values. sorry i cant be of any more help.
can confirm, response is
You've been blocked by network security(403 Forbidden) when building the OAuth token, built from latest commita989d19andredlib v0.36.0. occurs from more than one IP (mobile, vpn, home) so my guess reddit blacklisted one of their hardcoded values. sorry i cant be of any more help.
I can also add to this, I've tried to route Redlib through a few different VPNs and it was blocked, so it doesn't seem network related.
same here :-0
Same, it was working fine until the second I restarted redlib.
Edit: It's working for me again too.
Redlib has started working for me again this afternoon. Seems like they're rolling the change out, or doing this to confuse Redlib/other frontend developers?
Redlib has started working for me again this afternoon. Seems like they're rolling the change out, or doing this to confuse Redlib/other frontend developers?
interesting, can confirm its working here again for me (morning, ~10am)
edit: i remember i was trying to run the binary in Termux 2 days ago and kept getting this same error, i thought it was an issue with Termux and tried a few hours later in udocker and that seemed to "fix" it, but i guess waiting is what actually worked?
I confirm it. Its working for me again without touching anything.
I have a theory for why this issue may be occurring. Reddit may be limiting how many OAuth sessions there can be for a given IP address, and my self-hosted instance reboots fairly regularly (around once per day). When Redlib tries to create another OAuth session, it fails because of this until a session expires.
...This theory was created with almost zero knowledge of how Redlib authenticates with Reddit, so correct me if I'm wrong.
I have a theory for why this issue may be occurring. Reddit may be limiting how many OAuth sessions there can be for a given IP address, and my self-hosted instance reboots fairly regularly (around once per day). When Redlib tries to create another OAuth session, it fails because of this until a session expires.
...This theory was created with almost zero knowledge of how Redlib authenticates with Reddit, so correct me if I'm wrong.
Mine restarts every hour. Seems fine now.
Mine restarts every hour. Seems fine now.
...or it could be just Reddit testing stuff and seeing how we react (I bet there's someone watching this issue thread right now).
Just started happening for me now
https://github.com/user-attachments/assets/67e5132c-84ef-4014-acec-344cd0f78fdc
Hi there, experiencing the exact same issue.
same issue right now
For me it seems not to be network related. I'm the only one using my private home instance, so it also should not be a rate limiting issue. Changing IPv4 also does not change anything. I can also still visit reddit.com and login just fine. Just redlib fails.
Reddit is probably changing something. Is someone working on finding the cause and maybe a fix?
I'm having the same issue since yesterday
L: Same issue here since uh, like, tonight. Running through ProtonVPN after it became unusable on home IP for us a while ago. Rotating IP address doesn't seem to fix it here either. So, yeah, assume some uh, bigger backend thing changed.
Ah sh** here we go again. 2 weeks ago we faced this same exact issue. I think reddit was testing new changes previously and now they have finally implemented some pain in a** thing to stop us :-) ( I could be wrong too, they might still be testing new changes ) .
Edit : It started working after restarting local docker container 3-4 times in my case.
Wanted to selfhost it and came across the same issue :(
I had this issue around 12 hours ago. It has now resolved itself? I haven’t done anything different. Just restarted my container and it’s now working.
I'm having the same issue since yesterday
Seems to have resolved itself
I have not had any issues with my Redlib instance since other people started having issues again yesterday. This is with a restart to apply system updates that released today (possibly before more people started reporting the issue came back for them).
Now experiencing this issue as well. Restarting my container worked for a while, then failed again. Works for a while, then dies. Like other users, I'm also the sole user. This may be a really bad idea, but for now I've just added to my crontab:
*/3 * * * * docker restart redlib
That way, it'll still be up most of the time...
EDIT : Still too many errors while using it, just just restarting the container every minute with the crontab below. My container uses about 6MB of RAM and <1% of my CPU during reboot, so while this is extremely inelegant... it's better than a broken container.
* * * * * docker restart redlib
Also having this issue currently, since about 24 hours ago (I tried restarting a few times since, no luck)
This fork works for me: https://git.ptr.moe/baalajimaestro/redlib
I am now getting the "failed to parse page JSON data" error as of this morning. I think this and the OAuth client issue is correlated...
This fork works for me: https://git.ptr.moe/baalajimaestro/redlib
Hmm, that user agent update script looks quite familiar to this issue comment, which I based a new script on too. I don't think it made much of a difference to Redlib's reliability.
Bumping, getting these errors myself on a private instance.
Edit; FYI My instance is up to date using the latest quay.io/redlib/redlib:latest tag, not sure why Redlib claims i am 1 commit out of date.