mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-05 00:39:38 +03:00
🐛 Bug Report: Unable to add an additional or edit an existing Callback URL #490
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joshuaevans9807 on GitHub (Sep 29, 2025).
Reproduction steps
In the container logs, its saying:
Sep 29 10:32:59 ERR Request with errors: Error #01: invalid field app=pocket-id version=1.11.2 status=500 method=PUT path=/api/oidc/clients/d9a4f019-471d-470c-8d97-f924517335f9 query="" route=/api/oidc/clients/:id ip=176.186.142.77 latency=10.613509ms referer=https://<PocketID URL>/settings/admin/oidc-clients/<OIDC Client App ID> user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" body_size=32Expected behavior
I should be able to add multiple callback urls without errors
Actual Behavior
I get a error saying Something went wrong
In the container logs, its saying:
Sep 29 10:32:59 ERR Request with errors: Error #01: invalid field app=pocket-id version=1.11.2 status=500 method=PUT path=/api/oidc/clients/d9a4f019-471d-470c-8d97-f924517335f9 query="" route=/api/oidc/clients/:id ip=176.186.142.77 latency=10.613509ms referer=https://<PocketID URL>/settings/admin/oidc-clients/<OIDC Client App ID> user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" body_size=32Pocket ID Version
1.11.2
Database
PostgreSQL 17.4
OS and Environment
PocketID Host: Docker 28.04.0 installed on a Ubuntu Server 24.04.3 virtual machine.
Client: Windows 11 24H2
Log Output
Sep 29 10:32:59 ERR Request with errors: Error #01: invalid field app=pocket-id version=1.11.2 status=500 method=PUT path=/api/oidc/clients/d9a4f019-471d-470c-8d97-f924517335f9 query="" route=/api/oidc/clients/:id ip=176.186.142.77 latency=10.613509ms referer=https://<PocketID URL>/settings/admin/oidc-clients/<OIDC Client App ID> user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" body_size=32@stonith404 commented on GitHub (Sep 30, 2025):
Have you ever executed a database command manually, to resolve a migration issue for example? Because it seems like your database schema isn't correct.
@joshuaevans9807 commented on GitHub (Sep 30, 2025):
I think i did when there was issues with 1.11.0 and recently when upgrading to the latest as it said i had a dirty database migration
Is there a way to fix the database schema or will I have to re-set it back up?
@stonith404 commented on GitHub (Sep 30, 2025):
You can try the following commands, but please make a backup first in case something goes wrong.
@joshuaevans9807 commented on GitHub (Oct 4, 2025):
Managed to do this today. I ran the above and now getting this
Oct 4 08:59:39 ERR Failed to run pocket-id app=pocket-id version=1.11.2 error="failed to initialize database: failed to run migrations: failed to apply embedded migrations: migration failed in line 0: ALTER TABLE public.audit_logs\n DROP CONSTRAINT IF EXISTS audit_logs_user_id_fkey,\n ADD CONSTRAINT audit_logs_user_id_fkey\n FOREIGN KEY (user_id) REFERENCES public.users (id) ON DELETE CASCADE;\n\nALTER TABLE public.oidc_authorization_codes\n ADD CONSTRAINT oidc_authorization_codes_client_fk\n FOREIGN KEY (client_id) REFERENCES public.oidc_clients (id) ON DELETE CASCADE; (details: ERROR: constraint \"oidc_authorization_codes_client_fk\" for relation \"oidc_authorization_codes\" already exists (SQLSTATE 42710))" Oct 4 08:59:40 INF Pocket ID is starting app=pocket-id version=1.11.2 Oct 4 08:59:40 INF Connected to database app=pocket-id version=1.11.2 provider=postgres Oct 4 08:59:40 ERR Failed to run pocket-id app=pocket-id version=1.11.2 error="failed to initialize database: failed to run migrations: failed to apply embedded migrations: Dirty database version 20250822000000. Fix and force version."@stonith404 commented on GitHub (Oct 6, 2025):
It seems that this migration has already been applied. Please run the following command and then restart Pocket ID:
If it fails again after restarting with the same error, just repeat the steps: Run the above command and restart Pocket ID.
@joshuaevans9807 commented on GitHub (Oct 6, 2025):
Okay it seems like we are getting somewhere.
Now getting "permission denied to create extension citext"
Many Thanks
Joshua Evans
On Monday, 6 October 2025 at 07:31, Elias Schneider @.***> wrote:
@stonith404 commented on GitHub (Oct 9, 2025):
The Postgres user you are using for Pocket ID doesn't have the permissions to create a CITEXT extension. You either have to give the permissions to the Postgres user you are using for Pocket ID or use the root user.
@joshuaevans9807 commented on GitHub (Oct 11, 2025):
Thanks for that. So i have sorted the extension piece and we are back to having it actually load. However tried to add the extra OIDC URL again and same issue. I have upgraded to 1.13.1 and same issue as well
Oct 11 09:06:16 ERR Request with errors: Error #01: invalid field app=pocket-id version=1.13.1 status=500 method=POST path=/api/oidc/clients query="" route=/api/oidc/clients ip=92.27.161.50 latency=9.917646ms referer=https://login.myhomenetworks.com/settings/admin/oidc-clients user_agent="Mozilla/5.0 (iPad; CPU OS 18_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1" body_size=32Oct 11 09:06:21 ERR Request with errors: Error #01: invalid field app=pocket-id version=1.13.1 status=500 method=POST path=/api/oidc/clients query="" route=/api/oidc/clients ip=92.27.161.50 latency=6.745565ms referer=https://login.myhomenetworks.com/settings/admin/oidc-clients user_agent="Mozilla/5.0 (iPad; CPU OS 18_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1" body_size=32@joshuaevans9807 commented on GitHub (Oct 11, 2025):
Interesting behavior i have just witnessed. Seems like i am also having issues with the My Apps section with the same error
@stonith404 commented on GitHub (Oct 12, 2025):
Oh ok it seems like your missing one more migration 😅. Please run the following queries:
@joshuaevans9807 commented on GitHub (Oct 12, 2025):
Gave that a go and seems like those columns are already there
@stonith404 commented on GitHub (Oct 20, 2025):
I'm not really sure what's going on with the database schema, but it seems messed up. If you don't have much data, it might be easiest to set it up again.
If you want to can also export you schema with
pg_dumpand share it, then I can compare which things are missing in your schema.@stonith404 commented on GitHub (Nov 10, 2025):
I'm closing this because there was no activity recently. Feel free to comment if the issue still occurs.