[GH-ISSUE #564] Getting logged out all the time #362

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

Originally created by @wouldntyouknow on GitHub (Oct 17, 2024).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/564

Hi!
Love the app but I am having an issue with it. After logging in successfully, I get logged out automatically after a minute or two (seemingly random). When I try to get back it, sometimes it fails a few times, sometimes it lets me in instantly. Running the app in Docker, locally.
Here is a log excerpt. This chunk comes up 6-7 times (same) in a row after getting kicked out.

s [TRPCError]: UNAUTHORIZED

    at /app/apps/web/.next/server/chunks/815.js:1:2403

    at a (/app/apps/web/.next/server/chunks/105.js:4:32966)

    at Object.next (/app/apps/web/.next/server/chunks/105.js:4:33078)

    at /app/apps/web/.next/server/chunks/815.js:1:2337

    at a (/app/apps/web/.next/server/chunks/105.js:4:32966)

    at p (/app/apps/web/.next/server/chunks/105.js:4:33305)

    at h (/app/apps/web/.next/server/chunks/105.js:7:4283)

    at /app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4249

    at Array.map (<anonymous>)

    at g (/app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4183) {

  code: 'UNAUTHORIZED',

  [cause]: undefined

}

What can I do here? THank you.

Originally created by @wouldntyouknow on GitHub (Oct 17, 2024). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/564 Hi! Love the app but I am having an issue with it. After logging in successfully, I get logged out automatically after a minute or two (seemingly random). When I try to get back it, sometimes it fails a few times, sometimes it lets me in instantly. Running the app in Docker, locally. Here is a log excerpt. This chunk comes up 6-7 times (same) in a row after getting kicked out. ``` s [TRPCError]: UNAUTHORIZED at /app/apps/web/.next/server/chunks/815.js:1:2403 at a (/app/apps/web/.next/server/chunks/105.js:4:32966) at Object.next (/app/apps/web/.next/server/chunks/105.js:4:33078) at /app/apps/web/.next/server/chunks/815.js:1:2337 at a (/app/apps/web/.next/server/chunks/105.js:4:32966) at p (/app/apps/web/.next/server/chunks/105.js:4:33305) at h (/app/apps/web/.next/server/chunks/105.js:7:4283) at /app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4249 at Array.map (<anonymous>) at g (/app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4183) { code: 'UNAUTHORIZED', [cause]: undefined } ``` What can I do here? THank you.
kerem 2026-03-02 11:49:12 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@MohamedBassem commented on GitHub (Oct 17, 2024):

do you have something in front of hoarder? A reverse proxy with any special configuration for example?

<!-- gh-comment-id:2420594696 --> @MohamedBassem commented on GitHub (Oct 17, 2024): do you have something in front of hoarder? A reverse proxy with any special configuration for example?
Author
Owner

@wouldntyouknow commented on GitHub (Oct 17, 2024):

Hi! No, not yet at least. I am trying to access it on my internal docker IP (something like 'http://192.168.0.25:portnum')

<!-- gh-comment-id:2420598576 --> @wouldntyouknow commented on GitHub (Oct 17, 2024): Hi! No, not yet at least. I am trying to access it on my internal docker IP (something like 'http://192.168.0.25:portnum')
Author
Owner

@MohamedBassem commented on GitHub (Oct 17, 2024):

that's weird. Is this happening with other browsers as well? Also are you using passwords or oauth?

<!-- gh-comment-id:2420601394 --> @MohamedBassem commented on GitHub (Oct 17, 2024): that's weird. Is this happening with other browsers as well? Also are you using passwords or oauth?
Author
Owner

@wouldntyouknow commented on GitHub (Oct 17, 2024):

I am using Brave. Will test now in chrome. Just noticed that these chunks actually differ a bit. So here is the part for the last logout event. This time I got 3 of these (what I called) "chunks".
Also, I am using username/password.

`2024-10-17T21:26:43.626647179Z s [TRPCError]: UNAUTHORIZED

2024-10-17T21:26:43.626699943Z     at /app/apps/web/.next/server/chunks/815.js:1:2403

2024-10-17T21:26:43.626705810Z     at a (/app/apps/web/.next/server/chunks/105.js:4:32966)

2024-10-17T21:26:43.626709141Z     at Object.next (/app/apps/web/.next/server/chunks/105.js:4:33078)

2024-10-17T21:26:43.626719709Z     at /app/apps/web/.next/server/chunks/815.js:1:2337

2024-10-17T21:26:43.626722231Z     at a (/app/apps/web/.next/server/chunks/105.js:4:32966)

2024-10-17T21:26:43.626724364Z     at p (/app/apps/web/.next/server/chunks/105.js:4:33305)

2024-10-17T21:26:43.626731087Z     at s (/app/apps/web/.next/server/chunks/105.js:7:4427)

2024-10-17T21:26:43.626733270Z     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

2024-10-17T21:26:43.626735569Z     at async i (/app/apps/web/.next/server/app/dashboard/tags/page.js:1:34072) {

2024-10-17T21:26:43.626737840Z   code: 'UNAUTHORIZED',

2024-10-17T21:26:43.626739901Z   digest: '426706303',

2024-10-17T21:26:43.626741997Z   [cause]: undefined

2024-10-17T21:26:43.626744080Z }

2024-10-17T21:26:44.582417038Z s [TRPCError]: UNAUTHORIZED

2024-10-17T21:26:44.582449101Z     at /app/apps/web/.next/server/chunks/815.js:1:2403

2024-10-17T21:26:44.582452624Z     at a (/app/apps/web/.next/server/chunks/105.js:4:32966)

2024-10-17T21:26:44.582455060Z     at Object.next (/app/apps/web/.next/server/chunks/105.js:4:33078)

2024-10-17T21:26:44.582457453Z     at /app/apps/web/.next/server/chunks/815.js:1:2337

2024-10-17T21:26:44.582459629Z     at a (/app/apps/web/.next/server/chunks/105.js:4:32966)

2024-10-17T21:26:44.582461781Z     at p (/app/apps/web/.next/server/chunks/105.js:4:33305)

2024-10-17T21:26:44.582463825Z     at h (/app/apps/web/.next/server/chunks/105.js:7:4283)

2024-10-17T21:26:44.582465953Z     at /app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4249

2024-10-17T21:26:44.582468083Z     at Array.map (<anonymous>)

2024-10-17T21:26:44.582470435Z     at g (/app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4183) {

2024-10-17T21:26:44.582472558Z   code: 'UNAUTHORIZED',

2024-10-17T21:26:44.582474599Z   [cause]: undefined

2024-10-17T21:26:44.582476521Z }

2024-10-17T21:26:45.604977951Z s [TRPCError]: UNAUTHORIZED

2024-10-17T21:26:45.605005483Z     at /app/apps/web/.next/server/chunks/815.js:1:2403

2024-10-17T21:26:45.605009103Z     at a (/app/apps/web/.next/server/chunks/105.js:4:32966)

2024-10-17T21:26:45.605012178Z     at Object.next (/app/apps/web/.next/server/chunks/105.js:4:33078)

2024-10-17T21:26:45.605014582Z     at /app/apps/web/.next/server/chunks/815.js:1:2337

2024-10-17T21:26:45.605016689Z     at a (/app/apps/web/.next/server/chunks/105.js:4:32966)

2024-10-17T21:26:45.605018788Z     at p (/app/apps/web/.next/server/chunks/105.js:4:33305)

2024-10-17T21:26:45.605020803Z     at h (/app/apps/web/.next/server/chunks/105.js:7:4283)

2024-10-17T21:26:45.605022900Z     at /app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4249

2024-10-17T21:26:45.605025085Z     at Array.map (<anonymous>)

2024-10-17T21:26:45.605039455Z     at g (/app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4183) {

2024-10-17T21:26:45.605042357Z   code: 'UNAUTHORIZED',

2024-10-17T21:26:45.605044473Z   [cause]: undefined

2024-10-17T21:26:45.605046526Z }`
<!-- gh-comment-id:2420607864 --> @wouldntyouknow commented on GitHub (Oct 17, 2024): I am using Brave. Will test now in chrome. Just noticed that these chunks actually differ a bit. So here is the part for the last logout event. This time I got 3 of these (what I called) "chunks". Also, I am using username/password. ``` `2024-10-17T21:26:43.626647179Z s [TRPCError]: UNAUTHORIZED 2024-10-17T21:26:43.626699943Z at /app/apps/web/.next/server/chunks/815.js:1:2403 2024-10-17T21:26:43.626705810Z at a (/app/apps/web/.next/server/chunks/105.js:4:32966) 2024-10-17T21:26:43.626709141Z at Object.next (/app/apps/web/.next/server/chunks/105.js:4:33078) 2024-10-17T21:26:43.626719709Z at /app/apps/web/.next/server/chunks/815.js:1:2337 2024-10-17T21:26:43.626722231Z at a (/app/apps/web/.next/server/chunks/105.js:4:32966) 2024-10-17T21:26:43.626724364Z at p (/app/apps/web/.next/server/chunks/105.js:4:33305) 2024-10-17T21:26:43.626731087Z at s (/app/apps/web/.next/server/chunks/105.js:7:4427) 2024-10-17T21:26:43.626733270Z at process.processTicksAndRejections (node:internal/process/task_queues:105:5) 2024-10-17T21:26:43.626735569Z at async i (/app/apps/web/.next/server/app/dashboard/tags/page.js:1:34072) { 2024-10-17T21:26:43.626737840Z code: 'UNAUTHORIZED', 2024-10-17T21:26:43.626739901Z digest: '426706303', 2024-10-17T21:26:43.626741997Z [cause]: undefined 2024-10-17T21:26:43.626744080Z } 2024-10-17T21:26:44.582417038Z s [TRPCError]: UNAUTHORIZED 2024-10-17T21:26:44.582449101Z at /app/apps/web/.next/server/chunks/815.js:1:2403 2024-10-17T21:26:44.582452624Z at a (/app/apps/web/.next/server/chunks/105.js:4:32966) 2024-10-17T21:26:44.582455060Z at Object.next (/app/apps/web/.next/server/chunks/105.js:4:33078) 2024-10-17T21:26:44.582457453Z at /app/apps/web/.next/server/chunks/815.js:1:2337 2024-10-17T21:26:44.582459629Z at a (/app/apps/web/.next/server/chunks/105.js:4:32966) 2024-10-17T21:26:44.582461781Z at p (/app/apps/web/.next/server/chunks/105.js:4:33305) 2024-10-17T21:26:44.582463825Z at h (/app/apps/web/.next/server/chunks/105.js:7:4283) 2024-10-17T21:26:44.582465953Z at /app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4249 2024-10-17T21:26:44.582468083Z at Array.map (<anonymous>) 2024-10-17T21:26:44.582470435Z at g (/app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4183) { 2024-10-17T21:26:44.582472558Z code: 'UNAUTHORIZED', 2024-10-17T21:26:44.582474599Z [cause]: undefined 2024-10-17T21:26:44.582476521Z } 2024-10-17T21:26:45.604977951Z s [TRPCError]: UNAUTHORIZED 2024-10-17T21:26:45.605005483Z at /app/apps/web/.next/server/chunks/815.js:1:2403 2024-10-17T21:26:45.605009103Z at a (/app/apps/web/.next/server/chunks/105.js:4:32966) 2024-10-17T21:26:45.605012178Z at Object.next (/app/apps/web/.next/server/chunks/105.js:4:33078) 2024-10-17T21:26:45.605014582Z at /app/apps/web/.next/server/chunks/815.js:1:2337 2024-10-17T21:26:45.605016689Z at a (/app/apps/web/.next/server/chunks/105.js:4:32966) 2024-10-17T21:26:45.605018788Z at p (/app/apps/web/.next/server/chunks/105.js:4:33305) 2024-10-17T21:26:45.605020803Z at h (/app/apps/web/.next/server/chunks/105.js:7:4283) 2024-10-17T21:26:45.605022900Z at /app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4249 2024-10-17T21:26:45.605025085Z at Array.map (<anonymous>) 2024-10-17T21:26:45.605039455Z at g (/app/apps/web/.next/server/app/api/trpc/[trpc]/route.js:1:4183) { 2024-10-17T21:26:45.605042357Z code: 'UNAUTHORIZED', 2024-10-17T21:26:45.605044473Z [cause]: undefined 2024-10-17T21:26:45.605046526Z }` ```
Author
Owner

@wouldntyouknow commented on GitHub (Oct 17, 2024):

Also an addition I missed: In the same browser (Brave), the Hoarder extension is installed and active. Configured via username and password as well. It works, adds the resource properly to Hoarder.

<!-- gh-comment-id:2420639313 --> @wouldntyouknow commented on GitHub (Oct 17, 2024): Also an addition I missed: In the same browser (Brave), the Hoarder extension is installed and active. Configured via username and password as well. It works, adds the resource properly to Hoarder.
Author
Owner

@MohamedBassem commented on GitHub (Oct 17, 2024):

The extension uses a different authentication mechanism (API key based). How did the testing go with chrome?

<!-- gh-comment-id:2420648962 --> @MohamedBassem commented on GitHub (Oct 17, 2024): The extension uses a different authentication mechanism (API key based). How did the testing go with chrome?
Author
Owner

@wouldntyouknow commented on GitHub (Oct 17, 2024):

Okay, so Chrome is still in, while Brave had me kicked. Clearing cookies and retest did not seemed to help - same issue for some reason... Strange. Anyways, I guess this means it does not have to do anything with Hoarder, the issue is on my end.
Thanks for such quick replies!

<!-- gh-comment-id:2420658340 --> @wouldntyouknow commented on GitHub (Oct 17, 2024): Okay, so Chrome is still in, while Brave had me kicked. Clearing cookies and retest did not seemed to help - same issue for some reason... Strange. Anyways, I guess this means it does not have to do anything with Hoarder, the issue is on my end. Thanks for such quick replies!
Author
Owner

@MohamedBassem commented on GitHub (Oct 17, 2024):

@wouldntyouknow to give you some leads. This behavior you're seeing means that brave for some reason is not sending/corrupting the the JWT in the cookie that hoarder sets. If the JWT is corrupt, hoarder fails to authenticate you and just logs you out.

<!-- gh-comment-id:2420667102 --> @MohamedBassem commented on GitHub (Oct 17, 2024): @wouldntyouknow to give you some leads. This behavior you're seeing means that brave for some reason is not sending/corrupting the the JWT in the cookie that hoarder sets. If the JWT is corrupt, hoarder fails to authenticate you and just logs you out.
Author
Owner

@wouldntyouknow commented on GitHub (Oct 17, 2024):

Thanks again! Whatever it is, it is local to this particular installation as it seems. Fired up a W10 VM that has the same brave version - it works there perfectly.

<!-- gh-comment-id:2420671436 --> @wouldntyouknow commented on GitHub (Oct 17, 2024): Thanks again! Whatever it is, it is local to this particular installation as it seems. Fired up a W10 VM that has the same brave version - it works there perfectly.
Author
Owner

@MohamedBassem commented on GitHub (Oct 17, 2024):

Could be some extensions you have or something. Closing this issue for now, as it seems resolved. Feel free to reopen if you have more questions.

<!-- gh-comment-id:2420674442 --> @MohamedBassem commented on GitHub (Oct 17, 2024): Could be some extensions you have or something. Closing this issue for now, as it seems resolved. Feel free to reopen if you have more questions.
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#362
No description provided.