redlib icon indicating copy to clipboard operation
redlib copied to clipboard

🐛 Bug Report: Couldn't send request to Reddit: error trying to connect: dns error: failed to lookup address information: Name does not resolve

Open millionsofplayers opened this issue 2 years ago • 18 comments

Describe the bug

I can't use redlib because this error pops up instead of the front page

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Go to a redlib instance
  2. get the error

What's the expected behavior?

To be able to see the front page

Additional context / screenshot

On other instances it works fine, but for some reason when I paste my preferences from one of the instances affected by this into a working one it makes the error happen there too

millionsofplayers avatar May 30 '24 05:05 millionsofplayers

Direct links to posts work (and subreddits too) it's just the front page I think

millionsofplayers avatar May 30 '24 05:05 millionsofplayers

Same here. What does help for me is clearing cache and cookies for redlib. Then the front page works again.

rndmh3ro avatar May 30 '24 06:05 rndmh3ro

It does work now, I'll have to resub to some subreddits though

millionsofplayers avatar May 30 '24 06:05 millionsofplayers

Same here, I cleared cache and cookies and it started working again. I re-subscribed to the subreddits I was inrerested in, reloaded the page and the problem happened again...

marcogiorgio avatar May 30 '24 07:05 marcogiorgio

I was getting the same error on 0.31.0. I just installed the latest 0.34.0, and it's working again without clearing cache or cookies.

dave0003 avatar May 30 '24 07:05 dave0003

I was getting the same error on 0.31.0. I just installed the latest 0.34.0, and it's working again without clearing cache or cookies.

Thanks for letting me know... I'll wait for the latest tag to be updated to 0.34 then

marcogiorgio avatar May 30 '24 08:05 marcogiorgio

I've cleared the cache and still getting the issue.

reterkha avatar May 30 '24 09:05 reterkha

the problem seems only happened on home page when subscribe to 2+ subreddit (subscribe to a single sub doesn't cause this, nor does go to each sub separately)

braboobssiere avatar May 30 '24 11:05 braboobssiere

the problem seems only happened on home page when subscribe to 2+ subreddit (subscribe to a single sub doesn't cause this, nor does go to each sub separately)

Getting the same issue and checked the pihole logs to analyze the requested domain(s). The DNS resolution logs show two attempts to resolve domain oauth.reddit.comhttps with 3 (NXDOMAIN) responses, which occur after successfully requesting the domain oauth.reddit.com (visiting home/index page)

This might be related. Has anyone observed similar behavior?

lightr4in avatar May 30 '24 11:05 lightr4in

For anyone else who uses Docker and would rather not wait for the prebuilt image to get updated to 0.34.0, this Dockerfile got me up and running:

FROM alpine:3.20.0

RUN apk add --no-cache wget

RUN wget https://github.com/redlib-org/redlib/releases/latest/download/redlib && \
    mv redlib /usr/local/bin/ && \
    chmod +x /usr/local/bin/redlib

RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
USER redlib

# Tell Docker to expose port 8080
EXPOSE 8080

# Run a healthcheck every minute to make sure redlib is functional
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1

CMD ["redlib"]

Hope it helps someone!

lilacpixel avatar May 30 '24 16:05 lilacpixel

The catsarch instance (https://redlib.catsarch.com, @ v0.33) fixes the problem for me.

7LRX avatar May 30 '24 17:05 7LRX

Now I'm getting Failed to parse page JSON data: expected value at line 1 column 1 on posts and Failed to parse page JSON data: expected value at line 2 column 5 on subreddits

millionsofplayers avatar May 30 '24 20:05 millionsofplayers

@millionsofplayers see https://github.com/redlib-org/redlib/issues/118.

Silvenga avatar May 30 '24 20:05 Silvenga

This error was fixed in main by v0.33, closing!

sigaloid avatar May 30 '24 22:05 sigaloid

Sadly this issue reappeared again .

Iliageorgiev avatar Jun 18 '24 18:06 Iliageorgiev

Please update to the latest docker container so you get the updated error page when you run into this error. I can't reproduce this especially not with more debug info.

See https://github.com/redlib-org/redlib/issues/131#issuecomment-2179316596

sigaloid avatar Jun 20 '24 11:06 sigaloid

Fixed! Sorry about the delay. Couldn't tell it was the multi sub causing this

sigaloid avatar Jun 25 '24 23:06 sigaloid

Weirdly this happens when you ask for some misformed requests but I added an additional more informative error page in 0f7eba717e5ec478ed4e78f7ba9e638b59962d42.

sigaloid avatar Jun 29 '24 02:06 sigaloid