🐛 Bug Report: SvelteKitError when loading images with Caddy disabled #337

Closed
opened 2025-10-08 00:04:04 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @undaunt on GitHub.

Reproduction steps

When I attempt to replace the caddyfile with Traefik routes, I'm not able to auth new sessions of Pocket ID and images fail to load.

Expected behavior

It should load the same as when Caddy is enabled and Traefik is routing everything to port 80.

Actual Behavior

Image

Image

Version and Environment

v0.35.0

services:
  pocket-id:
    image: ghcr.io/pocket-id/pocket-id:latest
    container_name: pocket-id
    restart: unless-stopped
    profiles: ["all", "core", "login"]
    networks:
      - ${PROXY_NETWORK}
    volumes:
      - ${APPDATA_DIR}/pocket-id:/app/backend/data
    environment:
      TZ: ${TZ}
      PUID: ${PUID}
      PGID: ${PGID}
      PUBLIC_APP_URL: https://${SUB_POCKET_ID}.${DOMAINNAME}
      TRUST_PROXY: true
      MAXMIND_LICENSE_KEY: ${GEOIPUPDATE_LICENSE_KEY}
      CADDY_DISABLED: true
    labels:
      traefik.enable: true
      traefik.http.routers.pocket-id.entrypoints: https
      traefik.http.routers.pocket-id.rule: Host(`${SUB_POCKET_ID}.${DOMAINNAME}`)
      traefik.http.routers.pocket-id.middlewares: chain-base@file,private@file
      traefik.http.routers.pocket-id.service: pocket-id
      traefik.http.services.pocket-id.loadbalancer.server.port: 3000
      traefik.http.routers.pocket-id-backend.entrypoints: https
      traefik.http.routers.pocket-id-backend.rule: Host(`${SUB_POCKET_ID}.${DOMAINNAME}`) && (PathPrefix(`/api`) || PathPrefix(`/.well-known`))
      traefik.http.routers.pocket-id-backend.middlewares: chain-base@file,private@file
      traefik.http.routers.pocket-id-backend.service: pocket-id
      traefik.http.services.pocket-id-backend.loadbalancer.server.port: 8080

Log Output

General error:

