🐛 Bug Report: Issue adding Passkey (An unknown error occurred!) ANDROID #388

Closed
opened 2025-10-08 00:06:20 +03:00 by OVERLORD · 12 comments
Owner

Originally created by @ivoarch on GitHub.

Reproduction steps

Hi I have a issue when I try to setup my accout and add a passkey.

Reproduction steps

Go to https://id.my.domain.com/login/setup add passkey and
I receive this message "An unknown error occurred!".

I use Pixel 6 Pro (Android latest), my password manager is Bitwarden .

My .env

# See the README for more information: https://github.com/stonith404/pocket-id?tab=readme-ov-file#environment-variables
PUBLIC_APP_URL=https://id.my.domain.com
TRUST_PROXY=true
MAXMIND_LICENSE_KEY=""
PUID=1000
PGID=1000

My docker-compose.yaml

services:
  pocket-id:
    image: stonith404/pocket-id 
    restart: unless-stopped
    env_file: .env
    ports:
      - "3010:80"
    volumes:
      - "./data:/app/backend/data"

My Caddyfile

id.my.domain.com {
   import logging
   reverse_proxy 12.34.56.789:3010
}

I find this issue #126 but checking I have my .env setup correctly and url address also protocol http/https match good .

Docker container only report this

pocket-id-1  | [GIN] 2025/01/20 - 12:01:14 | 200 |    5.243006ms |   194... | GET      "/api/webauthn/register/start"

Any idea?

Thanks!

Expected behavior

Add passkey success!

Actual Behavior

An unknown error occurred!

Originally created by @ivoarch on GitHub. ### Reproduction steps Hi I have a issue when I try to setup my accout and add a passkey. ## Reproduction steps Go to `https://id.my.domain.com/login/setup` add passkey and I receive this message **"An unknown error occurred!"**. I use Pixel 6 Pro (Android latest), my password manager is Bitwarden . My `.env` ``` # See the README for more information: https://github.com/stonith404/pocket-id?tab=readme-ov-file#environment-variables PUBLIC_APP_URL=https://id.my.domain.com TRUST_PROXY=true MAXMIND_LICENSE_KEY="" PUID=1000 PGID=1000 ``` My `docker-compose.yaml` ``` services: pocket-id: image: stonith404/pocket-id restart: unless-stopped env_file: .env ports: - "3010:80" volumes: - "./data:/app/backend/data" ``` My `Caddyfile` ``` id.my.domain.com { import logging reverse_proxy 12.34.56.789:3010 } ``` I find this issue #126 but checking I have my `.env` setup correctly and url address also protocol http/https match good . Docker container only report this ``` pocket-id-1 | [GIN] 2025/01/20 - 12:01:14 | 200 | 5.243006ms | 194... | GET "/api/webauthn/register/start" ``` Any idea? Thanks! ### Expected behavior Add passkey success! ### Actual Behavior An unknown error occurred!
OVERLORD added the bug label 2025-10-08 00:06:20 +03:00
Author
Owner

@stonith404 commented on GitHub:

Does it work on another device?

@stonith404 commented on GitHub: Does it work on another device?
Author
Owner

@stonith404 commented on GitHub:

Yeah please try it on a desktop and share the logs of the browser console.

@stonith404 commented on GitHub: Yeah please try it on a desktop and share the logs of the browser console.
Author
Owner

@ivoarch commented on GitHub:

Yeah please try it on a desktop and share the logs of the browser console.

Ok when I can gona try .

Until then I test so:

I go to https://passkey.org/ -> create user -> add passkey -> test passkey . Everything is setup correctly . My device and bitwarden works .

Image

@ivoarch commented on GitHub: > Yeah please try it on a desktop and share the logs of the browser console. Ok when I can gona try . Until then I test so: I go to https://passkey.org/ -> create user -> add passkey -> test passkey . Everything is setup correctly . My device and bitwarden works . ![Image](https://github.com/user-attachments/assets/d1f14322-a2e4-4736-b846-1de5d3d4de0e)
Author
Owner

@ivoarch commented on GitHub:

Does it work on another device?

I don't have other device now for try, but I test with defferent browsers and same issue .

edit: The passkey is saved correctly on my password manager but Pocket-id report a issue .

@ivoarch commented on GitHub: > Does it work on another device? I don't have other device now for try, but I test with defferent browsers and same issue . edit: The passkey is saved correctly on my password manager but Pocket-id report a issue .
Author
Owner

@myhrmans commented on GitHub:

Try adding port to your .env

