PodFetch: Some content not working when behind Traefik reverse proxy

Describe the bug

Add a podcast (it doesn’t seem to matter which modality used, ie Apple Podcasts, Podindex or my preferred, rss feed) but the icons are not displayed for some podcasts, to clarify, if they work for a podcast series, all the episodes have the thumbnail, if it doesn’t work for a podcast series, then none of the episodes have a thumbbail.

I’m installing podfetch with docker-compose, currently on v4.0.1-16173cd2 (HEAD)

    podfetch:
        image: samuel19982/podfetch:postgres
        container_name: podfetch
        networks:
            - podfetch
            - traefik
        user: 99:100
        environment:
            - POLLING_INTERVAL=${POLLING_INTERVAL}
            - SERVER_URL=${SERVER_URL}
#            - GPODDER_INTEGRATION_ENABLED=${GPODDER_INTEGRATION_ENABLED}
            - PODINDEX_API_KEY=${PODINDEX_API_KEY}
            - PODINDEX_API_SECRET=${PODINDEX_API_SECRET}
            - DATABASE_URL=${DATABASE_URL}
            - DB_CONNECTIONS=${DB_CONNECTIONS}
        volumes:
            - ${PODCASTS}:/app/podcasts
            - ${CONFIG}/podfetch:/app/db
#        ports:
#            - 8000:8000
        restart: always
        labels:
            - "traefik.enable=true"
            - "traefik.http.routers.podfetch.middlewares=authelia@file, securityHeaders@file"

    podfetch-postgres:
        image: postgres
        container_name: podfetch-postgres
        networks:
            - podfetch
        environment:
            - POSTGRES_DB=${PODFETCH_POSTGRES_DB}
            - POSTGRES_USER=${PODFETCH_POSTGRES_USER}
            - POSTGRES_PASSWORD=${PODFETCH_POSTGRES_PASSWORD}
        volumes:
            - ${CONFIG}/podfetch-postgres:/var/lib/postgresql/data
        restart: unless-stopped

My .env file

# Podfetch

POLLING_INTERVAL=60
SERVER_URL=https://podfetch.SERVER.COM
GPODDER_INTEGRATION_ENABLED=false
PODINDEX_API_KEY=MY_API_KEY
PODINDEX_API_SECRET=MY_API_SECRET
DATABASE_URL=postgresql://podfetch:password@podfetch-postgres/podfetch
DB_CONNECTIONS=10
PODFETCH_POSTGRES_DB=podfetch
PODFETCH_POSTGRES_USER=podfetch
PODFETCH_POSTGRES_PASSWORD=password

The relevant icon file is indeed present in the folder, it doesn’t matter whether the podcast episodes are renamed or not. In the example below, I’m not renaming, but it has no effect either way.

root@server:/mnt/user/podcasts/LINUX Unplugged# ls -la
total 8
drwxr-xr-x 1 nobody users 4096 Jul 24 23:30 ./
drwxrwxrwx 1 nobody users    6 Jul 24 23:34 ../
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 0120f9a1-0f24-430b-ba74-84fd7b185b5b/
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 077a4216-c47b-47ce-8632-9201e81b6f30/
drwxr-xr-x 1 nobody users   42 Jul 24 23:30 38317c5e-8541-447c-9bdb-bdb64923deea/
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 5773516d-88a4-4eb6-95b4-d4e4ebb3bcfa/
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 684c5ff8-088f-499e-886a-50dc94731934/
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 934efe4c-9766-4c75-b842-158ad66eacf1/
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 b847af35-ad5c-4ed0-a0de-b602bded9c16/
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 bc9e23ff-dbfe-4ec1-8b63-04c2ddcc97f1/
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 d3922dbc-ffc8-4cf5-80fe-38511abd3184/
drwxr-xr-x 1 nobody users   54 Jul 24 23:30 eecdc671-ec5b-44a5-992f-346f2f2eb090/
-rw-r--r-- 1 nobody users   38 Jul 24 23:30 image.jpg

