[GH-ISSUE #1094] No bookmarks on home page #720

Closed
opened 2026-03-02 11:52:09 +03:00 by kerem · 7 comments
Owner

Originally created by @swills on GitHub (Mar 6, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1094

Describe the Bug

Seems I have an issue similar to #626 except a different error message in the logs:

p [TRPCError]: Output validation failed
    at t (/app/apps/web/.next/server/chunks/480.js:4:45371)
    at async a (/app/apps/web/.next/server/chunks/480.js:4:45909)
    ... 4 lines matching cause stack trace ...
    at async u (/app/apps/web/.next/server/app/dashboard/bookmarks/page.js:1:5790) {
  code: 'INTERNAL_SERVER_ERROR',
  digest: '2098247525',
  [cause]: a [ZodError]: [
    {
      "code": "invalid_type",
      "expected": "string",
      "received": "undefined",
      "path": [
        "bookmarks",
        3,
        "content",
        "url"
      ],
      "message": "Required"
    }
  ]
      at get error (/app/apps/web/.next/server/chunks/8195.js:79:17803)
      at Q.parseAsync (/app/apps/web/.next/server/chunks/8195.js:79:20286)
      at async t (/app/apps/web/.next/server/chunks/480.js:4:45320)
      at async a (/app/apps/web/.next/server/chunks/480.js:4:45909)
      at async a (/app/apps/web/.next/server/chunks/480.js:4:45909)
      at async a (/app/apps/web/.next/server/chunks/480.js:4:45909)
      at async a (/app/apps/web/.next/server/chunks/480.js:4:45909)
      at async t (/app/apps/web/.next/server/chunks/480.js:4:46248)
      at async u (/app/apps/web/.next/server/app/dashboard/bookmarks/page.js:1:5790) {
    issues: [ [Object] ],
    addIssue: [Function (anonymous)],
    addIssues: [Function (anonymous)],
    errors: [ [Object] ]
  }
}

Steps to Reproduce

Not sure.

Expected Behaviour

Bookmarks on home page

Screenshots or Additional Context

Happy to run some sql if you have suggestions.

Device Details

No response

Exact Hoarder Version

v0.22.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 @swills on GitHub (Mar 6, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1094 ### Describe the Bug Seems I have an issue similar to #626 except a different error message in the logs: ``` p [TRPCError]: Output validation failed at t (/app/apps/web/.next/server/chunks/480.js:4:45371) at async a (/app/apps/web/.next/server/chunks/480.js:4:45909) ... 4 lines matching cause stack trace ... at async u (/app/apps/web/.next/server/app/dashboard/bookmarks/page.js:1:5790) { code: 'INTERNAL_SERVER_ERROR', digest: '2098247525', [cause]: a [ZodError]: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "bookmarks", 3, "content", "url" ], "message": "Required" } ] at get error (/app/apps/web/.next/server/chunks/8195.js:79:17803) at Q.parseAsync (/app/apps/web/.next/server/chunks/8195.js:79:20286) at async t (/app/apps/web/.next/server/chunks/480.js:4:45320) at async a (/app/apps/web/.next/server/chunks/480.js:4:45909) at async a (/app/apps/web/.next/server/chunks/480.js:4:45909) at async a (/app/apps/web/.next/server/chunks/480.js:4:45909) at async a (/app/apps/web/.next/server/chunks/480.js:4:45909) at async t (/app/apps/web/.next/server/chunks/480.js:4:46248) at async u (/app/apps/web/.next/server/app/dashboard/bookmarks/page.js:1:5790) { issues: [ [Object] ], addIssue: [Function (anonymous)], addIssues: [Function (anonymous)], errors: [ [Object] ] } } ``` ### Steps to Reproduce Not sure. ### Expected Behaviour Bookmarks on home page ### Screenshots or Additional Context Happy to run some sql if you have suggestions. ### Device Details _No response_ ### Exact Hoarder Version v0.22.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:52:09 +03:00
Author
Owner

@MohamedBassem commented on GitHub (Mar 7, 2025):

Interesting. Did you by any chance manipulate the database or did this happen on its own?

To get your homepage back, you'll have to drop the bad bookmark from the database. Basically, you have a bookmark with undefined URL in the database somehow which is failing schema validation.

I'll use this issue to better handle this corrupted bookmark case to avoid blocking the entire UI from rendering in this case.

<!-- gh-comment-id:2705958651 --> @MohamedBassem commented on GitHub (Mar 7, 2025): Interesting. Did you by any chance manipulate the database or did this happen on its own? To get your homepage back, you'll have to drop the bad bookmark from the database. Basically, you have a bookmark with `undefined` URL in the database somehow which is failing schema validation. I'll use this issue to better handle this corrupted bookmark case to avoid blocking the entire UI from rendering in this case.
Author
Owner

@swills commented on GitHub (Mar 7, 2025):

I didn't manipulate the database but I was running multiple copies of the web pod, see #966. I'm looking at the database but not seeing the bad entry. Any hints?

<!-- gh-comment-id:2706446687 --> @swills commented on GitHub (Mar 7, 2025): I didn't manipulate the database but I was running multiple copies of the web pod, see #966. I'm looking at the database but not seeing the bad entry. Any hints?
Author
Owner

@MohamedBassem commented on GitHub (Mar 7, 2025):

@swills I have a theory, can you run:

select id from bookmarks where type='link' and NOT EXISTS(select * from bookmarkLinks where bookmarks.id = bookmarkLinks.id );

Against the database and see if it returns anything?

<!-- gh-comment-id:2706502335 --> @MohamedBassem commented on GitHub (Mar 7, 2025): @swills I have a theory, can you run: ``` select id from bookmarks where type='link' and NOT EXISTS(select * from bookmarkLinks where bookmarks.id = bookmarkLinks.id ); ``` Against the database and see if it returns anything?
Author
Owner

@swills commented on GitHub (Mar 7, 2025):

Yep:

sqlite> select id from bookmarks where type='link' and NOT EXISTS(select * from bookmarkLinks where bookmarks.id = bookmarkLinks.id );
id
ri7i6rt49b78ytzgjyjugu04
sqlite> 
<!-- gh-comment-id:2706513364 --> @swills commented on GitHub (Mar 7, 2025): Yep: ``` sqlite> select id from bookmarks where type='link' and NOT EXISTS(select * from bookmarkLinks where bookmarks.id = bookmarkLinks.id ); id ri7i6rt49b78ytzgjyjugu04 sqlite> ```
Author
Owner

@MohamedBassem commented on GitHub (Mar 7, 2025):

ok, that explains the problem. Removing that bookmark should give you your homepage back.

You can remove it with (I'd recommend taking a backup of the database):

delete from bookmarks where id='ri7i6rt49b78ytzgjyjugu04';

For debugging purpose though (before removing it), does this return anything?

select * from bookmarkAssets where id='ri7i6rt49b78ytzgjyjugu04';

I'll use this issue to fix the reason of the inconsistency.

<!-- gh-comment-id:2706534953 --> @MohamedBassem commented on GitHub (Mar 7, 2025): ok, that explains the problem. Removing that bookmark should give you your homepage back. You can remove it with (I'd recommend taking a backup of the database): ``` delete from bookmarks where id='ri7i6rt49b78ytzgjyjugu04'; ``` For debugging purpose though (before removing it), does this return anything? ``` select * from bookmarkAssets where id='ri7i6rt49b78ytzgjyjugu04'; ``` I'll use this issue to fix the reason of the inconsistency.
Author
Owner

@swills commented on GitHub (Mar 7, 2025):

That query did not return anything:

sqlite> select * from bookmarkLinks where id = 'ri7i6rt49b78ytzgjyjugu04';
sqlite>

And the delete did fix it! Thanks!

<!-- gh-comment-id:2706642828 --> @swills commented on GitHub (Mar 7, 2025): That query did not return anything: ``` sqlite> select * from bookmarkLinks where id = 'ri7i6rt49b78ytzgjyjugu04'; sqlite> ``` And the delete did fix it! Thanks!
Author
Owner

@swills commented on GitHub (Mar 7, 2025):

Oh, and I've reconfigured things to stop running multiple replicas so hopefully I can avoid the issue in the future.

<!-- gh-comment-id:2706643845 --> @swills commented on GitHub (Mar 7, 2025): Oh, and I've reconfigured things to stop running multiple replicas so hopefully I can avoid the issue in the future.
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#720
No description provided.