[GH-ISSUE #1583] OAuth user creation might be broken #987

Closed
opened 2026-03-02 11:54:10 +03:00 by kerem · 11 comments
Owner

Originally created by @manu2107el on GitHub (Jun 10, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1583

Originally assigned to: @MohamedBassem on GitHub.

Describe the Bug

I have a brand new docker compose stack and i wanted to set up authentication via my authentik setup.
so far so good it worked great with user accounts that already existed.

But when i log in with a user that doesn't have a karakeep account i get an application error:

Application error: a server-side exception has occurred (see the server logs for more information).

Digest: 4237581454

The logs:

karakeep-web          | d [TRPCError]: User settings not found
karakeep-web          |     at /app/apps/web/.next/server/chunks/6815.js:1:41820
karakeep-web          |     at async X.h.middlewares (/app/apps/web/.next/server/chunks/269.js:4:46337)
karakeep-web          |     at async F (/app/apps/web/.next/server/chunks/269.js:7:68)
karakeep-web          |     at async G (/app/apps/web/.next/server/chunks/269.js:4:45731)
karakeep-web          |     at async F (/app/apps/web/.next/server/chunks/269.js:7:68)
karakeep-web          |     at async F (/app/apps/web/.next/server/chunks/269.js:7:68)
karakeep-web          |     at async F (/app/apps/web/.next/server/chunks/269.js:7:68)
karakeep-web          |     at async G (/app/apps/web/.next/server/chunks/269.js:4:46537)
karakeep-web          |     at async /app/apps/web/.next/server/chunks/269.js:7:5476
karakeep-web          |     at async Promise.all (index 1) {
karakeep-web          |   cause: undefined,
karakeep-web          |   code: 'NOT_FOUND',
karakeep-web          |   digest: '4237581454'
karakeep-web          | }

the ui seems to indicate that the user was created after the login attempt and when first creating a user through karakeep UI and then linking it to oauth it works as expected.

Steps to Reproduce

  1. set up a new karakeep instance
  2. connect oauth
  3. attempt to log in with oauth user that is not already created in karakeep

Expected Behaviour

login should work as expected without server side error

Screenshots or Additional Context

Image

Device Details

No response

Exact Karakeep Version

0.25.0

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @manu2107el on GitHub (Jun 10, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1583 Originally assigned to: @MohamedBassem on GitHub. ### Describe the Bug I have a brand new docker compose stack and i wanted to set up authentication via my authentik setup. so far so good it worked great with user accounts that already existed. But when i log in with a user that doesn't have a karakeep account i get an application error: ``` Application error: a server-side exception has occurred (see the server logs for more information). Digest: 4237581454 ``` The logs: ``` karakeep-web | d [TRPCError]: User settings not found karakeep-web | at /app/apps/web/.next/server/chunks/6815.js:1:41820 karakeep-web | at async X.h.middlewares (/app/apps/web/.next/server/chunks/269.js:4:46337) karakeep-web | at async F (/app/apps/web/.next/server/chunks/269.js:7:68) karakeep-web | at async G (/app/apps/web/.next/server/chunks/269.js:4:45731) karakeep-web | at async F (/app/apps/web/.next/server/chunks/269.js:7:68) karakeep-web | at async F (/app/apps/web/.next/server/chunks/269.js:7:68) karakeep-web | at async F (/app/apps/web/.next/server/chunks/269.js:7:68) karakeep-web | at async G (/app/apps/web/.next/server/chunks/269.js:4:46537) karakeep-web | at async /app/apps/web/.next/server/chunks/269.js:7:5476 karakeep-web | at async Promise.all (index 1) { karakeep-web | cause: undefined, karakeep-web | code: 'NOT_FOUND', karakeep-web | digest: '4237581454' karakeep-web | } ``` the ui seems to indicate that the user was created after the login attempt and when first creating a user through karakeep UI and then linking it to oauth it works as expected. ### Steps to Reproduce 1. set up a new karakeep instance 2. connect oauth 3. attempt to log in with oauth user that is not already created in karakeep ### Expected Behaviour login should work as expected without server side error ### Screenshots or Additional Context ![Image](https://github.com/user-attachments/assets/8f6b9573-fe53-41f5-bf47-4e2452128ad6) ### Device Details _No response_ ### Exact Karakeep Version 0.25.0 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
kerem 2026-03-02 11:54:10 +03:00
Author
Owner

@manu2107el commented on GitHub (Jun 10, 2025):

Mentioned in Karakeep Discord: help-desk>Application error: a server-side exception has occurred.

<!-- gh-comment-id:2957952380 --> @manu2107el commented on GitHub (Jun 10, 2025): Mentioned in [Karakeep Discord: help-desk>Application error: a server-side exception has occurred.](https://discord.com/channels/1223681308962721802/1381737562867236926)
Author
Owner

@MohamedBassem commented on GitHub (Jun 10, 2025):

This was broken by the introduction of the user setting table in 0.25 that doesn't get created when the user is created over oauth. As a workaround, create the user first via the ui and then link it via oauth. Will send a patch release for this bug when it's fixed properly in a couple of days.

<!-- gh-comment-id:2957955465 --> @MohamedBassem commented on GitHub (Jun 10, 2025): This was broken by the introduction of the user setting table in 0.25 that doesn't get created when the user is created over oauth. As a workaround, create the user first via the ui and then link it via oauth. Will send a patch release for this bug when it's fixed properly in a couple of days.
Author
Owner

@andresmanelli commented on GitHub (Jun 17, 2025):

@MohamedBassem how should I link an existing user via OAuth? Thanks !

<!-- gh-comment-id:2979356149 --> @andresmanelli commented on GitHub (Jun 17, 2025): @MohamedBassem how should I link an existing user via OAuth? Thanks !
Author
Owner

@manu2107el commented on GitHub (Jun 17, 2025):

@andresmanelli my current workarround is creating a user that has the same email as the oauth user this automatically links the user for me

<!-- gh-comment-id:2979622555 --> @manu2107el commented on GitHub (Jun 17, 2025): @andresmanelli my current workarround is creating a user that has the same email as the oauth user this automatically links the user for me
Author
Owner

@erphise commented on GitHub (Jun 19, 2025):

@andresmanelli my current workarround is creating a user that has the same email as the oauth user this automatically links the user for me

I am having the same problem and¡ unfortunately for me, that work arround didn't work :/

<!-- gh-comment-id:2986389725 --> @erphise commented on GitHub (Jun 19, 2025): > [@andresmanelli](https://github.com/andresmanelli) my current workarround is creating a user that has the same email as the oauth user this automatically links the user for me I am having the same problem and¡ unfortunately for me, that work arround didn't work :/
Author
Owner

@rameri commented on GitHub (Jun 19, 2025):

@andresmanelli my current workarround is creating a user that has the same email as the oauth user this automatically links the user for me

Did you create the user by an admin account and via "Admin Settings" -> "User List" -> "Create user" ... or via "Sign Up" from the login page?

I tried the first (by User List) and receive the error 'OAuth login failed: OAuthAccountNotLinked'.

edit: Doesn't matter.. I receive the error in both ways ;-)

<!-- gh-comment-id:2988940429 --> @rameri commented on GitHub (Jun 19, 2025): > [@andresmanelli](https://github.com/andresmanelli) my current workarround is creating a user that has the same email as the oauth user this automatically links the user for me Did you create the user by an admin account and via "Admin Settings" -> "User List" -> "Create user" ... or via "Sign Up" from the login page? I tried the first (by User List) and receive the error 'OAuth login failed: OAuthAccountNotLinked'. edit: Doesn't matter.. I receive the error in both ways ;-)
Author
Owner

@MohamedBassem commented on GitHub (Jun 21, 2025):

The fix will be in the nightly build in ~20mins, please give it a try and let me know if it fixes the issue for you.

<!-- gh-comment-id:2993516084 --> @MohamedBassem commented on GitHub (Jun 21, 2025): The fix will be in the nightly build in ~20mins, please give it a try and let me know if it fixes the issue for you.
Author
Owner

@erphise commented on GitHub (Jun 21, 2025):

The fix will be in the nightly build in ~20mins, please give it a try and let me know if it fixes the issue for you.

I just tried it out and it worked for me! Thanks!

<!-- gh-comment-id:2993557212 --> @erphise commented on GitHub (Jun 21, 2025): > The fix will be in the nightly build in ~20mins, please give it a try and let me know if it fixes the issue for you. I just tried it out and it worked for me! Thanks!
Author
Owner

@paul-tharun commented on GitHub (Jun 27, 2025):

This still persists for me on the latest build. Mine is a new installation with no users.

EDIT:
I deleted the data dir, restarted and then it started working

<!-- gh-comment-id:3014198851 --> @paul-tharun commented on GitHub (Jun 27, 2025): This still persists for me on the latest build. Mine is a new installation with no users. EDIT: I deleted the data dir, restarted and then it started working
Author
Owner

@maxbossing commented on GitHub (Jun 30, 2025):

This is still a problem, even after wiping all volumes and restarting it it's immediately broken.

<!-- gh-comment-id:3019571771 --> @maxbossing commented on GitHub (Jun 30, 2025): This is still a problem, even after wiping all volumes and restarting it it's immediately broken.
Author
Owner

@MohamedBassem commented on GitHub (Jun 30, 2025):

Anyone who is still facing issues specially after a wipe, this is another issue I'm tracking. After you wipe your installation, make sure to clear the cookies and things will work. I'll push a fix soon.

<!-- gh-comment-id:3019582191 --> @MohamedBassem commented on GitHub (Jun 30, 2025): Anyone who is still facing issues specially after a wipe, this is another issue I'm tracking. After you wipe your installation, make sure to clear the cookies and things will work. I'll push a fix soon.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#987
No description provided.