401 Unauthorized on API GET
Closed this issue · 8 comments
Describe the bug
I'm attempting to use PodFetch for the first time, using the latest Docker image, Postgres docker-compose file.
When attempting to search iTunes for a podcast string ("serial"), browser is attempting to make a connection to http://192.168.0.1:8000/api/v1/podcasts/0/serial/search and receiving a 401 Unauthorized error. I've also attempted to add a RSS URL with similar results.
I originally tried accessing PodFetch using Nginx reverse proxy (server.domain.com/podfetch) with the same issue, but am now attempting to use server IP and port.
docker-compose.yaml (actual password has been replaced w/PASSWORD):
version: '3'
services:
podfetch:
image: samuel19982/podfetch:postgres
user: ${UID:-1000}:${GID:-1000}
ports:
- "8000:8000"
environment:
- POLLING_INTERVAL=300
- SERVER_URL=http://192.168.0.1:8000
- DATABASE_URL=postgresql://postgres:PASSWORD@postgres/podfetch
- DB_CONNECTIONS=10
- BASIC_AUTH=true
- USERNAME=pfadmin
- PASSWORD=PASSWORD
volumes:
- ./podcasts:/app/podcasts
restart: unless-stopped
postgres:
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-PASSWORD}
PGDATA: /data/postgres
POSTGRES_DB: ${POSTGRES_DB:-podfetch}
volumes:
- postgres:/data/postgres
restart: unless-stopped
volumes:
postgres:
Reproduction
Use docker-compose.yaml above.
System Info
Version
v4.2.2-ec8a4924 (HEAD)
Commit
v4.2.2-ec8a4924 (HEAD)
CI build
No CI platform
Build date
Sun, 5 Nov 2023 20:33:24 +0000
Branch
HEAD
OS
linux
Used Package Manager
n/a
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.
Thanks for the issue. So to clarify the podcasts name is string ("serial")? I'll have a look at it.
It takes a significant amount of time (10+ minutes) before browser developer tools shows an error. Until that point, UI displays the spinning circle and browser developer tools shows the API call as "pending".
Attempting to add RSS URL ("https://rss.art19.com/doughboys") and the browser developer tools shows a "pending" call to "http://192.168.0.1:8000/api/v1/podcast/feed":
@acbee That is very weird. Do you have the correct UID and GID setup in the docker-compose? PodFetch works even on an old Raspberry Pi 3 very well. So there must be an issue with your configuration. Can you access iTunes fast?
I've confirmed that the UID and GID used matches my user account. The folder where docker-compose file is located is owned by my user and group. I've also tried various ports such as 80, 8000, 8080, etc. with the same results. I've also tried using the root UID and GID. All of this on my Ubuntu 20.04 server.
I tried using almost the exact same docker-compose file on my Mac (UID and GID were updated only) and it works there!
What is iTunes fast?
I decided to delete all docker content from my system (containers, volumes, images, etc.), remove docker, and reinstall. Using the exact same docker-compose file and changing no other settings, PodFetch is now working!
Great that this is solved 😄