🐛 Bug Report: Cannot setup initial passkey #229

Closed
opened 2025-10-09 16:33:49 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @DeltaLaboratory on GitHub.

Reproduction steps

  • Create pocketid server
  • Try to setup initial account

Expected behavior

Account created and sign in smoothly

Actual Behavior

Got An unknown error occurred. Please try to sign in again.,
And looking browser console, found following log

TypeError: Cannot read properties of undefined (reading 'allowCredentials')
    at D (CX8HSG55.js:1:1910)
    at HTMLButtonElement.B (8.CB_SYT5N.js:1:3736)

Which is part of

    !e.optionsJSON && e.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),
    e = {
        optionsJSON: e
    });
    const {optionsJSON: t, useBrowserAutofill: n=!1, verifyBrowserAutofillInput: l=!0} = e;
    if (!b())
        throw new Error("WebAuthn is not supported in this browser");
    let c;
    ((f = t.allowCredentials) == null ? void 0 : f.length) !== 0 && (c = (w = t.allowCredentials) == null ? void 0 : w.map(E)); <- here
    const d = {
        ...t,
        challenge: S(t.challenge),
      

Version and Environment

Edge 136.0.3240.64 (Official build) (64-bit)
PocketID v0.53

Log Output

pocket-id-1  | Creating user and group...
pocket-id-1  | Starting frontend...
pocket-id-1  | Starting backend...
pocket-id-1  | Starting Caddy...
pocket-id-1  | 2025/05/13 05:32:02 MAXMIND_LICENSE_KEY environment variable is empty. The GeoLite2 City database won't be updated.
pocket-id-1  | {"level":"info","ts":1747114322.3502047,"msg":"using config from file","file":"/etc/caddy/Caddyfile.trust-proxy"}
pocket-id-1  | {"level":"info","ts":1747114322.351508,"msg":"adapted config to JSON","adapter":"caddyfile"}
pocket-id-1  | {"level":"info","ts":1747114322.3523147,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
pocket-id-1  | {"level":"warn","ts":1747114322.352443,"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}
pocket-id-1  | {"level":"info","ts":1747114322.3525388,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0005abf00"}
pocket-id-1  | {"level":"info","ts":1747114322.3527682,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
pocket-id-1  | {"level":"info","ts":1747114322.352934,"msg":"autosaved config (load with --resume flag)","file":"/app/backend/data/.config/caddy/autosave.json"}
pocket-id-1  | {"level":"info","ts":1747114322.352942,"msg":"serving initial configuration"}
pocket-id-1  | {"level":"info","ts":1747114322.3538494,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/app/backend/data/.local/share/caddy"}
pocket-id-1  | {"level":"info","ts":1747114322.3542137,"logger":"tls","msg":"finished cleaning storage units"}
pocket-id-1  | 2025/05/13 05:32:02 Starting job scheduler
pocket-id-1  | 2025/05/13 05:32:02 Server listening on 0.0.0.0:8080
pocket-id-1  | Listening on http://0.0.0.0:3000
pocket-id-1  | [GIN] 2025/05/13 - 05:32:07 | 204 |       2.553µs |             ::1 | GET      "/healthz"
pocket-id-1  | [GIN] 2025/05/13 - 05:32:07 | 204 |      50.229µs |             ::1 | GET      "/healthz"
pocket-id-1  | [GIN] 2025/05/13 - 05:32:07 | 401 |      62.142µs |             ::1 | GET      "/api/users/me"
pocket-id-1  | Error #01: You are not signed in
pocket-id-1  | [GIN] 2025/05/13 - 05:32:07 | 401 |     101.158µs |             ::1 | GET      "/api/users/me"
pocket-id-1  | Error #01: You are not signed in
pocket-id-1  | [GIN] 2025/05/13 - 05:32:07 | 200 |     188.722µs |             ::1 | GET      "/api/application-configuration"
pocket-id-1  | [GIN] 2025/05/13 - 05:32:07 | 200 |     224.779µs |             ::1 | GET      "/api/application-configuration"
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 401 |      51.693µs |             ::1 | GET      "/api/users/me"
pocket-id-1  | Error #01: You are not signed in
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 401 |      96.212µs |             ::1 | GET      "/api/users/me"
pocket-id-1  | Error #01: You are not signed in
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 200 |      82.583µs |             ::1 | GET      "/api/application-configuration"
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 200 |     114.424µs |             ::1 | GET      "/api/application-configuration"
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 401 |      35.208µs |             ::1 | GET      "/api/users/me"
pocket-id-1  | Error #01: You are not signed in
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 401 |      76.121µs |             ::1 | GET      "/api/users/me"
pocket-id-1  | Error #01: You are not signed in
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 200 |      68.332µs |             ::1 | GET      "/api/application-configuration"
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 200 |      99.412µs |             ::1 | GET      "/api/application-configuration"
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 401 |      31.991µs |             ::1 | GET      "/api/users/me"
pocket-id-1  | Error #01: You are not signed in
pocket-id-1  | [GIN] 2025/05/13 - 05:32:09 | 401 |       71.84µs |             ::1 | GET      "/api/users/me"
Originally created by @DeltaLaboratory on GitHub. ### Reproduction steps - Create pocketid server - Try to setup initial account ### Expected behavior Account created and sign in smoothly ### Actual Behavior Got `An unknown error occurred. Please try to sign in again.`, And looking browser console, found following log ``` TypeError: Cannot read properties of undefined (reading 'allowCredentials') at D (CX8HSG55.js:1:1910) at HTMLButtonElement.B (8.CB_SYT5N.js:1:3736) ``` Which is part of ``` !e.optionsJSON && e.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e }); const {optionsJSON: t, useBrowserAutofill: n=!1, verifyBrowserAutofillInput: l=!0} = e; if (!b()) throw new Error("WebAuthn is not supported in this browser"); let c; ((f = t.allowCredentials) == null ? void 0 : f.length) !== 0 && (c = (w = t.allowCredentials) == null ? void 0 : w.map(E)); <- here const d = { ...t, challenge: S(t.challenge), ``` ### Version and Environment Edge 136.0.3240.64 (Official build) (64-bit) PocketID v0.53 ### Log Output ``` pocket-id-1 | Creating user and group... pocket-id-1 | Starting frontend... pocket-id-1 | Starting backend... pocket-id-1 | Starting Caddy... pocket-id-1 | 2025/05/13 05:32:02 MAXMIND_LICENSE_KEY environment variable is empty. The GeoLite2 City database won't be updated. pocket-id-1 | {"level":"info","ts":1747114322.3502047,"msg":"using config from file","file":"/etc/caddy/Caddyfile.trust-proxy"} pocket-id-1 | {"level":"info","ts":1747114322.351508,"msg":"adapted config to JSON","adapter":"caddyfile"} pocket-id-1 | {"level":"info","ts":1747114322.3523147,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]} pocket-id-1 | {"level":"warn","ts":1747114322.352443,"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} pocket-id-1 | {"level":"info","ts":1747114322.3525388,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0005abf00"} pocket-id-1 | {"level":"info","ts":1747114322.3527682,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]} pocket-id-1 | {"level":"info","ts":1747114322.352934,"msg":"autosaved config (load with --resume flag)","file":"/app/backend/data/.config/caddy/autosave.json"} pocket-id-1 | {"level":"info","ts":1747114322.352942,"msg":"serving initial configuration"} pocket-id-1 | {"level":"info","ts":1747114322.3538494,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/app/backend/data/.local/share/caddy"} pocket-id-1 | {"level":"info","ts":1747114322.3542137,"logger":"tls","msg":"finished cleaning storage units"} pocket-id-1 | 2025/05/13 05:32:02 Starting job scheduler pocket-id-1 | 2025/05/13 05:32:02 Server listening on 0.0.0.0:8080 pocket-id-1 | Listening on http://0.0.0.0:3000 pocket-id-1 | [GIN] 2025/05/13 - 05:32:07 | 204 | 2.553µs | ::1 | GET "/healthz" pocket-id-1 | [GIN] 2025/05/13 - 05:32:07 | 204 | 50.229µs | ::1 | GET "/healthz" pocket-id-1 | [GIN] 2025/05/13 - 05:32:07 | 401 | 62.142µs | ::1 | GET "/api/users/me" pocket-id-1 | Error #01: You are not signed in pocket-id-1 | [GIN] 2025/05/13 - 05:32:07 | 401 | 101.158µs | ::1 | GET "/api/users/me" pocket-id-1 | Error #01: You are not signed in pocket-id-1 | [GIN] 2025/05/13 - 05:32:07 | 200 | 188.722µs | ::1 | GET "/api/application-configuration" pocket-id-1 | [GIN] 2025/05/13 - 05:32:07 | 200 | 224.779µs | ::1 | GET "/api/application-configuration" pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 401 | 51.693µs | ::1 | GET "/api/users/me" pocket-id-1 | Error #01: You are not signed in pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 401 | 96.212µs | ::1 | GET "/api/users/me" pocket-id-1 | Error #01: You are not signed in pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 200 | 82.583µs | ::1 | GET "/api/application-configuration" pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 200 | 114.424µs | ::1 | GET "/api/application-configuration" pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 401 | 35.208µs | ::1 | GET "/api/users/me" pocket-id-1 | Error #01: You are not signed in pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 401 | 76.121µs | ::1 | GET "/api/users/me" pocket-id-1 | Error #01: You are not signed in pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 200 | 68.332µs | ::1 | GET "/api/application-configuration" pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 200 | 99.412µs | ::1 | GET "/api/application-configuration" pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 401 | 31.991µs | ::1 | GET "/api/users/me" pocket-id-1 | Error #01: You are not signed in pocket-id-1 | [GIN] 2025/05/13 - 05:32:09 | 401 | 71.84µs | ::1 | GET "/api/users/me" ```
OVERLORD added the bug label 2025-10-09 16:33:49 +03:00
Author
Owner

@DeltaLaboratory commented on GitHub:

Yeah, it seems proxy configuration problem.
After I changed port to 80, it worked.
Thank you for help!

@DeltaLaboratory commented on GitHub: Yeah, it seems proxy configuration problem. After I changed port to 80, it worked. Thank you for help!
Author
Owner

@Illuminati-Cow commented on GitHub:

Out of curiosity, since I experienced a similar issue on my first attempt setting this up, is your app URL correct? It should exactly match the URL you are using in your browser. Additionally, if you are using Traefik or another reverse proxy, make sure that it is pointing to port 80 rather than port 3000. If none of this was relevant to you, then it is likely another configuration error.

Edit: You should also provide more information about how you are hosting Pocket ID (Docker, native, etc.) and some details of the network configuration, such as if it is behind a reverse proxy.

@Illuminati-Cow commented on GitHub: Out of curiosity, since I experienced a similar issue on my first attempt setting this up, is your app URL correct? It should exactly match the URL you are using in your browser. Additionally, if you are using Traefik or another reverse proxy, make sure that it is pointing to port 80 rather than port 3000. If none of this was relevant to you, then it is likely another configuration error. Edit: You should also provide more information about how you are hosting Pocket ID (Docker, native, etc.) and some details of the network configuration, such as if it is behind a reverse proxy.
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-2#229