🐛 Bug Report: SQL Error - Login not possible #213

Closed
opened 2025-07-08 08:42:34 -04:00 by AtHeartEngineer · 0 comments

Originally created by @BEBU88 on 4/27/2025

Reproduction steps

I tried to login to my paperless-ngx instance. After authentication I got this error:

2025/04/27 15:42:47 /app/backend/internal/service/oidc_service.go:104 duplicated key not allowed
[0.721ms] [rows:0] INSERT INTO "user_authorized_oidc_clients" ("scope","user_id","client_id") VALUES (1,$2$,$3$)

2025/04/27 15:42:47 /app/backend/internal/service/oidc_service.go:110 ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02)
[0.283ms] [rows:0] UPDATE "user_authorized_oidc_clients" SET "scope"=1 WHERE "user_id" = 2 AND "client_id" = 3
[GIN] 2025/04/27 - 15:42:47 | 500 | 6.678577ms | 10.254.254.5 | POST "/api/oidc/authorize"
Error #01: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02)
[GIN] 2025/04/27 - 15:42:47 | 500 | 6.732239ms | 10.254.254.5 | POST "/api/oidc/authorize"
Error #01: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02)

As far as I can tell only paperless was affected.

I use pocket-id 0.9.4 and postgresql 17

I fixed it with just deleting all DB entries containing the client_id from paperless.

I can provide the contents from the table user_authorized_oidc_clients before I deleted them if this is helpful.

Expected behavior

Login should work as expected.

Actual Behavior

Login is not possible.

Version and Environment

v0.94 postresql 17

Log Output

No response

*Originally created by @BEBU88 on 4/27/2025* ### Reproduction steps I tried to login to my paperless-ngx instance. After authentication I got this error: 2025/04/27 15:42:47 /app/backend/internal/service/oidc_service.go:104 duplicated key not allowed [0.721ms] [rows:0] INSERT INTO "user_authorized_oidc_clients" ("scope","user_id","client_id") VALUES ($1$,$2$,$3$) 2025/04/27 15:42:47 /app/backend/internal/service/oidc_service.go:110 ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02) [0.283ms] [rows:0] UPDATE "user_authorized_oidc_clients" SET "scope"=$1$ WHERE "user_id" = $2$ AND "client_id" = $3$ [GIN] 2025/04/27 - 15:42:47 | 500 | 6.678577ms | 10.254.254.5 | POST "/api/oidc/authorize" Error #01: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02) [GIN] 2025/04/27 - 15:42:47 | 500 | 6.732239ms | 10.254.254.5 | POST "/api/oidc/authorize" Error #01: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02) As far as I can tell only paperless was affected. I use pocket-id 0.9.4 and postgresql 17 I fixed it with just deleting all DB entries containing the client_id from paperless. I can provide the contents from the table user_authorized_oidc_clients before I deleted them if this is helpful. ### Expected behavior Login should work as expected. ### Actual Behavior Login is not possible. ### Version and Environment v0.94 postresql 17 ### Log Output _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pocket-id#213