2025-02-21T00:36:30.758158733Z SvelteKitError: Not found: /api/oidc/clients/a273a8ea-65d5-4ee2-9ef3-ea25d7003e2f/logo
2025-02-21T00:36:30.758179569Z     at resolve2 (file:///app/frontend/build/server/index.js:4695:18)
2025-02-21T00:36:30.758184771Z     at resolve (file:///app/frontend/build/server/index.js:4530:34)
2025-02-21T00:36:30.758188165Z     at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-DqsQPN97.js:32:26)
2025-02-21T00:36:30.758191632Z     at respond (file:///app/frontend/build/server/index.js:4528:43) {
2025-02-21T00:36:30.758194803Z   status: 404,
2025-02-21T00:36:30.758198326Z   text: 'Not Found'
2025-02-21T00:36:30.758201486Z }
2025-02-21T00:36:30.885342111Z [GIN] 2025/02/21 - 00:36:30 | 200 |     262.485µs |             ::1 | GET      "/api/users/me"
2025-02-21T00:36:30.885381496Z [GIN] 2025/02/21 - 00:36:30 | 200 |     280.138µs |             ::1 | GET      "/api/users/me"
2025-02-21T00:36:30.885952730Z [GIN] 2025/02/21 - 00:36:30 | 200 |     149.438µs |             ::1 | GET      "/api/application-configuration"
2025-02-21T00:36:30.885978103Z [GIN] 2025/02/21 - 00:36:30 | 200 |     160.442µs |             ::1 | GET      "/api/application-configuration"
2025-02-21T00:36:30.886195663Z SvelteKitError: Not found: /api/oidc/authorization-required
2025-02-21T00:36:30.886217500Z     at resolve2 (file:///app/frontend/build/server/index.js:4695:18)
2025-02-21T00:36:30.886224417Z     at resolve (file:///app/frontend/build/server/index.js:4530:34)
2025-02-21T00:36:30.886230205Z     at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-DqsQPN97.js:32:26)
2025-02-21T00:36:30.886235121Z     at respond (file:///app/frontend/build/server/index.js:4528:43)
2025-02-21T00:36:30.886240136Z     at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
2025-02-21T00:36:30.886245572Z   status: 404,
2025-02-21T00:36:30.886250598Z   text: 'Not Found'
2025-02-21T00:36:30.886255699Z }
2025-02-21T00:36:30.890000031Z [GIN] 2025/02/21 - 00:36:30 | 200 |     214.368µs |             ::1 | GET      "/api/users/me"
2025-02-21T00:36:30.890019202Z [GIN] 2025/02/21 - 00:36:30 | 200 |     225.249µs |             ::1 | GET      "/api/users/me"
2025-02-21T00:36:30.890583305Z [GIN] 2025/02/21 - 00:36:30 | 200 |     144.127µs |             ::1 | GET      "/api/application-configuration"
2025-02-21T00:36:30.890601922Z [GIN] 2025/02/21 - 00:36:30 | 200 |     153.002µs |             ::1 | GET      "/api/application-configuration"
2025-02-21T00:36:30.891110321Z SvelteKitError: Not found: /api/users/me/profile-picture.png
2025-02-21T00:36:30.891128202Z     at resolve2 (file:///app/frontend/build/server/index.js:4695:18)
2025-02-21T00:36:30.891132507Z     at resolve (file:///app/frontend/build/server/index.js:4530:34)
2025-02-21T00:36:30.891135641Z     at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-DqsQPN97.js:32:26)
2025-02-21T00:36:30.891138748Z     at respond (file:///app/frontend/build/server/index.js:4528:43) {
2025-02-21T00:36:30.891141696Z   status: 404,
2025-02-21T00:36:30.891144783Z   text: 'Not Found'
2025-02-21T00:36:30.891147836Z }

Login failure:

2025-02-21T00:40:00.426868401Z [GIN] 2025/02/21 - 00:40:00 | 200 |     151.869µs |             ::1 | GET      "/api/application-configuration"
2025-02-21T00:40:00.427061315Z SvelteKitError: Not found: /api/oidc/authorization-required
2025-02-21T00:40:00.427076239Z     at resolve2 (file:///app/frontend/build/server/index.js:4695:18)
2025-02-21T00:40:00.427081152Z     at resolve (file:///app/frontend/build/server/index.js:4530:34)
2025-02-21T00:40:00.427086583Z     at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-DqsQPN97.js:32:26)
2025-02-21T00:40:00.427092301Z     at respond (file:///app/frontend/build/server/index.js:4528:43)
2025-02-21T00:40:00.427098041Z     at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
2025-02-21T00:40:00.427104376Z   status: 404,
2025-02-21T00:40:00.427117770Z   text: 'Not Found'
2025-02-21T00:40:00.427147291Z }
Originally created by @undaunt on GitHub. ### Reproduction steps When I attempt to replace the caddyfile with Traefik routes, I'm not able to auth new sessions of Pocket ID and images fail to load. ### Expected behavior It should load the same as when Caddy is enabled and Traefik is routing everything to port 80. ### Actual Behavior ![Image](https://github.com/user-attachments/assets/c91e5a80-7f0b-4fd2-bc4c-6b681c5e9bf0) ![Image](https://github.com/user-attachments/assets/b06d033f-5047-432d-96b5-42b53b988850) ### Version and Environment v0.35.0 ``` services: pocket-id: image: ghcr.io/pocket-id/pocket-id:latest container_name: pocket-id restart: unless-stopped profiles: ["all", "core", "login"] networks: - ${PROXY_NETWORK} volumes: - ${APPDATA_DIR}/pocket-id:/app/backend/data environment: TZ: ${TZ} PUID: ${PUID} PGID: ${PGID} PUBLIC_APP_URL: https://${SUB_POCKET_ID}.${DOMAINNAME} TRUST_PROXY: true MAXMIND_LICENSE_KEY: ${GEOIPUPDATE_LICENSE_KEY} CADDY_DISABLED: true labels: traefik.enable: true traefik.http.routers.pocket-id.entrypoints: https traefik.http.routers.pocket-id.rule: Host(`${SUB_POCKET_ID}.${DOMAINNAME}`) traefik.http.routers.pocket-id.middlewares: chain-base@file,private@file traefik.http.routers.pocket-id.service: pocket-id traefik.http.services.pocket-id.loadbalancer.server.port: 3000 traefik.http.routers.pocket-id-backend.entrypoints: https traefik.http.routers.pocket-id-backend.rule: Host(`${SUB_POCKET_ID}.${DOMAINNAME}`) && (PathPrefix(`/api`) || PathPrefix(`/.well-known`)) traefik.http.routers.pocket-id-backend.middlewares: chain-base@file,private@file traefik.http.routers.pocket-id-backend.service: pocket-id traefik.http.services.pocket-id-backend.loadbalancer.server.port: 8080 ``` ### Log Output General error: ``` 2025-02-21T00:36:30.758158733Z SvelteKitError: Not found: /api/oidc/clients/a273a8ea-65d5-4ee2-9ef3-ea25d7003e2f/logo 2025-02-21T00:36:30.758179569Z at resolve2 (file:///app/frontend/build/server/index.js:4695:18) 2025-02-21T00:36:30.758184771Z at resolve (file:///app/frontend/build/server/index.js:4530:34) 2025-02-21T00:36:30.758188165Z at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-DqsQPN97.js:32:26) 2025-02-21T00:36:30.758191632Z at respond (file:///app/frontend/build/server/index.js:4528:43) { 2025-02-21T00:36:30.758194803Z status: 404, 2025-02-21T00:36:30.758198326Z text: 'Not Found' 2025-02-21T00:36:30.758201486Z } 2025-02-21T00:36:30.885342111Z [GIN] 2025/02/21 - 00:36:30 | 200 | 262.485µs | ::1 | GET "/api/users/me" 2025-02-21T00:36:30.885381496Z [GIN] 2025/02/21 - 00:36:30 | 200 | 280.138µs | ::1 | GET "/api/users/me" 2025-02-21T00:36:30.885952730Z [GIN] 2025/02/21 - 00:36:30 | 200 | 149.438µs | ::1 | GET "/api/application-configuration" 2025-02-21T00:36:30.885978103Z [GIN] 2025/02/21 - 00:36:30 | 200 | 160.442µs | ::1 | GET "/api/application-configuration" 2025-02-21T00:36:30.886195663Z SvelteKitError: Not found: /api/oidc/authorization-required 2025-02-21T00:36:30.886217500Z at resolve2 (file:///app/frontend/build/server/index.js:4695:18) 2025-02-21T00:36:30.886224417Z at resolve (file:///app/frontend/build/server/index.js:4530:34) 2025-02-21T00:36:30.886230205Z at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-DqsQPN97.js:32:26) 2025-02-21T00:36:30.886235121Z at respond (file:///app/frontend/build/server/index.js:4528:43) 2025-02-21T00:36:30.886240136Z at process.processTicksAndRejections (node:internal/process/task_queues:105:5) { 2025-02-21T00:36:30.886245572Z status: 404, 2025-02-21T00:36:30.886250598Z text: 'Not Found' 2025-02-21T00:36:30.886255699Z } 2025-02-21T00:36:30.890000031Z [GIN] 2025/02/21 - 00:36:30 | 200 | 214.368µs | ::1 | GET "/api/users/me" 2025-02-21T00:36:30.890019202Z [GIN] 2025/02/21 - 00:36:30 | 200 | 225.249µs | ::1 | GET "/api/users/me" 2025-02-21T00:36:30.890583305Z [GIN] 2025/02/21 - 00:36:30 | 200 | 144.127µs | ::1 | GET "/api/application-configuration" 2025-02-21T00:36:30.890601922Z [GIN] 2025/02/21 - 00:36:30 | 200 | 153.002µs | ::1 | GET "/api/application-configuration" 2025-02-21T00:36:30.891110321Z SvelteKitError: Not found: /api/users/me/profile-picture.png 2025-02-21T00:36:30.891128202Z at resolve2 (file:///app/frontend/build/server/index.js:4695:18) 2025-02-21T00:36:30.891132507Z at resolve (file:///app/frontend/build/server/index.js:4530:34) 2025-02-21T00:36:30.891135641Z at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-DqsQPN97.js:32:26) 2025-02-21T00:36:30.891138748Z at respond (file:///app/frontend/build/server/index.js:4528:43) { 2025-02-21T00:36:30.891141696Z status: 404, 2025-02-21T00:36:30.891144783Z text: 'Not Found' 2025-02-21T00:36:30.891147836Z } ``` Login failure: ``` 2025-02-21T00:40:00.426868401Z [GIN] 2025/02/21 - 00:40:00 | 200 | 151.869µs | ::1 | GET "/api/application-configuration" 2025-02-21T00:40:00.427061315Z SvelteKitError: Not found: /api/oidc/authorization-required 2025-02-21T00:40:00.427076239Z at resolve2 (file:///app/frontend/build/server/index.js:4695:18) 2025-02-21T00:40:00.427081152Z at resolve (file:///app/frontend/build/server/index.js:4530:34) 2025-02-21T00:40:00.427086583Z at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-DqsQPN97.js:32:26) 2025-02-21T00:40:00.427092301Z at respond (file:///app/frontend/build/server/index.js:4528:43) 2025-02-21T00:40:00.427098041Z at process.processTicksAndRejections (node:internal/process/task_queues:105:5) { 2025-02-21T00:40:00.427104376Z status: 404, 2025-02-21T00:40:00.427117770Z text: 'Not Found' 2025-02-21T00:40:00.427147291Z } ```
OVERLORD added the bug label 2025-10-08 00:04:04 +03:00
Author
Owner

@stonith404 commented on GitHub:

There must be something wrong with your Traefik configuration so it's not really a bug of Pocket ID. I'm converting this to a discussion.

@stonith404 commented on GitHub: There must be something wrong with your Traefik configuration so it's not really a bug of Pocket ID. I'm converting this to a discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#337