The files have the correct permissions:

root@server:/mnt/user/podcasts/LINUX Unplugged# id nobody
uid=99(nobody) gid=100(users) groups=100(users),98(nobody)

It doesn’t seem to matter whether I use Firefox or Brave and trying an incognito session doesn’t fix the issue. I’ve #ed out the podcasts down below that are unaffected.

root@server:/# docker exec -it podfetch /app/podfetch podcasts list
Debug file located at /home/rust/src/target/x86_64-unknown-linux-musl/release/build/podfetch-47ad4ae1dbcbace8/out/built.rs
Starting from command line
Podcast management
Connecting to postgresql://podfetch:Gray1-Postage-Blurry@podfetch-postgres/podfetch
Id - Name - RSS Feed
15 - Linux Action News - https://linuxactionnews.com/rss
8 - 99% Invisible - https://feeds.simplecast.com/BqbsxVfO
13 - Coder Radio - https://feeds.fireside.fm/coder/rss
#12 - Ask The Hosts - https://askthehosts.com/feed/podcast/
#10 - Linux Downtime - https://latenightlinux.com/feed/extra
16 - LINUX Unplugged - https://linuxunplugged.com/rss
#11 - Linux After Dark - https://linuxafterdark.net/feed/podcast
19 - Ask Noah Show - https://podcast.asknoahshow.com/rss
18 - Self-Hosted - https://selfhosted.show/rss
17 - Office Hours - https://www.officehours.hair/rss
#9 - Late Night Linux - https://latenightlinux.com/feed/mp3
14 - Jupiter Extras - https://extras.show/rss

Nothing is in the logs that I can see either.

Reproduction

Use docker-compose above

System Info

N/A

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 64 (61 by maintainers)

Most upvoted comments

Awesome I could finally replicate the issue. Now I can test that bug.

Closed by https://github.com/SamTV12345/PodFetch/pull/263

Confirmed as working with postgres tag.

You’re welcome. That was a lot of work and debug. But I am happy that this is finally solved. I’ll merge the branch into main so the image should be there in 10 minutes if my Mac mini doesn’t let me down 😄.

I unfortunately live in Germany where tax regulations are really strict. I did experiment with GitHub sponsors the other day but it doesn’t seem really worth the hassle. I either have to apply for an organization that itself takes a share of the money or do this on my own and create a company.

So yeah I am also fine with not taking any money. I am always happy if someone gives me a feedback - either positive or negative. So have fun with PodFetch 😃 .

@SamTV12345 Yep, pulled the dev-urlencoding tag and can confirm that the issue does indeed seem to be fixed from what I can tell.

99% Invisible is working perfectly and the thumbnails for other podcasts are now appearing correctly. (I did wonder if that was a separate issue entirely recently, but regardless it seems to be resolved)

Can I just say a big “Thank You” for your efforts to resolve this, I know it’s been an epic issue in length, it’s very much appreciated.

I did look the other day for a donation link, but I can’t see one anywhere, as I definitely owe you a beer!

@arcoast I think I solved the problem completely. Could you please checkout the dev-urlencoding tag? Try to download all sorts of podcasts and check if you can still play the episodes back.

Thanks. I’ll try to investigate why the images are not working but the podcast url does. They both have the same method applied.

So the images are currently only missing but the podcast plays just fine?

Yes, that does appear to be the case.

SERVER_URL=https://podfetch.server.com/

to

SERVER_URL=http://192.168.0.250:8000

Do you have tried it without the slash, because your other URL is also without a slash?

SERVER_URL=https://podfetch.server.com

Hi @helmut72 , yeah I’ve tried all combinations with no difference in observed behaviour, but thanks for taking a look and making suggestions!

It should not matter. I always add a slash to the url.

No worries, life gotta come first!

I’m on holiday for a week so I’ll probably not get the chance to do much for a while, but if it’s ok with you I’d like to keep trying to get it working behind traefik and I’ll post any findings I make so if anyone else comes along with a similar issue they can chip in.