redlib icon indicating copy to clipboard operation
redlib copied to clipboard

🐛 Bug Report: Failed to create OAuth client: expected value at line 1 column 1

Open hyperdefined opened this issue 3 months ago • 41 comments

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

hyperdefined avatar Sep 22 '25 20:09 hyperdefined

Same here.

Gui13 avatar Sep 22 '25 20:09 Gui13

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.

Sparronator9999 avatar Sep 22 '25 21:09 Sparronator9999

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...

den391 avatar Sep 22 '25 22:09 den391

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.

jeeneo avatar Sep 22 '25 22:09 jeeneo

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.

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.

hyperdefined avatar Sep 22 '25 22:09 hyperdefined

same here :-0

Image

Greatz08 avatar Sep 23 '25 02:09 Greatz08

Same, it was working fine until the second I restarted redlib.

Edit: It's working for me again too.

xnand-dot-xyz avatar Sep 23 '25 02:09 xnand-dot-xyz

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?

Sparronator9999 avatar Sep 23 '25 07:09 Sparronator9999

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?

jeeneo avatar Sep 23 '25 14:09 jeeneo

I confirm it. Its working for me again without touching anything.

den391 avatar Sep 23 '25 18:09 den391

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.

Sparronator9999 avatar Sep 24 '25 03:09 Sparronator9999

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.

hyperdefined avatar Sep 24 '25 23:09 hyperdefined

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).

Sparronator9999 avatar Sep 25 '25 01:09 Sparronator9999

Just started happening for me now

sbonkosky avatar Sep 25 '25 03:09 sbonkosky

https://github.com/user-attachments/assets/67e5132c-84ef-4014-acec-344cd0f78fdc

perdakovich avatar Sep 27 '25 23:09 perdakovich

Hi there, experiencing the exact same issue.

Miminepho avatar Oct 03 '25 05:10 Miminepho

same issue right now

lavilao avatar Oct 03 '25 19:10 lavilao

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?

beautiful-orca avatar Oct 04 '25 00:10 beautiful-orca

I'm having the same issue since yesterday

UptightGlitter avatar Oct 04 '25 00:10 UptightGlitter

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.

artemislena avatar Oct 04 '25 01:10 artemislena

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.

Greatz08 avatar Oct 04 '25 03:10 Greatz08

Wanted to selfhost it and came across the same issue :(

Splarkszter avatar Oct 04 '25 05:10 Splarkszter

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.

purple-emily avatar Oct 04 '25 08:10 purple-emily

I'm having the same issue since yesterday

Seems to have resolved itself

UptightGlitter avatar Oct 04 '25 08:10 UptightGlitter

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).

Sparronator9999 avatar Oct 04 '25 09:10 Sparronator9999

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

timkeefer1 avatar Oct 04 '25 12:10 timkeefer1

Also having this issue currently, since about 24 hours ago (I tried restarting a few times since, no luck)

grumphee avatar Oct 04 '25 13:10 grumphee

This fork works for me: https://git.ptr.moe/baalajimaestro/redlib

zoltrons avatar Oct 04 '25 17:10 zoltrons

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.

Sparronator9999 avatar Oct 04 '25 20:10 Sparronator9999

Bumping, getting these errors myself on a private instance.

Image Image

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.

BugZappa avatar Oct 04 '25 21:10 BugZappa