Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next Auth fetch failed #913

Open
1 task done
lukanvanderlinde opened this issue Jan 20, 2025 · 1 comment
Open
1 task done

Next Auth fetch failed #913

lukanvanderlinde opened this issue Jan 20, 2025 · 1 comment
Labels
question Further information is requested

Comments

@lukanvanderlinde
Copy link

lukanvanderlinde commented Jan 20, 2025

Describe the Bug

I'm seeing this error on the logs:

hoarder | [next-auth][error][CLIENT_FETCH_ERROR]
hoarder | https://next-auth.js.org/errors#client_fetch_error fetch failed {
hoarder | error: {
hoarder | message: 'fetch failed',
hoarder | stack: 'TypeError: fetch failed\n' +
hoarder | ' at node:internal/deps/undici/undici:13484:13\n' +
hoarder | ' at process.processTicksAndRejections (node:internal/process/task_queues:105:5)',
hoarder | name: 'TypeError'
hoarder | },
hoarder | url: 'https://hoarder.homeserver.lukan.rocks/api/auth/providers',
hoarder | message: 'fetch failed'
hoarder | }

Steps to Reproduce

I'm just trying to login.

My compose file:
`
secrets:
hoarder_nextauth:
file: $DOCKER_SECRETS_DIR/hoarder_nextauth
meili_master_key:
file: $DOCKER_SECRETS_DIR/meili_master_key

services:
hoarder:
container_name: hoarder
image: ghcr.io/hoarder-app/hoarder:release
restart: unless-stopped
security_opt:
- no-new-privileges:true
volumes:
- $DOCKER_DATA_DIR/hoarder:/data
secrets:
- hoarder_nextauth
- meili_master_key
environment:
TZ: $TZ
DATA_DIR: /data
DISABLE_SIGNUPS: true
NEXTAUTH_SECRET: /run/secrets/hoarder_nextauth
NEXTAUTH_URL: https://hoarder.homeserver.lukan.rocks
MEILI_ADDR: http://meilisearch:7700
MEILI_MASTER_KEY: /run/secrets/meili_master_key
BROWSER_WEB_URL: http://chrome:9222
# OPENAI_API_KEY: look ollama implementation
depends_on:
- traefik
- chrome
- meilisearch
networks:
- traefik-proxy
labels:
- traefik.enable=true
- traefik.http.routers.hoarder-router.rule=Host(hoarder.homeserver.lukan.rocks)
- traefik.http.routers.hoarder-router.entrypoints=web,websecure
- traefik.http.routers.hoarder-router.tls=true
- traefik.http.routers.hoarder-router.tls.certresolver=letsencrypt
- traefik.http.routers.hoarder-router.service=hoarder-service
- traefik.http.services.hoarder-service.loadbalancer.server.port=3000

chrome:
container_name: chrome
image: gcr.io/zenika-hub/alpine-chrome:123
restart: unless-stopped
security_opt:
- no-new-privileges:true
depends_on:
- traefik
networks:
- traefik-proxy
command:
- --no-sandbox
- --disable-gpu
- --disable-dev-shm-usage
- --remote-debugging-address=0.0.0.0
- --remote-debugging-port=9222
- --hide-scrollbars

meilisearch:
container_name: meilisearch
image: getmeili/meilisearch:v1.11.1
restart: unless-stopped
security_opt:
- no-new-privileges:true
depends_on:
- traefik
networks:
- traefik-proxy
volumes:
- $DOCKER_DATA_DIR/meilisearch:/meili_data
secrets:
- meili_master_key
environment:
MEILI_NO_ANALYTICS: true
MEILI_MASTER_KEY: /run/secrets/meili_master_key`

Expected Behaviour

Not have this error.

Screenshots or Additional Context

No response

Device Details

Ubuntu Server with Docker Compose

Exact Hoarder Version

:latest sha256:0a947528917e1cd6055943affb7c2476ca7efd4a01f386bda59f13eee155c85c

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
@MohamedBassem
Copy link
Collaborator

This was fixed in the nightly build. Given that you are already on nightly maybe try updating?

If not, you can also try adding:

NEXTAUTH_URL_INTERNAL=http://localhost:3000

in the env file and this error will disappear.

@MohamedBassem MohamedBassem added the question Further information is requested label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants