🐛 Bug Report: SvelteKitError: Not found #343

Closed
opened 2025-10-07 00:11:22 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @lazyzyf on GitHub.

Reproduction steps

I use caddy as reverse proxy, in docker-compose.yml map ip as 8080:80,

in Caddyfile:
reverse_proxy pocketid:3000
then when login https://id.example.com/login/setup , it report error.

Image

[GIN] 2025/02/16 - 04:05:25 | 401 |       43.96µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/02/16 - 04:05:25 | 401 |       73.24µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/02/16 - 04:05:25 | 200 |     221.201µs |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/02/16 - 04:05:25 | 200 |     239.801µs |       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-Cib1QjRw.js:4706:18)
    at resolve (file:///app/frontend/build/server/chunks/index-Cib1QjRw.js:4541:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BkHu5L-C.js:34:26)
    at respond (file:///app/frontend/build/server/chunks/index-Cib1QjRw.js:4539:43) {
  status: 404,
  text: 'Not Found'
}

Expected behavior

I can creat new admin user.

Actual Behavior

report error when create new user..

https://id.example.com/login/setup

Version and Environment

v0.33

Log Output

No response

Originally created by @lazyzyf on GitHub. ### Reproduction steps I use caddy as reverse proxy, in docker-compose.yml map ip as 8080:80, in Caddyfile: reverse_proxy pocketid:3000 then when login https://id.example.com/login/setup , it report error. ![Image](https://github.com/user-attachments/assets/f9ba1622-aefa-475e-a969-26c9230191e3) ``` [GIN] 2025/02/16 - 04:05:25 | 401 | 43.96µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/02/16 - 04:05:25 | 401 | 73.24µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/02/16 - 04:05:25 | 200 | 221.201µs | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/02/16 - 04:05:25 | 200 | 239.801µs | 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-Cib1QjRw.js:4706:18) at resolve (file:///app/frontend/build/server/chunks/index-Cib1QjRw.js:4541:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BkHu5L-C.js:34:26) at respond (file:///app/frontend/build/server/chunks/index-Cib1QjRw.js:4539:43) { status: 404, text: 'Not Found' } ``` ### Expected behavior I can creat new admin user. ### Actual Behavior report error when create new user.. https://id.example.com/login/setup ### Version and Environment v0.33 ### Log Output _No response_
OVERLORD added the bug label 2025-10-07 00:11:22 +03:00
Author
Owner

@lazyzyf commented on GitHub:

Please share share your docker-compose.yml and Caddyfile.

Caddyfile:

id.example.com {
    reverse_proxy pocketid:3000
}

compose.yml

   1   │ version: "3"
   2   │ services:
   3   │   pocketid:
   4   │     container_name: pocketid
   5   │     image: ghcr.io/stonith404/pocket-id
   6   │     restart: unless-stopped
   7   │     env_file: .env
   8   │     volumes:
   9   │       - ./data:/app/backend/data
  10   │     ports:
  11   │       - 127.0.0.1:5039:80

.env

   1   │ PUBLIC_APP_URL=https://id.example.com
   2   │ TRUST_PROXY=false
   3   │ MAXMIND_LICENSE_KEY=abcde
   4   │ PUID=1000
   5   │ PGID=1000

podman logs -f:

Error: loading initial config: loading new config: http app module: start: listening on :80: listen tcp :80: bind: permission denied
Error: caddy process exited with error: exit status 1
Listening on http://0.0.0.0:3000

and

[GIN] 2025/02/16 - 20:48:23 | 401 |       35.28µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/02/16 - 20:48:23 | 401 |       65.88µs |       127.0.0.1 | GET      "/api/users/me"
Error #01: You are not signed in
[GIN] 2025/02/16 - 20:48:23 | 200 |     257.801µs |       127.0.0.1 | GET      "/api/application-configuration"
[GIN] 2025/02/16 - 20:48:23 | 200 |     282.441µs |       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-Cib1QjRw.js:4706:18)
    at resolve (file:///app/frontend/build/server/chunks/index-Cib1QjRw.js:4541:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BkHu5L-C.js:34:26)
    at respond (file:///app/frontend/build/server/chunks/index-Cib1QjRw.js:4539:43) {
  status: 404,
  text: 'Not Found'
}
@lazyzyf commented on GitHub: > Please share share your docker-compose.yml and Caddyfile. Caddyfile: ``` id.example.com { reverse_proxy pocketid:3000 } ``` compose.yml ``` 1 │ version: "3" 2 │ services: 3 │ pocketid: 4 │ container_name: pocketid 5 │ image: ghcr.io/stonith404/pocket-id 6 │ restart: unless-stopped 7 │ env_file: .env 8 │ volumes: 9 │ - ./data:/app/backend/data 10 │ ports: 11 │ - 127.0.0.1:5039:80 ``` .env ``` 1 │ PUBLIC_APP_URL=https://id.example.com 2 │ TRUST_PROXY=false 3 │ MAXMIND_LICENSE_KEY=abcde 4 │ PUID=1000 5 │ PGID=1000 ``` podman logs -f: ``` Error: loading initial config: loading new config: http app module: start: listening on :80: listen tcp :80: bind: permission denied Error: caddy process exited with error: exit status 1 Listening on http://0.0.0.0:3000 ``` and ``` [GIN] 2025/02/16 - 20:48:23 | 401 | 35.28µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/02/16 - 20:48:23 | 401 | 65.88µs | 127.0.0.1 | GET "/api/users/me" Error #01: You are not signed in [GIN] 2025/02/16 - 20:48:23 | 200 | 257.801µs | 127.0.0.1 | GET "/api/application-configuration" [GIN] 2025/02/16 - 20:48:23 | 200 | 282.441µs | 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-Cib1QjRw.js:4706:18) at resolve (file:///app/frontend/build/server/chunks/index-Cib1QjRw.js:4541:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BkHu5L-C.js:34:26) at respond (file:///app/frontend/build/server/chunks/index-Cib1QjRw.js:4539:43) { status: 404, text: 'Not Found' } ```
Author
Owner

@stonith404 commented on GitHub:

Please share share your docker-compose.yml and Caddyfile.

@stonith404 commented on GitHub: Please share share your docker-compose.yml and Caddyfile.
Author
Owner

@stonith404 commented on GitHub:

You have to do reverse_proxy pocketid:80 in your Caddyfile.

@stonith404 commented on GitHub: You have to do reverse_proxy pocketid:80 in your Caddyfile.
Author
Owner

@lazyzyf commented on GitHub:

You have to do reverse_proxy pocketid:80 in your Caddyfile.

when I do reverse_proxy pocketid:80 in my Caddyfile, I can't open the url as it's blank.
so only when I set reverse_proxy pocketid:3000 I can open the url https://id.example.com

@lazyzyf commented on GitHub: > You have to do reverse_proxy pocketid:80 in your Caddyfile. when I do reverse_proxy pocketid:80 in my Caddyfile, I can't open the url as it's blank. so only when I set reverse_proxy pocketid:3000 I can open the url https://id.example.com
Author
Owner

@stonith404 commented on GitHub:

Alright. Please set the CADDY_PORT environment variable in your .env to 3333 and in your Caddyfile use reverse_proxy pocketid:3333.

@stonith404 commented on GitHub: Alright. Please set the `CADDY_PORT` environment variable in your `.env` to `3333` and in your Caddyfile use `reverse_proxy pocketid:3333`.
Author
Owner

@lazyzyf commented on GitHub:

Great, it's working now. Thank you for your help.

@lazyzyf commented on GitHub: Great, it's working now. Thank you for your help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#343