PUBLIC_APP_URL=https://id.my.domain.com
TRUST_PROXY=true
MAXMIND_LICENSE_KEY=""
PUID=1000
PGID=1000
PORT=3010
@myhrmans commented on GitHub: Try adding port to your .env ``` PUBLIC_APP_URL=https://id.my.domain.com TRUST_PROXY=true MAXMIND_LICENSE_KEY="" PUID=1000 PGID=1000 PORT=3010 ```
Author
Owner

@pluja commented on GitHub:

I am experimenting the same error when using Bitwarden extension, in my case I'm on Firefox on a desktop (I also tested with Brave Browser and got the same error).

The error I'm seeing in the dev console is: Error: Invalid 'sameOriginWithAncestors' value

Here's a related issue that is already being discussed in the Bitwarden repo: https://github.com/bitwarden/clients/issues/12590

@pluja commented on GitHub: I am experimenting the same error when using Bitwarden extension, in my case I'm on Firefox on a desktop (I also tested with Brave Browser and got the same error). The error I'm seeing in the dev console is: `Error: Invalid 'sameOriginWithAncestors' value` Here's a related issue that is already being discussed in the Bitwarden repo: https://github.com/bitwarden/clients/issues/12590
Author
Owner

@stonith404 commented on GitHub:

Like a said, can you share the logs from the browser developer tools?

@stonith404 commented on GitHub: Like a said, can you share the logs from the browser developer tools?
Author
Owner

@stonith404 commented on GitHub:

@pluja Only the demo uses an iframe so the actual installation should work.

@stonith404 commented on GitHub: @pluja Only the demo uses an iframe so the actual installation should work.
Author
Owner

@ivoarch commented on GitHub:

Try adding port to your .env

PUBLIC_APP_URL=https://id.my.domain.com
TRUST_PROXY=true
MAXMIND_LICENSE_KEY=""
PUID=1000
PGID=1000
PORT=3010
docker-compose down
rm -rf data
mkdir data
echo "PORT=3010" >> .env
docker-compose up -d

Same issue!

I also try disabling the Trust Proxy, also removing protocols from the public app url and same .

@ivoarch commented on GitHub: > Try adding port to your .env > > ``` > PUBLIC_APP_URL=https://id.my.domain.com > TRUST_PROXY=true > MAXMIND_LICENSE_KEY="" > PUID=1000 > PGID=1000 > PORT=3010 > ``` ``` docker-compose down rm -rf data mkdir data echo "PORT=3010" >> .env docker-compose up -d ``` Same issue! I also try disabling the Trust Proxy, also removing protocols from the public app url and same .
Author
Owner

@ivoarch commented on GitHub:

Today I test to setup Webauth and passkey with Authentik and issue again.

I don't find where is the problem, months or two ago I used authentik with passkey added from the same device .

The strange thing is that the passkey failed only with my docker containers apps. 🙁

Then I guess it won't be a Pocket ID issue .

Any help?

@ivoarch commented on GitHub: Today I test to setup Webauth and passkey with Authentik and issue again. I don't find where is the problem, months or two ago I used authentik with passkey added from the same device . The strange thing is that the passkey failed only with my docker containers apps. 🙁 Then I guess it won't be a Pocket ID issue . Any help?
Author
Owner

@pluja commented on GitHub:

@stonith404 awesome, will try it out then

@pluja commented on GitHub: @stonith404 awesome, will try it out then
Author
Owner

@LunkSnee commented on GitHub:

I've installed on my server, and had the same issue. In the docker/caddy log it shows:

pocket-id | [GIN] 2025/01/23 - 15:37:06 | 500 | 1.900443ms | 10.1.5.117 | POST "/api/webauthn/register/finish"
pocket-id | Error #01: Error validating origin
pocket-id | [GIN] 2025/01/23 - 15:37:06 | 500 | 1.963994ms | 10.1.5.117 | POST "/api/webauthn/register/finish"
pocket-id | Error #01: Error validating origin

I had the wrong: PUBLIC_APP_URL=http://
After changing PUBLIC_APP_URL to start is https:// it worked!

@LunkSnee commented on GitHub: I've installed on my server, and had the same issue. In the docker/caddy log it shows: pocket-id | [GIN] 2025/01/23 - 15:37:06 | 500 | 1.900443ms | 10.1.5.117 | POST "/api/webauthn/register/finish" pocket-id | Error #01: Error validating origin pocket-id | [GIN] 2025/01/23 - 15:37:06 | 500 | 1.963994ms | 10.1.5.117 | POST "/api/webauthn/register/finish" pocket-id | Error #01: Error validating origin I had the wrong: PUBLIC_APP_URL=**http://** After changing PUBLIC_APP_URL to start is http**s**:// it worked!
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#388