🐛 Bug Report: Not found: /api/one-time-access-token/setup #424

Closed
opened 2025-10-07 00:14:28 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @userbradley on GitHub.

Reproduction steps

When running the Docker container behind a proxy and HTTPS, trying to set up the app yields the below error. This is on the /login/setup URL

I have tried both in K8s, as well as docker-compose. I've tried the latest tag as well as the most recent version, but I cant seem to find any versions that do work

Expected behavior

App starts working

Actual Behavior

kubectl logs -f pocket-id-7949897f4f-r756d
Creating user and group...
Changing password for pocket-id
New password: 
passwd: password for pocket-id is unchanged
Starting frontend...
Starting backend...
Starting Caddy...
{"level":"info","ts":1735943777.3488488,"msg":"using config from file","file":"/etc/caddy/Caddyfile.trust-proxy"}
{"level":"info","ts":1735943777.3500748,"msg":"adapted config to JSON","adapter":"caddyfile"}
{"level":"info","ts":1735943777.3507493,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"warn","ts":1735943777.3509037,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
{"level":"info","ts":1735943777.3509748,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000158f80"}
{"level":"info","ts":1735943777.3511875,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1735943777.3513548,"msg":"autosaved config (load with --resume flag)","file":"/home/pocket-id/.config/caddy/autosave.json"}
{"level":"info","ts":1735943777.3513613,"msg":"serving initial configuration"}
Successfully started Caddy (pid=44) - Caddy is running in the background
{"level":"info","ts":1735943777.3557146,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/home/pocket-id/.local/share/caddy"}
{"level":"info","ts":1735943777.355926,"logger":"tls","msg":"finished cleaning storage units"}
Listening on 0.0.0.0:3000
2025/01/03 22:36:23 Updating GeoLite2 City database...
2025/01/03 22:36:24 Failed to update GeoLite2 City database: failed to download database, received HTTP 401
[GIN] 2025/01/03 - 22:39:40 | 401 |       78.25µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:40 | 401 |     102.376µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:40 | 200 |    1.847233ms |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/01/03 - 22:39:40 | 200 |    1.868364ms |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/01/03 - 22:39:41 | 401 |      65.722µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:41 | 401 |     122.585µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:41 | 200 |    2.479168ms |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/01/03 - 22:39:41 | 200 |    2.536031ms |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/01/03 - 22:39:41 | 401 |     114.322µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:41 | 401 |     184.921µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:41 | 200 |    1.805994ms |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/01/03 - 22:39:41 | 200 |    1.844402ms |       127.0.0.1 | GET      "/api/application-configuration"
SvelteKitError: Not found: /api/application-configuration/background-image
    at resolve2 (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5351:18)
    at resolve (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5184:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-4WTfaZgh.js:41:26)
    at respond (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5182:43) {
  status: 404,
  text: 'Not Found'
}
SvelteKitError: Not found: /api/application-configuration/logo
    at resolve2 (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5351:18)
    at resolve (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5184:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-4WTfaZgh.js:41:26)
    at respond (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5182:43) {
  status: 404,
  text: 'Not Found'
}
[GIN] 2025/01/03 - 22:39:41 | 401 |      27.735µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:41 | 401 |      47.744µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:41 | 200 |    1.799346ms |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/01/03 - 22:39:41 | 200 |    1.819894ms |       127.0.0.1 | GET      "/api/application-configuration"
SvelteKitError: Not found: /api/application-configuration/logo
    at resolve2 (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5351:18)
    at resolve (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5184:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-4WTfaZgh.js:41:26)
    at respond (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5182:43) {
  status: 404,
  text: 'Not Found'
}
[GIN] 2025/01/03 - 22:39:42 | 401 |      28.216µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:42 | 401 |      53.145µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/01/03 - 22:39:42 | 200 |    1.495748ms |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/01/03 - 22:39:42 | 200 |    1.516556ms |       127.0.0.1 | GET      "/api/application-configuration"
SvelteKitError: Not found: /api/one-time-access-token/setup
    at resolve2 (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5351:18)
    at resolve (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5184:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-4WTfaZgh.js:41:26)
    at respond (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5182:43) {
  status: 404,
  text: 'Not Found'
}
Originally created by @userbradley on GitHub. ### Reproduction steps When running the Docker container behind a proxy and HTTPS, trying to set up the app yields the below error. This is on the `/login/setup` URL I have tried both in K8s, as well as docker-compose. I've tried the `latest` tag as well as the most recent version, but I cant seem to find any versions that do work ### Expected behavior App starts working ### Actual Behavior ```text kubectl logs -f pocket-id-7949897f4f-r756d Creating user and group... Changing password for pocket-id New password: passwd: password for pocket-id is unchanged Starting frontend... Starting backend... Starting Caddy... {"level":"info","ts":1735943777.3488488,"msg":"using config from file","file":"/etc/caddy/Caddyfile.trust-proxy"} {"level":"info","ts":1735943777.3500748,"msg":"adapted config to JSON","adapter":"caddyfile"} {"level":"info","ts":1735943777.3507493,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]} {"level":"warn","ts":1735943777.3509037,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80} {"level":"info","ts":1735943777.3509748,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000158f80"} {"level":"info","ts":1735943777.3511875,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]} {"level":"info","ts":1735943777.3513548,"msg":"autosaved config (load with --resume flag)","file":"/home/pocket-id/.config/caddy/autosave.json"} {"level":"info","ts":1735943777.3513613,"msg":"serving initial configuration"} Successfully started Caddy (pid=44) - Caddy is running in the background {"level":"info","ts":1735943777.3557146,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/home/pocket-id/.local/share/caddy"} {"level":"info","ts":1735943777.355926,"logger":"tls","msg":"finished cleaning storage units"} Listening on 0.0.0.0:3000 2025/01/03 22:36:23 Updating GeoLite2 City database... 2025/01/03 22:36:24 Failed to update GeoLite2 City database: failed to download database, received HTTP 401 [GIN] 2025/01/03 - 22:39:40 | 401 | 78.25µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:40 | 401 | 102.376µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:40 | 200 | 1.847233ms | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/01/03 - 22:39:40 | 200 | 1.868364ms | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/01/03 - 22:39:41 | 401 | 65.722µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:41 | 401 | 122.585µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:41 | 200 | 2.479168ms | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/01/03 - 22:39:41 | 200 | 2.536031ms | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/01/03 - 22:39:41 | 401 | 114.322µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:41 | 401 | 184.921µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:41 | 200 | 1.805994ms | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/01/03 - 22:39:41 | 200 | 1.844402ms | 127.0.0.1 | GET "/api/application-configuration" SvelteKitError: Not found: /api/application-configuration/background-image at resolve2 (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5351:18) at resolve (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5184:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-4WTfaZgh.js:41:26) at respond (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5182:43) { status: 404, text: 'Not Found' } SvelteKitError: Not found: /api/application-configuration/logo at resolve2 (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5351:18) at resolve (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5184:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-4WTfaZgh.js:41:26) at respond (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5182:43) { status: 404, text: 'Not Found' } [GIN] 2025/01/03 - 22:39:41 | 401 | 27.735µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:41 | 401 | 47.744µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:41 | 200 | 1.799346ms | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/01/03 - 22:39:41 | 200 | 1.819894ms | 127.0.0.1 | GET "/api/application-configuration" SvelteKitError: Not found: /api/application-configuration/logo at resolve2 (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5351:18) at resolve (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5184:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-4WTfaZgh.js:41:26) at respond (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5182:43) { status: 404, text: 'Not Found' } [GIN] 2025/01/03 - 22:39:42 | 401 | 28.216µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:42 | 401 | 53.145µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/01/03 - 22:39:42 | 200 | 1.495748ms | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/01/03 - 22:39:42 | 200 | 1.516556ms | 127.0.0.1 | GET "/api/application-configuration" SvelteKitError: Not found: /api/one-time-access-token/setup at resolve2 (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5351:18) at resolve (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5184:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-4WTfaZgh.js:41:26) at respond (file:///app/frontend/build/server/chunks/index-J5fklbY4.js:5182:43) { status: 404, text: 'Not Found' } ```
OVERLORD added the bug label 2025-10-07 00:14:28 +03:00
Author
Owner

@userbradley commented on GitHub:

Ah right on. Not sure how I missed that, thanks!

Let me know when documentation gets underway, I am happy to assist!

@userbradley commented on GitHub: Ah right on. Not sure how I missed that, thanks! Let me know when documentation gets underway, I am happy to assist!
Author
Owner

@userbradley commented on GitHub:

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pocket-id
  namespace: pocket-id
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: pocket-id
  template:
    metadata:
      labels:
        app.kubernetes.io/name: pocket-id
    spec:
      containers:
        - name: pocket-id
          image: "stonith404/pocket-id"
          imagePullPolicy: IfNotPresent
          ports:
            - name: backend
              containerPort: 3000
              protocol: TCP
          env:
            - name: PUBLIC_APP_URL
              value: "https://pass-keys.reading"
            - name: TRUST_PROXY
              value: "true"
@userbradley commented on GitHub: Deployment ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: pocket-id namespace: pocket-id spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: pocket-id template: metadata: labels: app.kubernetes.io/name: pocket-id spec: containers: - name: pocket-id image: "stonith404/pocket-id" imagePullPolicy: IfNotPresent ports: - name: backend containerPort: 3000 protocol: TCP env: - name: PUBLIC_APP_URL value: "https://pass-keys.reading" - name: TRUST_PROXY value: "true" ```
Author
Owner

@stonith404 commented on GitHub:

You have to access Pocket ID over port 80 because on this port Caddy is listening.

@stonith404 commented on GitHub: You have to access Pocket ID over port 80 because on this port Caddy is listening.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#424